nir: return progress from nir_remove_sysval_output

Changing IO semantics doesn't affect the SSA structure.

Same as nir_remove_varying.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26274>
This commit is contained in:
Marek Olšák 2023-11-18 22:37:27 -05:00 committed by Marge Bot
parent 32ee6376ad
commit 27a9ddad28
2 changed files with 4 additions and 2 deletions

View file

@ -3371,7 +3371,7 @@ nir_remove_varying(nir_intrinsic_instr *intr, gl_shader_stage next_shader)
* This marks the output store instruction as not feeding fixed-function * This marks the output store instruction as not feeding fixed-function
* logic. If the instruction has no other use, it's removed. * logic. If the instruction has no other use, it's removed.
*/ */
void bool
nir_remove_sysval_output(nir_intrinsic_instr *intr) nir_remove_sysval_output(nir_intrinsic_instr *intr)
{ {
nir_io_semantics sem = nir_intrinsic_io_semantics(intr); nir_io_semantics sem = nir_intrinsic_io_semantics(intr);
@ -3381,8 +3381,10 @@ nir_remove_sysval_output(nir_intrinsic_instr *intr)
/* Demote the store instruction. */ /* Demote the store instruction. */
sem.no_sysval_output = true; sem.no_sysval_output = true;
nir_intrinsic_set_io_semantics(intr, sem); nir_intrinsic_set_io_semantics(intr, sem);
return false;
} else { } else {
nir_instr_remove(&intr->instr); nir_instr_remove(&intr->instr);
return true;
} }
} }

View file

@ -5148,7 +5148,7 @@ bool nir_slot_is_varying(gl_varying_slot slot);
bool nir_slot_is_sysval_output_and_varying(gl_varying_slot slot, bool nir_slot_is_sysval_output_and_varying(gl_varying_slot slot,
gl_shader_stage next_shader); gl_shader_stage next_shader);
bool nir_remove_varying(nir_intrinsic_instr *intr, gl_shader_stage next_shader); bool nir_remove_varying(nir_intrinsic_instr *intr, gl_shader_stage next_shader);
void nir_remove_sysval_output(nir_intrinsic_instr *intr); bool nir_remove_sysval_output(nir_intrinsic_instr *intr);
bool nir_lower_amul(nir_shader *shader, bool nir_lower_amul(nir_shader *shader,
int (*type_size)(const struct glsl_type *, bool)); int (*type_size)(const struct glsl_type *, bool));