| 447 | } |
| 448 | |
| 449 | bool isDeviceSuitable(VkPhysicalDevice device) { |
| 450 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 451 | |
| 452 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 453 | |
| 454 | bool swapChainAdequate = false; |
| 455 | if (extensionsSupported) { |
| 456 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 457 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 458 | } |
| 459 | |
| 460 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 461 | } |
| 462 | |
| 463 | bool checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 464 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected