MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / isSuitableDevice

Method isSuitableDevice

cpp/5_Domain_Specific/simpleVulkan/VulkanBaseApp.cpp:533–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531}
532
533bool VulkanBaseApp::isSuitableDevice(VkPhysicalDevice dev) const
534{
535 uint32_t graphicsQueueIndex, presentQueueIndex;
536 std::vector<const char *> deviceExtensions = getRequiredDeviceExtensions();
537 VkSurfaceCapabilitiesKHR caps;
538 std::vector<VkSurfaceFormatKHR> formats;
539 std::vector<VkPresentModeKHR> presentModes;
540 deviceExtensions.push_back(VK_KHR_SWAPCHAIN_EXTENSION_NAME);
541 getSwapChainProperties(dev, m_surface, caps, formats, presentModes);
542 return hasAllExtensions(dev, deviceExtensions) && !formats.empty() && !presentModes.empty()
543 && findGraphicsQueueIndicies(dev, m_surface, graphicsQueueIndex, presentQueueIndex);
544}
545
546void VulkanBaseApp::createDevice()
547{

Callers

nothing calls this directly

Calls 5

getSwapChainPropertiesFunction · 0.70
hasAllExtensionsFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected