anv: do not dereference VkPipelineMultisampleStateCreateInfo always

VkGraphicsPipelineCreateInfo.pMultisampleState is a pointer to a
VkPipelineMultisampleStateCreateInfo structure, and is ignored if the
pipeline has rasterization disabled.

Fixes a crash in one CTS tests that checks this.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11601>
This commit is contained in:
Samuel Iglesias Gonsálvez 2021-06-25 10:14:21 +02:00 committed by Marge Bot
parent a9fd4fa26c
commit e791b2045a

View file

@ -2180,6 +2180,7 @@ copy_non_dynamic_state(struct anv_graphics_pipeline *pipeline,
}
const VkPipelineMultisampleStateCreateInfo *ms_info =
pCreateInfo->pRasterizationState->rasterizerDiscardEnable ? NULL :
pCreateInfo->pMultisampleState;
if (states & ANV_CMD_DIRTY_DYNAMIC_SAMPLE_LOCATIONS) {
const VkPipelineSampleLocationsStateCreateInfoEXT *sl_info = ms_info ?