When using nir_lower_interpolation, we need to propagate the IO
semantics from the load_interpolated_input to the new
load_fs_input_interp_deltas intrinsics. nir_lower_io assumes
they will be filled out.
This fixes assertions in most tests on iris since commit
01ab308edc78cda777bc66f2e8110fbd8c21aa18, where nir_lower_io
started reading this field.
Fixes: 01ab308edc7 ("nir: update IO semantics in nir_io_add_const_offset_to_base")
Fixes: 502abfce7f5 ("nir: save IO semantics in lowered IO intrinsics")
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6450>
# float result = iid.x + iid.y * bary.y + iid.z * bary.x
intrinsic("load_fs_input_interp_deltas", src_comp=[1], dest_comp=3,
- indices=[BASE, COMPONENT], flags=[CAN_ELIMINATE, CAN_REORDER])
+ indices=[BASE, COMPONENT, IO_SEMANTICS], flags=[CAN_ELIMINATE, CAN_REORDER])
# Load operations pull data from some piece of GPU memory. All load
# operations operate in terms of offsets into some piece of theoretical
nir_intrinsic_set_base(load_iid, nir_intrinsic_base(intr));
nir_intrinsic_set_component(load_iid,
nir_intrinsic_component(intr) + i);
+ nir_intrinsic_set_io_semantics(load_iid,
+ nir_intrinsic_io_semantics(intr));
nir_builder_instr_insert(b, &load_iid->instr);
nir_ssa_def *iid = &load_iid->dest.ssa;