mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 16:18:06 +02:00
ac/nir/esgs: Don't emit ES outputs that aren't read by GS.
This is necessary to prevent a regression from a future commit, in order to allow us to map output locations differently. 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
6d83389a39
commit
ed6499db6b
1 changed files with 7 additions and 0 deletions
|
|
@ -150,6 +150,13 @@ lower_es_output_store(nir_builder *b,
|
|||
}
|
||||
|
||||
lower_esgs_io_state *st = (lower_esgs_io_state *) state;
|
||||
|
||||
/* When an ES output isn't read by GS, don't emit anything. */
|
||||
if ((io_sem.no_varying || !(st->gs_inputs_read & BITFIELD64_BIT(io_sem.location)))) {
|
||||
nir_instr_remove(&intrin->instr);
|
||||
return true;
|
||||
}
|
||||
|
||||
const unsigned write_mask = nir_intrinsic_write_mask(intrin);
|
||||
|
||||
b->cursor = nir_before_instr(&intrin->instr);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue