Skip to content

intel/compiler: Add support for ray-tracing

This merge request adds ray-tracing support to the Intel shader compiler in Mesa. This is the first instalment of many to add ray-tracing support to the Intel Linux Vulkan driver. This MR is based on top of !6479 (merged) which adds SPIR-V support for ray-tracing.

At a high-level, this MR contains the following:

  1. A new gen_device_info::has_ray_tracing flag to delimit platforms with ray-tracing support
  2. GenXML representations of various ray-tracing data structures
  3. Back-end compiler support for the new bindless thread dispatch (BTD) model on top of which Intel's ray-tracing implementation is built
  4. Back-end compiler support for the new ray traversal hardware (closely related to the BTD hardware)
  5. Lots of NIR code for lowering the high-level ray-tracing concepts in the Vulkan ray-tracing API to bindless shaders.

While obviously not everything required for ray-tracing, this is a good chunk. These patches have been fairly stable for some time now and are working well. (I have only 3 undiagnosed potentially compiler-related CTS failures.) I'd like to get these merged upstream and start shrinking the internal patch pile.

Notably not included in this MR are:

  1. Platform support for a platform which has ray-tracing
  2. Vulkan driver code for compiling ray-tracing pipelines
  3. Vulkan driver code for managing acceleration structures
  4. Vulkan driver code for dispatching rays

Those will all be coming in due course. Vulkan Ray-tracing is basically a whole new 3D rendering API so there are a lot of pieces. The driver patches are in a somewhat annoying spot right now because they're based on the latest version of the Vulkan ray-tracing API which isn't public yet. I could rebase them on the provisional API from January but then we'd have to deal with fixing them up once the final API gets released. They're also entirely internal to the driver and don't break every time @anholt decides to rework liveness analysis in NIR. 😛

Happy reviewing!

Merge request reports