nir/lower_int_to_float: Make sure the cursor is in the right spot.
We need to make get it updated after we may have nir_instr_remove()d an instruction, and when we cross blocks. This didn't really matter before because the only builder usage was idiv, which other users of lower_int_to_float were probably never hitting. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11329>
This commit is contained in:
@@ -49,6 +49,8 @@ lower_alu_instr(nir_builder *b, nir_alu_instr *alu)
|
||||
return false;
|
||||
}
|
||||
|
||||
b->cursor = nir_before_instr(&alu->instr);
|
||||
|
||||
/* Replacement SSA value */
|
||||
nir_ssa_def *rep = NULL;
|
||||
switch (alu->op) {
|
||||
|
||||
Reference in New Issue
Block a user