| 549 | } |
| 550 | |
| 551 | bool isDeviceSuitable(VkPhysicalDevice device) { |
| 552 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 553 | |
| 554 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 555 | |
| 556 | bool swapChainAdequate = false; |
| 557 | if (extensionsSupported) { |
| 558 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 559 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 560 | } |
| 561 | |
| 562 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 563 | } |
| 564 | |
| 565 | bool checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 566 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected