| 863 | } |
| 864 | |
| 865 | bool isDeviceSuitable(VkPhysicalDevice device) { |
| 866 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 867 | |
| 868 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 869 | |
| 870 | bool swapChainAdequate = false; |
| 871 | if (extensionsSupported) { |
| 872 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 873 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 874 | } |
| 875 | |
| 876 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 877 | } |
| 878 | |
| 879 | bool checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 880 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected