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

Commit f8e23023 authored by Tom Murphy's avatar Tom Murphy Committed by Android (Google) Code Review
Browse files

Merge "Tidy up dispatch to GPDIFP2 in swapchain" into main

parents 9d84eae5 6c9ce49b
Loading
Loading
Loading
Loading
+8 −17
Original line number Original line 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.sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2;
        image_format_properties.pNext = &ahb_usage;
        image_format_properties.pNext = &ahb_usage;


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


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