| 919 | } |
| 920 | |
| 921 | bool isDeviceSuitable(VkPhysicalDevice device) { |
| 922 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 923 | |
| 924 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 925 | |
| 926 | bool swapChainAdequate = false; |
| 927 | if (extensionsSupported) { |
| 928 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 929 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 930 | } |
| 931 | |
| 932 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 933 | } |
| 934 | |
| 935 | bool checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 936 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected