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

Commit c634b7e2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "swapchain: Fix auto-merger defect: Fix SHARED presentation modes"

parents bdda63d1 12b7e2fc
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1236,6 +1236,12 @@ VkResult CreateSwapchainKHR(VkDevice device,
        return VK_ERROR_SURFACE_LOST_KHR;
    }

    // In shared mode the num_images must be one regardless of how many
    // buffers were allocated for the buffer queue.
    if (swapchain_image_usage & VK_SWAPCHAIN_IMAGE_USAGE_SHARED_BIT_ANDROID) {
        num_images = 1;
    }

    int32_t legacy_usage = 0;
    if (dispatch.GetSwapchainGrallocUsage2ANDROID) {
        uint64_t consumer_usage, producer_usage;