Mesa (master): i965: Use the new message header format for FF_SYNC on gen6.

Eric Anholt anholt at kemper.freedesktop.org
Sat Jun 12 21:48:24 PDT 2010


Module: Mesa
Branch: master
Commit: 5dbbb48f46f99baeba3a24a8371029e216b931bb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5dbbb48f46f99baeba3a24a8371029e216b931bb

Author: Zhenyu Wang <zhenyuw at linux.intel.com>
Date:   Sat Jun 12 21:37:14 2010 -0700

i965: Use the new message header format for FF_SYNC on gen6.

---

 src/mesa/drivers/dri/i965/brw_eu_emit.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 34490b7..34dfe10 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -286,6 +286,7 @@ static void brw_set_ff_sync_message(struct brw_context *brw,
 				    GLuint response_length,
 				    GLboolean end_of_thread)
 {
+	struct intel_context *intel = &brw->intel;
 	brw_set_src1(insn, brw_imm_d(0));
 
 	insn->bits3.urb_gen5.opcode = 1; /* FF_SYNC */
@@ -298,8 +299,12 @@ static void brw_set_ff_sync_message(struct brw_context *brw,
 	insn->bits3.urb_gen5.response_length = response_length; /* may be 1 or 0 */
 	insn->bits3.urb_gen5.msg_length = 1;
 	insn->bits3.urb_gen5.end_of_thread = end_of_thread;
-	insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_URB;
-	insn->bits2.send_gen5.end_of_thread = end_of_thread;
+	if (intel->gen >= 6) {
+	   insn->header.destreg__conditionalmod = BRW_MESSAGE_TARGET_URB;
+	} else {
+	   insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_URB;
+	   insn->bits2.send_gen5.end_of_thread = end_of_thread;
+	}
 }
 
 static void brw_set_urb_message( struct brw_context *brw,



More information about the mesa-commit mailing list