From 5e785c24745e0f30764132a9e8ee0db6d85742cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Sat, 22 Jan 2022 14:55:00 +0100 Subject: [PATCH] check sample count support on device creation --- src/vkvg_device.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vkvg_device.c b/src/vkvg_device.c index 37a1c94..c893d2b 100644 --- a/src/vkvg_device.c +++ b/src/vkvg_device.c @@ -60,6 +60,13 @@ VkvgDevice vkvg_device_create(VkSampleCountFlags samples, bool deferredResolve) if (!_try_get_phyinfo(phys, phyCount, VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, &pi)) pi = phys[0]; + if (!(pi->properties.limits.framebufferColorSampleCounts&samples)) { + LOG(VKVG_LOG_ERR, "CREATE Device failed: sample count not supported: %d\n", samples); + vkh_app_free_phyinfos (phyCount, phys); + vkh_app_destroy (app); + return NULL; + } + uint32_t qCount = 0; float qPriorities[] = {0.0}; VkDeviceQueueCreateInfo pQueueInfos[] = { {0},{0},{0} }; -- 2.47.3