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

Method isDeviceSuitable

code/13_framebuffers.cpp:602–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600 }
601
602 bool isDeviceSuitable(VkPhysicalDevice device) {
603 QueueFamilyIndices indices = findQueueFamilies(device);
604
605 bool extensionsSupported = checkDeviceExtensionSupport(device);
606
607 bool swapChainAdequate = false;
608 if (extensionsSupported) {
609 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
610 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
611 }
612
613 return indices.isComplete() && extensionsSupported && swapChainAdequate;
614 }
615
616 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
617 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected