KhronosGroup / Vulkan-ValidationLayers

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

Missing link-time checks when using PerPrimitiveEXT #8398

Open godlikepanos opened 3 weeks ago

godlikepanos commented 3 weeks ago

Describe the situation in which you encountered the missing validation I have a graphics pipeline with some output variable (storage class: Output) that is written from the mesh shader and consumed by the fragment shader (storage class: Input). This variable is decorated with PerPrimitiveEXT in the mesh shader but it's not decorated in the fragment shader. This mismatch of decorations is not caught by the validation layers and it leads to rendering errors in some implementations.

This bug is very easy to trigger when using HLSL. HLSL has the primitives keyword (which is the equivalent of PerPrimitiveEXT) but this keyword is not supported in fragment shaders. This HLSL anomaly can lead to a situation where the graphics pipeline works in DX12, it works on Vulkan with nVidia but it doesn't work on other IHVs and the reason is very difficult to figure out.

Valid Usage IDs requested ???? Not sure what that means. I was looking at 15.1.3. Interface Matching in the spec.

Additional Context N/A

spencer-lunarg commented 3 weeks ago

Yes, seems there missing spec language around this, @pmistryNV can you look into this? (we currently are so backlogged and won't be getting to Mesh Shading for a while)

pmistryNV commented 3 weeks ago

Please assign it to me