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

Commit 2d6ec527 authored by Anders Frostad Pedersen's avatar Anders Frostad Pedersen Committed by android-build-merger
Browse files

Merge "Vulkan: Improve error translation in CreateSwapChainKHR" am: 46ba04df

am: f5a264a6

Change-Id: I2e6093779a49da642a85bd328ada8d977fa4209e
parents 0cd1eecc f5a264a6
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1302,9 +1302,16 @@ VkResult CreateSwapchainKHR(VkDevice device,
            // TODO(jessehall): Improve error reporting. Can we enumerate
            // possible errors and translate them to valid Vulkan result codes?
            ALOGE("dequeueBuffer[%u] failed: %s (%d)", i, strerror(-err), err);
            switch (-err) {
                case ENOMEM:
                    result = VK_ERROR_OUT_OF_DEVICE_MEMORY;
                    break;
                default:
                    result = VK_ERROR_SURFACE_LOST_KHR;
                    break;
            }
            break;
        }
        img.buffer = buffer;
        img.dequeued = true;