| 967 | } |
| 968 | |
| 969 | bool vkRenderer::isDeviceSuitable(VkPhysicalDevice device) { |
| 970 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 971 | |
| 972 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 973 | |
| 974 | bool swapChainAdequate = false; |
| 975 | if (extensionsSupported) { |
| 976 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 977 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 978 | } |
| 979 | |
| 980 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 981 | } |
| 982 | |
| 983 | bool vkRenderer::checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 984 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected