-
Notifications
You must be signed in to change notification settings - Fork 406
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
[Best Practices] Validate invalid access/layout combinations for VkImageMemoryBarrier{2KHR} #2918
Labels
Comments
@Tobski, is this table from the Vulkan specification or some other document? |
I manually constructed it based on usage information noted in the descriptions of each image layout. We could add it to the spec but it'd take some serious reworking... |
jeremyg-lunarg
added a commit
to jeremyg-lunarg/Vulkan-ValidationLayers
that referenced
this issue
Nov 2, 2022
It turns out that the table from KhronosGroup#2918 had an implicit "(can be 0)" on almost every line. The 2 weird cases are: GENERAL - Any (must not be 0) PRESENT_SRC_KHR - Must be 0 Fixes KhronosGroup#4735
jeremyg-lunarg
added a commit
to jeremyg-lunarg/Vulkan-ValidationLayers
that referenced
this issue
Nov 2, 2022
It turns out that the table from KhronosGroup#2918 had an implicit "(can be 0)" on almost every line. The only weird case is: PRESENT_SRC_KHR - Must be 0 Fixes KhronosGroup#4735
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Describe the situation in which you encountered the missing validation
There are a number of situations in which the set of access flags in the source/destination mask make no sense with an old/new layout in an image memory barrier. While these are not invalid by the spec, it would be helpful to check that the access mask matches up with the specified layout and issue a warning if they don't match.
The following table lists the set of "expected" access flags for a given image layout - anything outside of this should issue a warning.
COLOR_ATTACHMENT_WRITE_BIT
COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT
DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
DEPTH_STENCIL_ATTACHMENT_READ_BIT
SHADER_READ_BIT
SHADER_READ_BIT
DEPTH_STENCIL_ATTACHMENT_READ_BIT
Stencil Aspect:
DEPTH_STENCIL_ATTACHMENT_READ_BIT
DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
DEPTH_STENCIL_ATTACHMENT_READ_BIT
DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
Stencil Aspect:
SHADER_READ_BIT
DEPTH_STENCIL_ATTACHMENT_READ_BIT
DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
DEPTH_STENCIL_ATTACHMENT_READ_BIT
DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
DEPTH_STENCIL_ATTACHMENT_READ_BIT
Valid Usage IDs requested
N/A - These are best practices only, so no VUIDs
The text was updated successfully, but these errors were encountered: