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

Method isDeviceSuitable

code/30_multisampling.cpp:1625–1640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1623 }
1624
1625 bool isDeviceSuitable(VkPhysicalDevice device) {
1626 QueueFamilyIndices indices = findQueueFamilies(device);
1627
1628 bool extensionsSupported = checkDeviceExtensionSupport(device);
1629
1630 bool swapChainAdequate = false;
1631 if (extensionsSupported) {
1632 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
1633 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
1634 }
1635
1636 VkPhysicalDeviceFeatures supportedFeatures;
1637 vkGetPhysicalDeviceFeatures(device, &supportedFeatures);
1638
1639 return indices.isComplete() && extensionsSupported && swapChainAdequate && supportedFeatures.samplerAnisotropy;
1640 }
1641
1642 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
1643 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected