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

Method isDeviceSuitable

code/26_texture_mapping.cpp:1355–1370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1353 }
1354
1355 bool isDeviceSuitable(VkPhysicalDevice device) {
1356 QueueFamilyIndices indices = findQueueFamilies(device);
1357
1358 bool extensionsSupported = checkDeviceExtensionSupport(device);
1359
1360 bool swapChainAdequate = false;
1361 if (extensionsSupported) {
1362 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
1363 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
1364 }
1365
1366 VkPhysicalDeviceFeatures supportedFeatures;
1367 vkGetPhysicalDeviceFeatures(device, &supportedFeatures);
1368
1369 return indices.isComplete() && extensionsSupported && swapChainAdequate && supportedFeatures.samplerAnisotropy;
1370 }
1371
1372 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
1373 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected