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

Method isDeviceSuitable

code/27_depth_buffering.cpp:1435–1450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1433 }
1434
1435 bool isDeviceSuitable(VkPhysicalDevice device) {
1436 QueueFamilyIndices indices = findQueueFamilies(device);
1437
1438 bool extensionsSupported = checkDeviceExtensionSupport(device);
1439
1440 bool swapChainAdequate = false;
1441 if (extensionsSupported) {
1442 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
1443 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
1444 }
1445
1446 VkPhysicalDeviceFeatures supportedFeatures;
1447 vkGetPhysicalDeviceFeatures(device, &supportedFeatures);
1448
1449 return indices.isComplete() && extensionsSupported && swapChainAdequate && supportedFeatures.samplerAnisotropy;
1450 }
1451
1452 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
1453 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected