vulkan: use standard sample locations if there's no VkPipelineSampleLocationsStateCreateInfoEXT

If the pipeline is created with no
VkPipelineSampleLocationsStateCreateInfoEXT, but
VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT is set, we end up
dereferencing a NULL pointer.

Fixes future dEQP-VK.pipeline.*.extended_dynamic_state.*.sample_locations_enable_no_create_info

Fixes: 1deb83fb86 ("vulkan: Add more dynamic multisample states")

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31377>
This commit is contained in:
Iván Briano
2024-09-25 15:15:20 -07:00
committed by Marge Bot
parent 09e64e3682
commit 101a803858
+1 -1
View File
@@ -782,7 +782,7 @@ vk_multisample_sample_locations_state_init(
assert(ms->sample_locations == NULL);
if (!IS_DYNAMIC(MS_SAMPLE_LOCATIONS)) {
if (ms->sample_locations_enable) {
if (sl_info && ms->sample_locations_enable) {
vk_sample_locations_state_init(sl, &sl_info->sampleLocationsInfo);
ms->sample_locations = sl;
} else if (!IS_DYNAMIC(MS_RASTERIZATION_SAMPLES)) {