Mesa (main): anv: do not dereference VkPipelineMultisampleStateCreateInfo always
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 25 14:55:38 UTC 2021
Module: Mesa
Branch: main
Commit: e791b2045a47e95b4d63910add3ecdbcacf52d1f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e791b2045a47e95b4d63910add3ecdbcacf52d1f
Author: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
Date: Fri Jun 25 10:14:21 2021 +0200
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 at igalia.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11601>
---
src/intel/vulkan/anv_pipeline.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 2855e36cc17..5f8b9589b4c 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -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 ?
More information about the mesa-commit
mailing list