KhronosGroup / Vulkan-ValidationLayers

Vulkan Validation Layers (VVL)
https://vulkan.lunarg.com/doc/sdk/latest/linux/khronos_validation_layer.html
Other
737 stars 398 forks source link

Missing image layout VUs #7688

Open spencer-lunarg opened 5 months ago

spencer-lunarg commented 5 months ago

these were added in 1.3.280 headers/spec (https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/6512)

other related Layout VUs

danginsburg commented 3 months ago

For what it's worth, I was just debugging corruption on AMD with VK_EXT_extended_dynamic_state where I was setting vkCmdSetDepthWriteEnableEXT to true with a depth/stencil buffer in VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL. As far as I can tell, it would have been one of the 06174 VUIDs that should have caught this. I was going to file a bug that it was missing, but I guess it's already being tracked here. I'm also curious if validation was planning to check if the PSO/dynamic state had depth writes on because it's not entirely clear to me if that VU would have covered it since it doesn't explicitly mention that state.

spencer-lunarg commented 3 months ago

I'm also curious if validation was planning to check if the PSO/dynamic state had depth writes

so the thing that stopped me before from "just quickly adding this" was the part of the VU where it says

this command must not write any values to the depth attachment

So this has a lot of things that could stop the writing like depthWriteEnable (which is also gated on depthTestEnable)

from my handy depth graph I assume after the depthWriteEnable (which we track if from static or dynamic) we should consider it as "written"

(Knowing this is a real VU that would have helpped someone, can put this up on my todo list for the upcoming weeks)