vulkan: Multisample state isn't always included in fragment shader state

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>
This commit is contained in:
Jason Ekstrand 2022-07-20 15:38:28 -05:00 committed by Marge Bot
parent 50411bd786
commit cc84d4ca66
1 changed files with 21 additions and 1 deletions

View File

@ -1119,7 +1119,27 @@ vk_graphics_pipeline_state_fill(const struct vk_device *device,
if (lib & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT) {
needs |= MESA_VK_GRAPHICS_STATE_FRAGMENT_SHADING_RATE_BIT;
needs |= MESA_VK_GRAPHICS_STATE_MULTISAMPLE_BIT;
/* From the Vulkan 1.3.218 spec:
*
* "Fragment shader state is defined by:
* ...
* - VkPipelineMultisampleStateCreateInfo if sample shading is
* enabled or renderpass is not VK_NULL_HANDLE"
*
* and
*
* VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-06629
*
* "If the pipeline is being created with fragment shader state
* pMultisampleState must be NULL or a valid pointer to a valid
* VkPipelineMultisampleStateCreateInfo structure"
*
* so we can reliably detect when to include it based on the
* pMultisampleState pointer.
*/
if (info->pMultisampleState != NULL)
needs |= MESA_VK_GRAPHICS_STATE_MULTISAMPLE_BIT;
/* From the Vulkan 1.3.218 spec:
*