Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions nvvk/context_vk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,18 @@ std::vector<uint32_t> 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<VkExtensionProperties> extensionProperties = getDeviceExtensions(physicalDevice);
const std::vector<std::string> missingExtensions = checkEntryArray(extensionProperties, info.deviceExtensions);
Expand Down