intel/rt: Add support for hit attributes
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 6 Aug 2020 21:42:14 +0000 (16:42 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 25 Nov 2020 05:37:10 +0000 (05:37 +0000)
commitf7e24e559fb632eae54e444b022db9da35922258
tree8aca91015424714f64d07c7cbceeb6509a4d4c5c
parent96fde5518b5c47550f0f42f3a0504ccbdc4a4e92
intel/rt: Add support for hit attributes

For triangle geometry, the hit attributes are always two floats which
contain the barycentric coordinates of the hit.  For procedural
geometry, they're an arbitrary blob of data passed from the intersection
shader to the hit shaders.  In our implementation, we stash that data
right after the HW RayQuery in the ray stack.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7356>
src/intel/compiler/brw_nir_rt.c