| 1285 | } |
| 1286 | |
| 1287 | bool isDeviceSuitable(VkPhysicalDevice device) { |
| 1288 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 1289 | |
| 1290 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 1291 | |
| 1292 | bool swapChainAdequate = false; |
| 1293 | if (extensionsSupported) { |
| 1294 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 1295 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 1296 | } |
| 1297 | |
| 1298 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 1299 | } |
| 1300 | |
| 1301 | bool checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 1302 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected