Repository navigation
[val] Explicit layout refactor - #6792
Conversation
* Combine layout checks into a single pass to share logic * checks both required explicit layouts and invalid layouts * remove checks from validate_decorations.cpp * Introduce enums for layout modes and requirements * Centralize which instructions are examined for layouts * Add options to specify descriptor sizes to the validator (buffer, sampler, image, and tensor)
* Fix handling of OpBufferPointerEXT * Add tests for missing coverage
|
I should mention as well, I tested this against vk-gl-cts main branch and the only validation problems looked real and related workgroup memory explicit layout. See vk-gl-cts tracker issue 6736. |
spencer-lunarg
left a comment
There was a problem hiding this comment.
I tested with VVL and CTS, it looks good will likely need some VUID churn... but honestly that is a followup level PR
overall this REALLY helps with untyped pointers to enforce people from setting offset/arrayStride to crazy non-sense values that will just lead to a nightmare for the average dev to debug
|
fyi, this is going to miss this SDK cycle now, which I think it is fine, gives more time to test this over time, but still happy to make this the new baseline |
dneto0
left a comment
There was a problem hiding this comment.
LGTM except that it looks like theres one function that should be deleted.
* Remove dead code for invalid layout checks (old) * Improve comments
|
Just wanted to point out VVL change is KhronosGroup/Vulkan-ValidationLayers#12788 really nice to just pass in the properties and catch real issues faster The only thing I will follow up with adding VUID so it points to things like |
The validator now requires explicit layout for UniformConstant when SPV_EXT_descriptor_heap is used (KhronosGroup/SPIRV-Tools#6792), which DXC's descriptor heap codegen does not yet do. Exposed by the SPIRV-Tools update in 8725f5c. Assisted-by: copilot Co-authored-by: Copilot <[email protected]> Copilot-Session: b04b21af-2d8b-4af5-b9ad-1b84073588f5
Fixes two SPIR-V validation failures under -O3: - #8609: loop unrolling duplicated RelaxedPrecision decorations (KhronosGroup/SPIRV-Tools#6690) - #8603: MergeBinaryOpSelect produced an OpSelect with a vector result type and a scalar condition, only legal in SPIR-V 1.4+ (KhronosGroup/SPIRV-Tools#6827) SPIRV-Headers moves to 29981f65 to match; SPIRV-Tools 1c336172 does not build against the older headers. XFAIL resource-heap-ext-texture: the validator now requires explicit layout for UniformConstant when SPV_EXT_descriptor_heap is used (KhronosGroup/SPIRV-Tools#6792). Assisted-by: copilot Co-authored-by: Copilot <[email protected]> Copilot-Session: b04b21af-2d8b-4af5-b9ad-1b84073588f5 Co-authored-by: Copilot <[email protected]> Copilot-Session: b04b21af-2d8b-4af5-b9ad-1b84073588f5
|
Fixes #6780