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

Commit c0f8a2ce authored by Yiwei Zhang's avatar Yiwei Zhang
Browse files

Vulkan: handle INVALID_OPERATION from BQ in the timeout case

If app dequeues too many buffers, then dequeueBuffer will return
INVALID_OPERATION. When ANI is called with a timeout which isn't
UINT64_MAX, ANI shouldn't return VK_ERROR_SURFACE_LOST_KHR.

Bug: 146534593
Bug: 155421312
Test: dEQP-VK.wsi.android.swapchain.acquire.too_many
Test: dEQP-VK.wsi.android.swapchain.acquire.too_many_timeout
Change-Id: Ie8ad8edb4632378247b9cbb715ed6eb7134ababb
parent 1b8793a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1478,7 +1478,7 @@ VkResult AcquireNextImageKHR(VkDevice device,
    ANativeWindowBuffer* buffer;
    int fence_fd;
    err = window->dequeueBuffer(window, &buffer, &fence_fd);
    if (err == android::TIMED_OUT) {
    if (err == android::TIMED_OUT || err == android::INVALID_OPERATION) {
        ALOGW("dequeueBuffer timed out: %s (%d)", strerror(-err), err);
        return timeout ? VK_TIMEOUT : VK_NOT_READY;
    } else if (err != android::OK) {