diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 00860a06a86..b78fa575a4b 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -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 * logic. If the instruction has no other use, it's removed. */ -void +bool nir_remove_sysval_output(nir_intrinsic_instr *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. */ sem.no_sysval_output = true; nir_intrinsic_set_io_semantics(intr, sem); + return false; } else { nir_instr_remove(&intr->instr); + return true; } } diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 40417cdfb09..76502c7f5e1 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -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, 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, int (*type_size)(const struct glsl_type *, bool));