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

Commit 7f77139d authored by Chris Forbes's avatar Chris Forbes Committed by android-build-merger
Browse files

Merge "vulkan: Don't dequeue in AcquireNextImageKHR if in shared mode" into oc-dev am: fc812651

am: 832d257d

Change-Id: Ida79268f40209a9e2e39e9c1182742299750265e
parents 356fc4f7 832d257d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1210,6 +1210,16 @@ VkResult AcquireNextImageKHR(VkDevice device,
        timeout != UINT64_MAX,
        "vkAcquireNextImageKHR: non-infinite timeouts not yet implemented");

    if (swapchain.shared) {
        // In shared mode, we keep the buffer dequeued all the time, so we don't
        // want to dequeue a buffer here. Instead, just ask the driver to ensure
        // the semaphore and fence passed to us will be signalled.
        *image_index = 0;
        result = GetData(device).driver.AcquireImageANDROID(
                device, swapchain.images[*image_index].image, -1, semaphore, vk_fence);
        return result;
    }

    ANativeWindowBuffer* buffer;
    int fence_fd;
    err = window->dequeueBuffer(window, &buffer, &fence_fd);