intel/brw: Make a ubld temporary in emit_barrier()
Saves typing .exec_all() in a lot of places. Backport-to: 24.2 Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31499>
This commit is contained in:
committed by
Marge Bot
parent
a9d9488788
commit
7c9eb8b289
@@ -2931,6 +2931,7 @@ emit_barrier(nir_to_brw_state &ntb)
|
||||
{
|
||||
const intel_device_info *devinfo = ntb.devinfo;
|
||||
const fs_builder &bld = ntb.bld;
|
||||
const fs_builder ubld = bld.exec_all();
|
||||
fs_visitor &s = ntb.s;
|
||||
|
||||
/* We are getting the barrier ID from the compute shader header */
|
||||
@@ -2939,26 +2940,25 @@ emit_barrier(nir_to_brw_state &ntb)
|
||||
brw_reg payload = brw_vgrf(s.alloc.allocate(1), BRW_TYPE_UD);
|
||||
|
||||
/* Clear the message payload */
|
||||
bld.exec_all().group(8, 0).MOV(payload, brw_imm_ud(0u));
|
||||
ubld.group(8, 0).MOV(payload, brw_imm_ud(0u));
|
||||
|
||||
if (devinfo->verx10 >= 125) {
|
||||
setup_barrier_message_payload_gfx125(bld, payload);
|
||||
} else {
|
||||
assert(gl_shader_stage_is_compute(s.stage));
|
||||
|
||||
const uint32_t barrier_id_mask =
|
||||
devinfo->ver == 9 ? 0x8f000000u : 0x7f000000u;
|
||||
brw_reg barrier_id_mask =
|
||||
brw_imm_ud(devinfo->ver == 9 ? 0x8f000000u : 0x7f000000u);
|
||||
|
||||
/* Copy the barrier id from r0.2 to the message payload reg.2 */
|
||||
brw_reg r0_2 = brw_reg(retype(brw_vec1_grf(0, 2), BRW_TYPE_UD));
|
||||
bld.exec_all().group(1, 0).AND(component(payload, 2), r0_2,
|
||||
brw_imm_ud(barrier_id_mask));
|
||||
ubld.group(1, 0).AND(component(payload, 2), r0_2, barrier_id_mask);
|
||||
}
|
||||
|
||||
/* Emit a gateway "barrier" message using the payload we set up, followed
|
||||
* by a wait instruction.
|
||||
*/
|
||||
bld.exec_all().emit(SHADER_OPCODE_BARRIER, reg_undef, payload);
|
||||
ubld.emit(SHADER_OPCODE_BARRIER, reg_undef, payload);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user