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

Method isDeviceSuitable

code/29_mipmapping.cpp:1575–1590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1573 }
1574
1575 bool isDeviceSuitable(VkPhysicalDevice device) {
1576 QueueFamilyIndices indices = findQueueFamilies(device);
1577
1578 bool extensionsSupported = checkDeviceExtensionSupport(device);
1579
1580 bool swapChainAdequate = false;
1581 if (extensionsSupported) {
1582 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
1583 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
1584 }
1585
1586 VkPhysicalDeviceFeatures supportedFeatures;
1587 vkGetPhysicalDeviceFeatures(device, &supportedFeatures);
1588
1589 return indices.isComplete() && extensionsSupported && swapChainAdequate && supportedFeatures.samplerAnisotropy;
1590 }
1591
1592 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
1593 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected