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

Method isDeviceSuitable

code/21_index_buffer.cpp:1002–1014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1000 }
1001
1002 bool isDeviceSuitable(VkPhysicalDevice device) {
1003 QueueFamilyIndices indices = findQueueFamilies(device);
1004
1005 bool extensionsSupported = checkDeviceExtensionSupport(device);
1006
1007 bool swapChainAdequate = false;
1008 if (extensionsSupported) {
1009 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
1010 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
1011 }
1012
1013 return indices.isComplete() && extensionsSupported && swapChainAdequate;
1014 }
1015
1016 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
1017 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected