Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-09039 refers to pMultisampleState, not pRasterizationState #2498

Open
w-pearson opened this issue Feb 26, 2025 · 2 comments

Comments

@w-pearson
Copy link

Hello, currently VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-09039 reads:

If VkGraphicsPipelineLibraryCreateInfoEXT::flags includes VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, and related dynamic state is not set, then pMultisampleState must be a valid pointer to a valid VkPipelineMultisampleStateCreateInfo structure

This is a bit weird, as multisample state is not listed in the Pre-Rasterization Shader State section (only in Fragment Shader State and Fragment Output State, and the name refers to pRasterizationState instead of pMultisampleState. Also, the nearby VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-06601 and VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-09040 refer to pRasterizationState.

This is currently unimplemented in Vulkan-ValidationLayers (though the exact reason why is in a private repo I don't have access to).

Is there actually a case where pMultisampleState must be valid in pre-rasterization shader state, or is this a mistake in the spec?

@spencer-lunarg
Copy link

This is currently unimplemented in Vulkan-ValidationLayers

So there is no way for validation to know if the pointer is "valid" other than

  1. Making sure it is not NULL
  2. Making sure the pointer we read has a sType for VkPipelineMultisampleStateCreateInfo

Both are already done by generated VUs like VUID-VkPipelineMultisampleStateCreateInfo-sType-sType so there was nothing to add


I also fully agree this VU is confusing and my internal change request was to just remove these as I personally feel they are not required

@w-pearson
Copy link
Author

That part mostly makes sense, and applies equally to VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-09027 (which is also unimplemented). My issue is more that this VU says that pMultisampleState is part of pre rasterization shader state even though it's not listed there in the graphics pipeline state subsets sections), and there are no VUs indicating that it must match other libraries (unlike e.g. VUID-VkGraphicsPipelineCreateInfo-flags-06633 through 06635, which say that the fragment shader state and fragment output state need to have identically-defined pMultisampleStates).

For context, I am working on an analysis tool that needs to link pipeline libraries, and this VU mentioning pMultisampleState with pre rasterization shader state confused me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants