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

Commit 8e951d52 authored by Yiwei Zhang's avatar Yiwei Zhang
Browse files

swapchain: add a case for minImageCount in capabilities

When creating a swapchain around a single-buffered SurfaceTexture, the
VkSurfaceCapabilitiesKHR structure obtained was giving a minImageCount
of 2 and a maxImageCount of 1, which should both be 1 in this case.

Test: create a swapchain around a single-buffered SurfaceTexture should
give back 1 as minImageCount from VkSurfaceCapabilitiesKHR
Bug: b/77825831

Change-Id: Ic42c29a93c6e9c818dbf735be5ce10b58cdb44d9
parent 0c7c5d6c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -580,7 +580,7 @@ VkResult GetPhysicalDeviceSurfaceCapabilitiesKHR(
              strerror(-err), err);
        return VK_ERROR_SURFACE_LOST_KHR;
    }
    capabilities->minImageCount = 2;
    capabilities->minImageCount = max_buffer_count == 1 ? 1 : 2;
    capabilities->maxImageCount = static_cast<uint32_t>(max_buffer_count);

    capabilities->currentExtent =