| 1000 | } |
| 1001 | |
| 1002 | bool isDeviceSuitable(VkPhysicalDevice device) { |
| 1003 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 1004 | |
| 1005 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 1006 | |
| 1007 | bool swapChainAdequate = false; |
| 1008 | if (extensionsSupported) { |
| 1009 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 1010 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 1011 | } |
| 1012 | |
| 1013 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 1014 | } |
| 1015 | |
| 1016 | bool checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 1017 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected