| 514 | } |
| 515 | |
| 516 | bool isDeviceSuitable(VkPhysicalDevice device) { |
| 517 | QueueFamilyIndices indices = findQueueFamilies(device); |
| 518 | |
| 519 | bool extensionsSupported = checkDeviceExtensionSupport(device); |
| 520 | |
| 521 | bool swapChainAdequate = false; |
| 522 | if (extensionsSupported) { |
| 523 | SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device); |
| 524 | swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty(); |
| 525 | } |
| 526 | |
| 527 | return indices.isComplete() && extensionsSupported && swapChainAdequate; |
| 528 | } |
| 529 | |
| 530 | bool checkDeviceExtensionSupport(VkPhysicalDevice device) { |
| 531 | uint32_t extensionCount; |
nothing calls this directly
no test coverage detected