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

Method isDeviceSuitable

code/28_model_loading.cpp:1481–1496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1479 }
1480
1481 bool isDeviceSuitable(VkPhysicalDevice device) {
1482 QueueFamilyIndices indices = findQueueFamilies(device);
1483
1484 bool extensionsSupported = checkDeviceExtensionSupport(device);
1485
1486 bool swapChainAdequate = false;
1487 if (extensionsSupported) {
1488 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
1489 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
1490 }
1491
1492 VkPhysicalDeviceFeatures supportedFeatures;
1493 vkGetPhysicalDeviceFeatures(device, &supportedFeatures);
1494
1495 return indices.isComplete() && extensionsSupported && swapChainAdequate && supportedFeatures.samplerAnisotropy;
1496 }
1497
1498 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
1499 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected