mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-13 05:30:16 +01:00
ac/nir/tess: Map linked LS/HS I/O based on TCS input mask.
With this change, LS/HS linking will not rely on driver locations anymore (driver locations are considered deprecated in NIR). Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29812>
This commit is contained in:
parent
b162c7962f
commit
d758bea8dd
1 changed files with 5 additions and 2 deletions
|
|
@ -286,7 +286,8 @@ lower_ls_output_store(nir_builder *b,
|
|||
nir_def *vertex_idx = nir_load_local_invocation_index(b);
|
||||
nir_def *base_off_var = nir_imul(b, vertex_idx, nir_load_lshs_vertex_stride_amd(b));
|
||||
|
||||
nir_def *io_off = ac_nir_calc_io_offset(b, intrin, nir_imm_int(b, 16u), 4u, st->map_io);
|
||||
unsigned mapped = ac_nir_map_io_location(io_sem.location, st->tcs_inputs_read, st->map_io);
|
||||
nir_def *io_off = ac_nir_calc_io_offset_mapped(b, intrin, nir_imm_int(b, 16u), 4u, mapped);
|
||||
unsigned write_mask = nir_intrinsic_write_mask(intrin);
|
||||
|
||||
nir_def *off = nir_iadd_nuw(b, base_off_var, io_off);
|
||||
|
|
@ -346,7 +347,9 @@ hs_per_vertex_input_lds_offset(nir_builder *b,
|
|||
|
||||
nir_def *tcs_in_current_patch_offset = nir_imul(b, rel_patch_id, tcs_in_patch_stride);
|
||||
|
||||
nir_def *io_offset = ac_nir_calc_io_offset(b, instr, nir_imm_int(b, 16u), 4u, st->map_io);
|
||||
const nir_io_semantics io_sem = nir_intrinsic_io_semantics(instr);
|
||||
const unsigned mapped = ac_nir_map_io_location(io_sem.location, st->tcs_inputs_read, st->map_io);
|
||||
nir_def *io_offset = ac_nir_calc_io_offset_mapped(b, instr, nir_imm_int(b, 16u), 4u, mapped);
|
||||
|
||||
return nir_iadd_nuw(b, nir_iadd_nuw(b, tcs_in_current_patch_offset, vertex_index_off), io_offset);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue