diff options
| author | Joshua Ashton <joshua@froggi.es> | 2021-06-17 18:30:14 +0100 |
|---|---|---|
| committer | jeremyk-lunarg <jeremyk@lunarg.com> | 2021-06-17 13:12:11 -0600 |
| commit | a680671d95bf7b3846cb20f1cbfc1c405db0511b (patch) | |
| tree | 2f64206c0232ee10036deb95e2e9db5ea931d34b /cube/cube.c | |
| parent | 66d9c4c09b44ac0e05fd86925f43404109521943 (diff) | |
| download | usermoji-a680671d95bf7b3846cb20f1cbfc1c405db0511b.tar.xz | |
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.
Diffstat (limited to 'cube/cube.c')
| -rw-r--r-- | cube/cube.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |
