anv: fix push constant lowering with bindless shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9fa1cdfe7f
("intel/rt: Implement push constants as global memory reads")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13529>
This commit is contained in:

committed by
Marge Bot

parent
f16961f222
commit
a6031cd9bd
@@ -149,12 +149,21 @@ anv_nir_compute_push_layout(const struct anv_physical_device *pdevice,
|
||||
|
||||
nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr);
|
||||
switch (intrin->intrinsic) {
|
||||
case nir_intrinsic_load_push_constant:
|
||||
case nir_intrinsic_load_push_constant: {
|
||||
/* With bindless shaders we load uniforms with SEND
|
||||
* messages. All the push constants are located after the
|
||||
* RT_DISPATCH_GLOBALS. We just need to add the offset to
|
||||
* the address right after RT_DISPATCH_GLOBALS (see
|
||||
* brw_nir_lower_rt_intrinsics.c).
|
||||
*/
|
||||
unsigned base_offset =
|
||||
brw_shader_stage_is_bindless(nir->info.stage) ? 0 : push_start;
|
||||
intrin->intrinsic = nir_intrinsic_load_uniform;
|
||||
nir_intrinsic_set_base(intrin,
|
||||
nir_intrinsic_base(intrin) -
|
||||
push_start);
|
||||
base_offset);
|
||||
break;
|
||||
}
|
||||
|
||||
case nir_intrinsic_load_desc_set_address_intel: {
|
||||
b->cursor = nir_before_instr(&intrin->instr);
|
||||
|
Reference in New Issue
Block a user