MCPcopy Create free account
hub / github.com/Overv/VulkanTutorial / isDeviceSuitable

Method isDeviceSuitable

code/14_command_buffers.cpp:680–692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

678 }
679
680 bool isDeviceSuitable(VkPhysicalDevice device) {
681 QueueFamilyIndices indices = findQueueFamilies(device);
682
683 bool extensionsSupported = checkDeviceExtensionSupport(device);
684
685 bool swapChainAdequate = false;
686 if (extensionsSupported) {
687 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
688 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
689 }
690
691 return indices.isComplete() && extensionsSupported && swapChainAdequate;
692 }
693
694 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
695 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected