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

Commit 6c9ce49b authored by Chris Forbes's avatar Chris Forbes Committed by Tom Murphy
Browse files

Tidy up dispatch to GPDIFP2 in swapchain

Bug: b/346650750
Test: n/a
Change-Id: I22eba5cffcd86b671b69097ba087b795ad1732b2
parent 9659e345
Loading
Loading
Loading
Loading
+8 −17
Original line number Diff line number Diff line
@@ -1473,24 +1473,15 @@ static VkResult getProducerUsage(const VkDevice& device,
        image_format_properties.sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2;
        image_format_properties.pNext = &ahb_usage;

        if (instance_dispatch.GetPhysicalDeviceImageFormatProperties2) {
            VkResult result = instance_dispatch.GetPhysicalDeviceImageFormatProperties2(
        VkResult result = GetPhysicalDeviceImageFormatProperties2(
            pdev, &image_format_info, &image_format_properties);
        if (result != VK_SUCCESS) {
                ALOGE("VkGetPhysicalDeviceImageFormatProperties2 for AHB usage failed: %d", result);
                return VK_ERROR_SURFACE_LOST_KHR;
            }
        }
        else {
            VkResult result = instance_dispatch.GetPhysicalDeviceImageFormatProperties2KHR(
                pdev, &image_format_info,
                &image_format_properties);
            if (result != VK_SUCCESS) {
                ALOGE("VkGetPhysicalDeviceImageFormatProperties2KHR for AHB usage failed: %d",
            ALOGE(
                "VkGetPhysicalDeviceImageFormatProperties2 for AHB usage "
                "failed: %d",
                result);
            return VK_ERROR_SURFACE_LOST_KHR;
        }
        }

        // Determine if USAGE_FRONT_BUFFER is needed.
        // GPDIFP2 has no means of using VkSwapchainImageUsageFlagsANDROID when