KhronosGroup / Vulkan-ValidationLayers

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

VK_HUAWEI_subpass_shading and VUID-VkPipelineShaderStageCreateInfo-pName-00707 #8563

Open Karpov-Ruslan opened 1 month ago

Karpov-Ruslan commented 1 month ago

Environment:

Describe the Issue

I used VK_HUAWEI_subpass_shading device extension, but faced with VVL error:

ERROR: [3012269921][VUID-VkPipelineShaderStageCreateInfo-pName-00707] : Validation Error: [ VUID-VkPipelineShaderStageCreateInfo-pName-00707 ] | MessageID = 0xb38b9761 | vkCreateComputePipelines(): pCreateInfos[0].stage.pName `main` entrypoint not found for stage VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI. The Vulkan spec states: pName must be the name of an OpEntryPoint in module with an execution model that matches stage (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkPipelineShaderStageCreateInfo-pName-00707)

, but I used example-like code from Vulkan Spec (Example at the bottom of the page).

Expected behavior

There should be no error.

Where to start the search

I think you can start with the ExecutionModelToShaderStageFlagBits function (location: <repo>/layers/state_tracker/shader_module.cpp), which is a little bit wrong:

Valid Usage IDs VUID-VkComputePipelineCreateInfo-stage-00701 VUID-VkPipelineShaderStageCreateInfo-pName-00707

spencer-lunarg commented 1 month ago

Thanks for reporting this (and the related spec issue https://github.com/KhronosGroup/Vulkan-Docs/issues/2438) !

For Vendor extensions we rely on vendors to add validation themselves, I have never used/looked at VK_HUAWEI_subpass_shading and couldn't write a test for it (which is what we need as well)

Happy to take PRs, but with all the other backlogs we have, I will not be able to get to this anytime in the near future

spencer-lunarg commented 1 month ago

cc @PanGao-h

PanGao-h commented 1 month ago

Got it. We'll fix it soon.

Karpov-Ruslan commented 1 month ago

Got it. We'll fix it soon.

That's great! I hope this also applies to https://github.com/KhronosGroup/Vulkan-Docs/issues/2438.