Mesa (master): i965: Remove EOT parameter from brw_SAMPLE and brw_set_sampler_message.

Kenneth Graunke kwg at kemper.freedesktop.org
Tue Oct 18 15:57:12 PDT 2011


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Fri Oct  7 21:55:30 2011 -0700

i965: Remove EOT parameter from brw_SAMPLE and brw_set_sampler_message.

The existing code asserted that eot == 0, as it doesn't make sense for
a thread to sample a texture as the last thing it does.

It doesn't make much sense to pass around a dead parameter either.
Especially for a function which already has a long parameter list.

So, remove the parameter and just set EOT to 0.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/mesa/drivers/dri/i965/brw_eu.h        |    1 -
 src/mesa/drivers/dri/i965/brw_eu_emit.c   |   14 +++++---------
 src/mesa/drivers/dri/i965/brw_fs_emit.cpp |    1 -
 src/mesa/drivers/dri/i965/brw_wm_emit.c   |    2 --
 4 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index 18c2c2b..2f353b9 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -927,7 +927,6 @@ void brw_SAMPLE(struct brw_compile *p,
 		GLuint msg_type,
 		GLuint response_length,
 		GLuint msg_length,
-		bool eot,
 		GLuint header_present,
 		GLuint simd_mode);
 
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index d50ad17..36ed2ee 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -683,13 +683,11 @@ static void brw_set_sampler_message(struct brw_compile *p,
                                     GLuint msg_type,
                                     GLuint response_length,
                                     GLuint msg_length,
-                                    bool eot,
                                     GLuint header_present,
                                     GLuint simd_mode)
 {
    struct brw_context *brw = p->brw;
    struct intel_context *intel = &brw->intel;
-   assert(eot == 0);
    brw_set_src1(p, insn, brw_imm_d(0));
 
    if (intel->gen >= 7) {
@@ -700,7 +698,7 @@ static void brw_set_sampler_message(struct brw_compile *p,
       insn->bits3.sampler_gen7.header_present = header_present;
       insn->bits3.sampler_gen7.response_length = response_length;
       insn->bits3.sampler_gen7.msg_length = msg_length;
-      insn->bits3.sampler_gen7.end_of_thread = eot;
+      insn->bits3.sampler_gen7.end_of_thread = 0;
       insn->header.destreg__conditionalmod = BRW_SFID_SAMPLER;
    } else if (intel->gen >= 5) {
       insn->bits3.sampler_gen5.binding_table_index = binding_table_index;
@@ -710,12 +708,12 @@ static void brw_set_sampler_message(struct brw_compile *p,
       insn->bits3.sampler_gen5.header_present = header_present;
       insn->bits3.sampler_gen5.response_length = response_length;
       insn->bits3.sampler_gen5.msg_length = msg_length;
-      insn->bits3.sampler_gen5.end_of_thread = eot;
+      insn->bits3.sampler_gen5.end_of_thread = 0;
       if (intel->gen >= 6)
 	  insn->header.destreg__conditionalmod = BRW_SFID_SAMPLER;
       else {
 	  insn->bits2.send_gen5.sfid = BRW_SFID_SAMPLER;
-	  insn->bits2.send_gen5.end_of_thread = eot;
+	  insn->bits2.send_gen5.end_of_thread = 0;
       }
    } else if (intel->is_g4x) {
       insn->bits3.sampler_g4x.binding_table_index = binding_table_index;
@@ -723,7 +721,7 @@ static void brw_set_sampler_message(struct brw_compile *p,
       insn->bits3.sampler_g4x.msg_type = msg_type;
       insn->bits3.sampler_g4x.response_length = response_length;
       insn->bits3.sampler_g4x.msg_length = msg_length;
-      insn->bits3.sampler_g4x.end_of_thread = eot;
+      insn->bits3.sampler_g4x.end_of_thread = 0;
       insn->bits3.sampler_g4x.msg_target = BRW_SFID_SAMPLER;
    } else {
       insn->bits3.sampler.binding_table_index = binding_table_index;
@@ -732,7 +730,7 @@ static void brw_set_sampler_message(struct brw_compile *p,
       insn->bits3.sampler.return_format = BRW_SAMPLER_RETURN_FORMAT_FLOAT32;
       insn->bits3.sampler.response_length = response_length;
       insn->bits3.sampler.msg_length = msg_length;
-      insn->bits3.sampler.end_of_thread = eot;
+      insn->bits3.sampler.end_of_thread = 0;
       insn->bits3.sampler.msg_target = BRW_SFID_SAMPLER;
    }
 }
@@ -2135,7 +2133,6 @@ void brw_SAMPLE(struct brw_compile *p,
 		GLuint msg_type,
 		GLuint response_length,
 		GLuint msg_length,
-		bool eot,
 		GLuint header_present,
 		GLuint simd_mode)
 {
@@ -2230,7 +2227,6 @@ void brw_SAMPLE(struct brw_compile *p,
 			      msg_type,
 			      response_length, 
 			      msg_length,
-			      eot,
 			      header_present,
 			      simd_mode);
    }
diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
index a0db8aa..88a9999 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
@@ -343,7 +343,6 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src)
 	      msg_type,
 	      rlen,
 	      inst->mlen,
-	      0,
 	      inst->header_present,
 	      simd_mode);
 }
diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c
index 0736421..a451d56 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c
@@ -1161,7 +1161,6 @@ void emit_tex(struct brw_wm_compile *c,
 	      msg_type,
 	      response_length,
 	      cur_mrf - 1,
-	      0,
 	      1,
 	      simd_mode);
 }
@@ -1240,7 +1239,6 @@ void emit_txb(struct brw_wm_compile *c,
 	      msg_type,
 	      response_length,
 	      msgLength,
-	      0,	
 	      1,
 	      BRW_SAMPLER_SIMD_MODE_SIMD16);	
 }



More information about the mesa-commit mailing list