diff --git a/nvvk/context_vk.cpp b/nvvk/context_vk.cpp index 4465312f..20f3e406 100644 --- a/nvvk/context_vk.cpp +++ b/nvvk/context_vk.cpp @@ -1061,6 +1061,18 @@ std::vector Context::getCompatibleDevices(const ContextCreateInfo& inf if(info.verboseCompatibleDevices) LOGI("%d: %s\n", elemId, props.deviceName); + /*! + * \bug Since the getDeviceExtensions() will return all extensions, when passing an argument of CPU device. + * Hence we have to skip the CPU-type device. + * Especially, when user wants to enable the "VK_KHR_ray_tracing_pipeline" extension, it will return a + * wrong compatible device to user, provided that not skip the CPU type. + */ + if (props.deviceType == VK_PHYSICAL_DEVICE_TYPE_OTHER || props.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU) + { + LOGI(" - this device is of CPU type\n"); + continue; + } + // Check if the device has all the requested extensions const std::vector extensionProperties = getDeviceExtensions(physicalDevice); const std::vector missingExtensions = checkEntryArray(extensionProperties, info.deviceExtensions);