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

Commit e0ced03e authored by Chris Forbes's avatar Chris Forbes
Browse files

vulkan: Only cancel buffers during swapchain creation if not shared

When a buffer queue is in shared mode, we're not allowed to cancel
buffers. Just keep the shared buffer dequeued all the time.

Test: build
Change-Id: I9ad4588ebd792ccdfee247d030579e2ef68aaef1
parent 97ef461b
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -1114,6 +1114,7 @@ VkResult CreateSwapchainKHR(VkDevice device,
    //
    // TODO(jessehall): The error path here is the same as DestroySwapchain,
    // but not the non-error path. Should refactor/unify.
    if (!swapchain->shared) {
        for (uint32_t i = 0; i < num_images; i++) {
            Swapchain::Image& img = swapchain->images[i];
            if (img.dequeued) {
@@ -1127,6 +1128,7 @@ VkResult CreateSwapchainKHR(VkDevice device,
                    dispatch.DestroyImage(device, img.image, nullptr);
            }
        }
    }

    if (result != VK_SUCCESS) {
        swapchain->~Swapchain();