anv: fix null pointer access

Reproduces with dEQP-VK.pipeline.no_queues.pipeline_binary.compute

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 595889018a ("anv: implement VK_KHR_maintenance9")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit dad8f65611)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41402>
This commit is contained in:
Lionel Landwerlin 2026-04-28 11:50:49 +03:00 committed by Eric Engestrom
parent 5e04ef4306
commit 1ad28db0f1
2 changed files with 2 additions and 1 deletions

View file

@ -2874,7 +2874,7 @@
"description": "anv: fix null pointer access",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "595889018ad4fa3e2c593a13d640c9eee26336c7",
"notes": null

View file

@ -317,6 +317,7 @@ anv_i915_device_setup_context(struct anv_device *device,
/* Check if client specified queue priority. */
const VkDeviceQueueGlobalPriorityCreateInfoKHR *queue_priority =
num_queues == 0 ? NULL :
vk_find_struct_const(pCreateInfo->pQueueCreateInfos[0].pNext,
DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR);