brw: Add more specific brw_builder helpers

Replace uses of brw_builder::at() with various more descriptive
variants.  Use block pointer from instruction when possible.

A couple of special cases remained and will be handled in separate patches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34681>
This commit is contained in:
Caio Oliveira
2025-04-02 16:12:45 -07:00
committed by Marge Bot
parent 6c5132ec9a
commit ac2b072312
10 changed files with 52 additions and 18 deletions
+2 -2
View File
@@ -3813,11 +3813,11 @@ emit_is_helper_invocation(nir_to_brw_state &ntb, brw_reg result)
brw_inst *mov = b.MOV(offset(result, b, i), brw_imm_ud(~0));
/* The at() ensures that any code emitted to get the predicate happens
/* The before() ensures that any code emitted to get the predicate happens
* before the mov right above. This is not an issue elsewhere because
* lowering code already set up the builder this way.
*/
brw_emit_predicate_on_sample_mask(b.at(NULL, mov), mov);
brw_emit_predicate_on_sample_mask(b.before(mov), mov);
mov->predicate_inverse = true;
}
}