diff --git a/src/venus/vkr_device.c b/src/venus/vkr_device.c index 4b069f2..5b7f2ea 100644 --- a/src/venus/vkr_device.c +++ b/src/venus/vkr_device.c @@ -32,7 +32,14 @@ vkr_device_create_queues(struct vkr_context *ctx, .queueIndex = j, }; VkQueue handle = VK_NULL_HANDLE; - vkGetDeviceQueue2(dev->base.handle.device, &info, &handle); + /* There was a bug in spec which forbids usage of vkGetDeviceQueue2 + * with flags set to zero. It was fixed in spec version 1.1.130. + * Work around drivers that are implementing this buggy behavior + */ + if (info.flags) + vkGetDeviceQueue2(dev->base.handle.device, &info, &handle); + else + vkGetDeviceQueue(dev->base.handle.device, info.queueFamilyIndex, info.queueIndex, &handle); struct vkr_queue *queue = vkr_queue_create( ctx, dev, info.flags, info.queueFamilyIndex, info.queueIndex, handle);