| 763 | } |
| 764 | |
| 765 | bool isDeviceSuitable(VkPhysicalDevice device) { |
| 766 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 767 | |
| 768 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 769 | |
| 770 | bool swapChainAdequate = false; |
| 771 | if (extensionsSupported) { |
| 772 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 773 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 774 | } |
| 775 | |
| 776 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 777 | } |
| 778 | |
| 779 | bool checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 780 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected