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

Method isDeviceSuitable

code/10_fixed_functions.cpp:516–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected