mesa/src/intel
Jason Ekstrand 49778a7253 intel/rt: Add support for scratch in ray-tracing shaders
In ray-tracing shader stages, we have a real call stack and so we can't
use the normal scratch mechanism.  Instead, the invocation's stack lives
in a memory region of the RT scratch buffer that sits after the HW ray
stacks.  We handle this by asking nir_lower_io to lower local variables
to 64-bit global memory access.  Unlike nir_lower_io for 32-bit offset
scratch, when 64-bit global access is requested, nir_lower_io generates
an address calculation which starts from a load_scratch_base_ptr.  We
then lower this intrinsic to the appropriate address calculation in
brw_nir_lower_rt_intrinsics.

When a COMPUTE_WALKER command is sent to the hardware with the BTD Mode
bit set to true, the hardware generates a set of stack IDs, one for each
invocation.  These then get passed along from one shader invocation to
the next as we trace the ray.  We can use those stack IDs to figure out
which stack our invocation needs to access.  Because we may not be the
first shader in the stack, there's a per-stack offset that gets stored
in the "hotzone".

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7356>
2020-11-25 05:37:10 +00:00
..
blorp util: Add helgrind support for simple_mtx 2020-11-24 21:03:34 +00:00
common util: Add helgrind support for simple_mtx 2020-11-24 21:03:34 +00:00
compiler intel/rt: Add support for scratch in ray-tracing shaders 2020-11-25 05:37:10 +00:00
dev intel/rt: Add a brw_rt.h header with #defines for basic RT data structures 2020-11-25 05:37:09 +00:00
genxml intel/genxml: Add BVH data structures 2020-11-25 05:37:09 +00:00
isl util: Add helgrind support for simple_mtx 2020-11-24 21:03:34 +00:00
perf intel: remove dead code 2020-11-02 19:58:56 +00:00
tools intel/dump_gpu: add support for MMAP_OFFSET ioctl 2020-11-10 13:25:11 +00:00
vulkan Revert "anv/image: Define anv_image_get_aux_addr (v3)" 2020-11-17 23:27:42 -06:00
Android.blorp.mk
Android.common.mk intel: split driver/device UUID generators 2020-10-07 11:11:23 +03:00
Android.compiler.mk
Android.dev.mk intel: add identifier for debug purposes 2020-05-20 15:58:22 +00:00
Android.genxml.mk genxml: drop gen10 2020-10-20 07:56:40 +00:00
Android.isl.mk intel/isl: Don't generate Gen10-specific functions 2020-10-15 09:29:54 -07:00
Android.mk
Android.perf.mk
Android.vulkan.mk anv: Don't generate Gen10-specific functions 2020-10-15 09:29:54 -07:00
Makefile.perf.am
Makefile.sources intel/rt: Add lowering functions for each ray-tracing stage 2020-11-25 05:37:10 +00:00
meson.build