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

Method isDeviceSuitable

code/09_shader_modules.cpp:449–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447 }
448
449 bool isDeviceSuitable(VkPhysicalDevice device) {
450 QueueFamilyIndices indices = findQueueFamilies(device);
451
452 bool extensionsSupported = checkDeviceExtensionSupport(device);
453
454 bool swapChainAdequate = false;
455 if (extensionsSupported) {
456 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
457 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
458 }
459
460 return indices.isComplete() && extensionsSupported && swapChainAdequate;
461 }
462
463 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
464 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected