intel/rt/nir: enable the trampoline shader to load the indirect ray shader bsr
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>
This commit is contained in:

committed by
Marge Bot

parent
af3f7948d1
commit
6202a2c6b4
@@ -439,11 +439,27 @@ brw_nir_create_raygen_trampoline(const struct brw_compiler *compiler,
|
||||
* raygen BSR address here; the global data we'll deal with later.
|
||||
*/
|
||||
b.shader->num_uniforms = 32;
|
||||
nir_ssa_def *raygen_bsr_addr =
|
||||
nir_ssa_def *raygen_param_bsr_addr =
|
||||
load_trampoline_param(&b, raygen_bsr_addr, 1, 64);
|
||||
nir_ssa_def *is_indirect =
|
||||
nir_i2b(&b, load_trampoline_param(&b, is_indirect, 1, 8));
|
||||
nir_ssa_def *local_shift =
|
||||
nir_u2u32(&b, load_trampoline_param(&b, local_group_size_log2, 3, 8));
|
||||
|
||||
nir_ssa_def *raygen_indirect_bsr_addr;
|
||||
nir_push_if(&b, is_indirect);
|
||||
{
|
||||
raygen_indirect_bsr_addr =
|
||||
nir_load_global_constant(&b, raygen_param_bsr_addr,
|
||||
8 /* align */,
|
||||
1 /* components */,
|
||||
64 /* bit_size */);
|
||||
}
|
||||
nir_pop_if(&b, NULL);
|
||||
|
||||
nir_ssa_def *raygen_bsr_addr =
|
||||
nir_if_phi(&b, raygen_indirect_bsr_addr, raygen_param_bsr_addr);
|
||||
|
||||
nir_ssa_def *global_id = nir_load_workgroup_id_zero_base(&b);
|
||||
nir_ssa_def *simd_channel = nir_load_subgroup_invocation(&b);
|
||||
nir_ssa_def *local_x =
|
||||
|
Reference in New Issue
Block a user