| 678 | } |
| 679 | |
| 680 | bool isDeviceSuitable(VkPhysicalDevice device) { |
| 681 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 682 | |
| 683 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 684 | |
| 685 | bool swapChainAdequate = false; |
| 686 | if (extensionsSupported) { |
| 687 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 688 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 689 | } |
| 690 | |
| 691 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 692 | } |
| 693 | |
| 694 | bool checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 695 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected