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

Method isDeviceSuitable

code/07_image_views.cpp:408–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

406 }
407
408 bool isDeviceSuitable(VkPhysicalDevice device) {
409 QueueFamilyIndices indices = findQueueFamilies(device);
410
411 bool extensionsSupported = checkDeviceExtensionSupport(device);
412
413 bool swapChainAdequate = false;
414 if (extensionsSupported) {
415 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
416 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
417 }
418
419 return indices.isComplete() && extensionsSupported && swapChainAdequate;
420 }
421
422 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
423 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected