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

Commit 87e3dd86 authored by Ian Elliott's avatar Ian Elliott
Browse files

RE-SkiaVk: Use vkGetDeviceQueue2 instead of vkGetDeviceQueue

The original code violated the spec.  Since RE-SkiaVk can create a
queue with the VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT flag, it must use
vkGetDeviceQueue2 instead of vkGetDeviceQueue.

Test: Inspection and logcat
Bug: 266943585
Change-Id: I5a8d406ef08fba9293a2b93a4c7ca3fed736993d
parent 8e8f543a
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -444,8 +444,11 @@ VulkanInterface initVulkanInterface(bool protectedContent = false) {
    ALOGD("Trying to create Vk device with protectedContent=%d (success)", protectedContent);
    ALOGD("Trying to create Vk device with protectedContent=%d (success)", protectedContent);


    VkQueue graphicsQueue;
    VkQueue graphicsQueue;
    VK_GET_DEV_PROC(device, GetDeviceQueue);
    VK_GET_DEV_PROC(device, GetDeviceQueue2);
    vkGetDeviceQueue(device, graphicsQueueIndex, 0, &graphicsQueue);
    const VkDeviceQueueInfo2 deviceQueueInfo2 = {VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2, nullptr,
                                                 deviceQueueCreateFlags,
                                                 (uint32_t)graphicsQueueIndex, 0};
    vkGetDeviceQueue2(device, &deviceQueueInfo2, &graphicsQueue);


    VK_GET_DEV_PROC(device, DeviceWaitIdle);
    VK_GET_DEV_PROC(device, DeviceWaitIdle);
    VK_GET_DEV_PROC(device, DestroyDevice);
    VK_GET_DEV_PROC(device, DestroyDevice);