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

Method isDeviceSuitable

code/15_hello_triangle.cpp:765–777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

763 }
764
765 bool isDeviceSuitable(VkPhysicalDevice device) {
766 QueueFamilyIndices indices = findQueueFamilies(device);
767
768 bool extensionsSupported = checkDeviceExtensionSupport(device);
769
770 bool swapChainAdequate = false;
771 if (extensionsSupported) {
772 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
773 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
774 }
775
776 return indices.isComplete() && extensionsSupported && swapChainAdequate;
777 }
778
779 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
780 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected