Skip to content

Commit

Permalink
Fall back to ray query if ray tracing is not available
Browse files Browse the repository at this point in the history
Make sure that "cl_ray_tracing_api auto" works with drivers that only
support VK_KHR_ray_query.
  • Loading branch information
cwabbott0 committed May 20, 2024
1 parent d9c994b commit 3c9a40c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/refresh/vkpt/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1069,16 +1069,21 @@ init_vulkan(void)

if (picked_driver_ray_query == VK_DRIVER_ID_NVIDIA_PROPRIETARY)
{
// Pick KHR_ray_query on NVIDIA drivers, if available.
// Prefer KHR_ray_query on NVIDIA drivers, if available.
qvk.use_ray_query = true;
picked_device = picked_device_with_ray_query;
}
else if (picked_device_with_ray_pipeline >= 0)
{
// Pick KHR_ray_tracing_pipeline otherwise
// Prefer KHR_ray_tracing_pipeline otherwise
qvk.use_ray_query = false;
picked_device = picked_device_with_ray_pipeline;
}
else if (picked_device_with_ray_query >= 0)
{
qvk.use_ray_query = true;
picked_device = picked_device_with_ray_query;
}
}

if (picked_device < 0)
Expand Down

0 comments on commit 3c9a40c

Please sign in to comment.