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

Method isDeviceSuitable

code/19_vertex_buffer.cpp:921–933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

919 }
920
921 bool isDeviceSuitable(VkPhysicalDevice device) {
922 QueueFamilyIndices indices = findQueueFamilies(device);
923
924 bool extensionsSupported = checkDeviceExtensionSupport(device);
925
926 bool swapChainAdequate = false;
927 if (extensionsSupported) {
928 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
929 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
930 }
931
932 return indices.isComplete() && extensionsSupported && swapChainAdequate;
933 }
934
935 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
936 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected