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

Method isDeviceSuitable

code/11_render_passes.cpp:551–563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

549 }
550
551 bool isDeviceSuitable(VkPhysicalDevice device) {
552 QueueFamilyIndices indices = findQueueFamilies(device);
553
554 bool extensionsSupported = checkDeviceExtensionSupport(device);
555
556 bool swapChainAdequate = false;
557 if (extensionsSupported) {
558 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
559 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
560 }
561
562 return indices.isComplete() && extensionsSupported && swapChainAdequate;
563 }
564
565 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
566 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected