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

Method isDeviceSuitable

code/18_vertex_input.cpp:865–877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

863 }
864
865 bool isDeviceSuitable(VkPhysicalDevice device) {
866 QueueFamilyIndices indices = findQueueFamilies(device);
867
868 bool extensionsSupported = checkDeviceExtensionSupport(device);
869
870 bool swapChainAdequate = false;
871 if (extensionsSupported) {
872 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
873 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
874 }
875
876 return indices.isComplete() && extensionsSupported && swapChainAdequate;
877 }
878
879 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
880 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected