diff --git a/src/gfx_device_vulkan.cpp b/src/gfx_device_vulkan.cpp index f1d1002..965d1e9 100644 --- a/src/gfx_device_vulkan.cpp +++ b/src/gfx_device_vulkan.cpp @@ -492,11 +492,12 @@ namespace engine::gfx { queueCreateInfos.push_back(queueCreateInfo); } - VkBool32 supported; - res = vkGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, graphicsFamilyIndex.value(), m_surface->getHandle(), &supported); + // check the physical device is compatible with the surface + VkBool32 graphicsQueueCanPresent; + res = vkGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, graphicsFamilyIndex.value(), m_surface->getHandle(), &graphicsQueueCanPresent); assert(res == VK_SUCCESS); - if (supported != VK_TRUE) { - throw std::runtime_error("The selected physical device and queue family do not support this surface"); + if (graphicsQueueCanPresent != VK_TRUE) { + throw std::runtime_error("The selected queue family does not support this surface"); } VkDeviceCreateInfo deviceCreateInfo{