KhronosGroup / Vulkan-Docs

The Vulkan API Specification and related tools
Other
2.8k stars 467 forks source link

Shader VUIDs that really belong to draw calls #2223

Open Rua opened 1 year ago

Rua commented 1 year ago

VkPipelineShaderStageCreateInfo has some VUIDs that can't really be validated:

The behaviour of the shader regarding these variables can depend on the inputs to the shader, so it's not known at the time a pipeline is created. They can only be known when all inputs are known, which is at draw time.

HansKristian-Work commented 1 year ago

These belong to SPIR-V runtime validation I think. Would you like to create a PR?

Rua commented 1 year ago

What determines whether a VUID goes in runtime SPIR-V validation or in vkCmdDraw and relatives?

HansKristian-Work commented 1 year ago

If it's something you can validate without knowing SPIR-V it's vkCmdDraw, if it's related to what SPIR-V does it's SPIR-V validation.

Rua commented 1 year ago

But then at what time exactly are the runtime SPIR-V VUIDs supposed to be valid(ated)? Some of them can be checked at pipeline creation, while others (like these) can only be known at draw/dispatch time. Placing them under the appropriate command would make that clearer than lumping under the runtime SPIR-V validation. Or perhaps separating the runtime SPIR-V validation section into multiple sections based on when they are to be validated.