Skip to content

vkr: Use vkGetDeviceQueue with queues that created with flags zero

Andrii Pauk requested to merge apauk/virglrenderer:vkr-fix-get-queue into master

This is a fix for segfault issue, because of usage of uninitialized vkQueue handle.

Spec 1 states that vkGetDeviceQueue must only be used to get queues that were created with the flags parameter of VkDeviceQueueCreateInfo set to zero. To get queues that were created with a non-zero flags parameter use vkGetDeviceQueue2.

The problem that in case queue was created with flags set to zero following vkGetDeviceQueue2 call will fail. By failing I mean that pQueue set to NULL, which later leads to segfault.

This problem was also reported by vulkan validation layer:

vkr: vkGetDeviceQueue2: value of pQueueInfo->flags must not be 0. The Vulkan spec states: flags must not be 0 (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkDeviceQueueInfo2-flags-requiredbitmask)

Signed-off-by: Andrii Pauk Andrii.Pauk@opensynergy.com

Merge request reports

Loading