From 50b21fb6e41c3d7f91c96c8c8d8e88ee434b7d78 Mon Sep 17 00:00:00 2001 From: Mykhailo Skorokhodov Date: Sun, 19 Jun 2022 23:56:12 +0300 Subject: [PATCH] anv: Use sampleLocationsEnable for sample locations The spec says: "sampleLocationsEnable controls whether custom sample locations are used. If sampleLocationsEnable is VK_FALSE, the default sample locations are used and the values specified in sampleLocationsInfo are ignored." Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6675 Signed-off-by: Mykhailo Skorokhodov Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 2f15034ebe8..9f2c78284db 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -2292,7 +2292,7 @@ copy_non_dynamic_state(struct anv_graphics_pipeline *pipeline, default: unreachable("invalid sample count"); } - if (sl_info) { + if (sl_info && sl_info->sampleLocationsEnable) { const VkSampleLocationEXT *positions = sl_info->sampleLocationsInfo.pSampleLocations; for (uint32_t i = 0; i < samples; i++) {