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

Method isDeviceSuitable

code/31_compute_shader.cpp:1277–1289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1275 }
1276
1277 bool isDeviceSuitable(VkPhysicalDevice device) {
1278 QueueFamilyIndices indices = findQueueFamilies(device);
1279
1280 bool extensionsSupported = checkDeviceExtensionSupport(device);
1281
1282 bool swapChainAdequate = false;
1283 if (extensionsSupported) {
1284 SwapChainSupportDetails swapChainSupport = querySwapChainSupport(device);
1285 swapChainAdequate = !swapChainSupport.formats.empty() && !swapChainSupport.presentModes.empty();
1286 }
1287
1288 return indices.isComplete() && extensionsSupported && swapChainAdequate;
1289 }
1290
1291 bool checkDeviceExtensionSupport(VkPhysicalDevice device) {
1292 uint32_t extensionCount;

Callers

nothing calls this directly

Calls 1

isCompleteMethod · 0.45

Tested by

no test coverage detected