Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21861>
* This marks the output store instruction as not feeding the next shader
* stage. If the instruction has no other use, it's removed.
*/
-void nir_remove_varying(nir_intrinsic_instr *intr)
+bool
+nir_remove_varying(nir_intrinsic_instr *intr)
{
nir_io_semantics sem = nir_intrinsic_io_semantics(intr);
/* Demote the store instruction. */
sem.no_varying = true;
nir_intrinsic_set_io_semantics(intr, sem);
+ return false;
} else {
nir_instr_remove(&intr->instr);
+ return true;
}
}
bool nir_slot_is_sysval_output(gl_varying_slot slot);
bool nir_slot_is_varying(gl_varying_slot slot);
bool nir_slot_is_sysval_output_and_varying(gl_varying_slot slot);
-void nir_remove_varying(nir_intrinsic_instr *intr);
+bool nir_remove_varying(nir_intrinsic_instr *intr);
void nir_remove_sysval_output(nir_intrinsic_instr *intr);
bool nir_lower_amul(nir_shader *shader,