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

Method isDeviceSuitable

code/25_sampler.cpp:1325–1340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1323 }
1324
1325 bool isDeviceSuitable(VkPhysicalDevice device) {
1326 QueueFamilyIndices indices = findQueueFamilies(device);
1327
1328 bool extensionsSupported = checkDeviceExtensionSupport(device);
1329
1330 bool swapChainAdequate = false;
1331 if (extensionsSupported) {
1332 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
1333 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
1334 }
1335
1336 VkPhysicalDeviceFeatures supportedFeatures;
1337 vkGetPhysicalDeviceFeatures(device, &supportedFeatures);
1338
1339 return indices.isComplete() && extensionsSupported && swapChainAdequate && supportedFeatures.samplerAnisotropy;
1340 }
1341
1342 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
1343 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected