| 1130 | } |
| 1131 | |
| 1132 | bool isDeviceSuitable(VkPhysicalDevice device) { |
| 1133 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 1134 | |
| 1135 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 1136 | |
| 1137 | bool swapChainAdequate = false; |
| 1138 | if (extensionsSupported) { |
| 1139 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 1140 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 1141 | } |
| 1142 | |
| 1143 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 1144 | } |
| 1145 | |
| 1146 | bool checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 1147 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected