| 406 | } |
| 407 | |
| 408 | bool isDeviceSuitable(VkPhysicalDevice device) { |
| 409 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 410 | |
| 411 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 412 | |
| 413 | bool swapChainAdequate = false; |
| 414 | if (extensionsSupported) { |
| 415 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 416 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 417 | } |
| 418 | |
| 419 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 420 | } |
| 421 | |
| 422 | bool checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 423 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected