Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f646a00 authored by Yiwei Zhang's avatar Yiwei Zhang Committed by Jesse Hall
Browse files

vkGetDeviceQueue2: add a NULL check

The current driver::GetDeviceQueue2() will indeed crash if the
driver returns a NULL queue, which it is supposed to do if the
pQueueInfo->flags doesn't match the flags requested for the queue
family. Thus need to add a NULL check for pQueue here in case.

Test: deqp vulkancts test
Bug: b/72867433
Change-Id: I306c1a1db52a9986801357eaeb357536ecb0428e

vkGetDeviceQueue2: fix the NULL check

Contents of VkQueue* needs to be checked against VK_NULL_HANDLE

Test: dEQP-VK.api.device_init.create_device_queue2*
Bug: b/72867433
Change-Id: I39643a75497ef4e59823c6bb90760d34b81f5865
parent d3bd842f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1157,7 +1157,7 @@ void GetDeviceQueue2(VkDevice device,
    const auto& data = GetData(device);

    data.driver.GetDeviceQueue2(device, pQueueInfo, pQueue);
    SetData(*pQueue, data);
    if (*pQueue != VK_NULL_HANDLE) SetData(*pQueue, data);
}

VKAPI_ATTR VkResult