| 600 | } |
| 601 | |
| 602 | bool isDeviceSuitable(VkPhysicalDevice device) { |
| 603 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 604 | |
| 605 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 606 | |
| 607 | bool swapChainAdequate = false; |
| 608 | if (extensionsSupported) { |
| 609 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 610 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 611 | } |
| 612 | |
| 613 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 614 | } |
| 615 | |
| 616 | bool checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 617 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected