| 1275 | } |
| 1276 | |
| 1277 | bool isDeviceSuitable(VkPhysicalDevice device) { |
| 1278 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 1279 | |
| 1280 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 1281 | |
| 1282 | bool swapChainAdequate = false; |
| 1283 | if (extensionsSupported) { |
| 1284 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 1285 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 1286 | } |
| 1287 | |
| 1288 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 1289 | } |
| 1290 | |
| 1291 | bool checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 1292 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected