From a680671d95bf7b3846cb20f1cbfc1c405db0511b Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Thu, 17 Jun 2021 18:30:14 +0100 Subject: cube: Handle occlusion where currentExtent == 0xFFFFFFFF The Vulkan spec states that: "On some platforms, it is normal that maxImageExtent may become (0, 0), for example when the window is minimized. In such a case, it is not possible to create a swapchain due to the Valid Usage requirements." Yet vkcube previously only handled this path for platforms where currentExtent != 0xFFFFFFFF. --- cube/cube.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cube') diff --git a/cube/cube.c b/cube/cube.c index faaed11f..c3440f87 100644 --- a/cube/cube.c +++ b/cube/cube.c @@ -1237,7 +1237,7 @@ static void demo_prepare_buffers(struct demo *demo) { demo->height = surfCapabilities.currentExtent.height; } - if (demo->width == 0 || demo->height == 0) { + if (surfCapabilities.maxImageExtent.width == 0 || surfCapabilities.maxImageExtent.height == 0) { demo->is_minimized = true; return; } else { -- cgit v1.2.3