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

Commit 12b7e2fc authored by Ian Elliott's avatar Ian Elliott
Browse files

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

Part of aosp/1921342 did not end up in goog/master.  This fixes that.

Test: dEQP.EGL/functional_mutable_render_buffer_basic
Bug: 209035115
Bug: 200378297
Change-Id: Id5bf9c5af8e60184f575517e3209482953535a20
parent 9b5a47ce
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;