Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description of pRect parameter in vkCmdClearAttachments is ambiguous #2497

Open
elasota opened this issue Feb 23, 2025 · 2 comments
Open

Description of pRect parameter in vkCmdClearAttachments is ambiguous #2497

elasota opened this issue Feb 23, 2025 · 2 comments
Assignees

Comments

@elasota
Copy link

elasota commented Feb 23, 2025

The current wording for the pRects parameter of vkCmdClearAttachments is:

pRects is a pointer to an array of VkClearRect structures defining regions within each selected attachment to clear.

It's not immediately clear from this text whether "within each selected attachment" means that each rect is associated with a single attachment, or all attachments.

Perhaps the wording should be something like "within all selected attachments."

@spencer-lunarg
Copy link

So the idea of this is if you have rectCount == 2 with 2 rects, those are the two regions that will be cleared.

If you have 3 attachment, the 2 regions will be cleared in all 3 of those regions

The "how you can tell" is that rectCount can be different than attachmentCount so there is no relationship to the index of pRects to pAttachments


We discussed in the Working Group today and I will get some spec text up to help clarify this, thanks for raising the issue!

@elasota
Copy link
Author

elasota commented Mar 6, 2025

Yeah there are some other hints that's how it works, like the valid usage, what threw me off personally was the word "selected" when there is no language in vkCmdClearAttachments or VkClearAttachment that uses the word "select" and so it's possible to interpret the documentation for this command as each rect clearing a single "selected" attachment via some "selection" mechanism.

Additionally, the documentation of VkClearRect uses the wording "the attachment image view" suggesting that it corresponds to a single attachment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants