From c5dc6cdf26a8d2bf51a2a9a08b53eefcc00e74f0 Mon Sep 17 00:00:00 2001 From: Ben Widawsky Date: Tue, 26 Jan 2016 15:42:08 -0800 Subject: [PATCH] i965/skl: Utilize new 5th bit for gateway messages Cc: Jordan Justen Signed-off-by: Ben Widawsky --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 0ff5cd6de19..4011bf5a2b7 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -926,6 +926,8 @@ void fs_visitor::emit_barrier() { assert(devinfo->gen >= 7); + const uint32_t barrier_id_mask = + devinfo->gen >= 9 ? 0x8f000000u : 0x0f000000u; /* We are getting the barrier ID from the compute shader header */ assert(stage == MESA_SHADER_COMPUTE); @@ -939,7 +941,7 @@ fs_visitor::emit_barrier() /* Copy bits 27:24 of r0.2 (barrier id) to the message payload reg.2 */ fs_reg r0_2 = fs_reg(retype(brw_vec1_grf(0, 2), BRW_REGISTER_TYPE_UD)); - pbld.AND(component(payload, 2), r0_2, brw_imm_ud(0x0f000000u)); + pbld.AND(component(payload, 2), r0_2, brw_imm_ud(barrier_id_mask)); /* Emit a gateway "barrier" message using the payload we set up, followed * by a wait instruction. -- 2.30.2