KhronosGroup / Vulkan-Docs

The Vulkan API Specification and related tools
Other
2.77k stars 465 forks source link

Contradictory VK_HUAWEI_subpass_shading with VUID-VkComputePipelineCreateInfo-stage-00701 #2438

Open Karpov-Ruslan opened 2 weeks ago

Karpov-Ruslan commented 2 weeks ago

VK_HUAWEI_subpass_shading gives the example of pipeline creation (I copied only the problematic part):

VkPipelineShaderStageCreateInfo subpassShadingPipelineStageCreateInfo {
  VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, NULL,
  0, VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI,
  shaderModule, "main",
  &subpassShadingConstants
};

VkComputePipelineCreateInfo subpassShadingComputePipelineCreateInfo = {
  VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO, &subpassShadingPipelineCreateInfo,
  0, &subpassShadingPipelineStageCreateInfo,
  pipelineLayout, basePipelineHandle, basePipelineIndex
};

As you can see, when specifying the pipeline stage, the VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI value is used. But VUID-VkComputePipelineCreateInfo-stage-00701 says: "The stage member of stage must be VK_SHADER_STAGE_COMPUTE_BIT". Such a contradiction leads to incorrect operation of the VVL.

I suggest changing the VUID-VkComputePipelineCreateInfo-stage-00701 to "The stage member of stage must be either VK_SHADER_STAGE_COMPUTE_BIT or VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI"