From: Jean-Philippe Bruyère Date: Sat, 22 Jan 2022 13:55:00 +0000 (+0100) Subject: check sample count support on device creation X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=5e785c24745e0f30764132a9e8ee0db6d85742cb;p=jp%2Fvkvg.git check sample count support on device creation --- 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} };