Mesa (master): i965: Rename BRW_SAMPLER_MESSAGE_... _GEN5 to GEN5_SAMPLER_MESSAGE.

Kenneth Graunke kwg at kemper.freedesktop.org
Wed Mar 16 20:56:23 UTC 2011


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Mar 16 00:06:59 2011 -0700

i965: Rename BRW_SAMPLER_MESSAGE_..._GEN5 to GEN5_SAMPLER_MESSAGE.

We already have lots of GEN6_* defines; this seems more consistent.

---

 src/mesa/drivers/dri/i965/brw_defines.h |   14 +++++++-------
 src/mesa/drivers/dri/i965/brw_fs.cpp    |   12 ++++++------
 src/mesa/drivers/dri/i965/brw_wm_emit.c |    8 ++++----
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
index 5496b4f..403e05d 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -688,13 +688,13 @@
 #define BRW_SAMPLER_MESSAGE_SIMD8_LD                  3
 #define BRW_SAMPLER_MESSAGE_SIMD16_LD                 3
 
-#define BRW_SAMPLER_MESSAGE_SAMPLE_GEN5            0
-#define BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_GEN5       1
-#define BRW_SAMPLER_MESSAGE_SAMPLE_LOD_GEN5        2
-#define BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_GEN5    3
-#define BRW_SAMPLER_MESSAGE_SAMPLE_DERIVS_GEN5     4
-#define BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_COMPARE_GEN5 5
-#define BRW_SAMPLER_MESSAGE_SAMPLE_LOD_COMPARE_GEN5 6
+#define GEN5_SAMPLER_MESSAGE_SAMPLE              0
+#define GEN5_SAMPLER_MESSAGE_SAMPLE_BIAS         1
+#define GEN5_SAMPLER_MESSAGE_SAMPLE_LOD          2
+#define GEN5_SAMPLER_MESSAGE_SAMPLE_COMPARE      3
+#define GEN5_SAMPLER_MESSAGE_SAMPLE_DERIVS       4
+#define GEN5_SAMPLER_MESSAGE_SAMPLE_BIAS_COMPARE 5
+#define GEN5_SAMPLER_MESSAGE_SAMPLE_LOD_COMPARE  6
 
 /* for GEN5 only */
 #define BRW_SAMPLER_SIMD_MODE_SIMD4X2                   0
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 2c997b4..8cc4166 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2313,23 +2313,23 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src)
       switch (inst->opcode) {
       case FS_OPCODE_TEX:
 	 if (inst->shadow_compare) {
-	    msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_GEN5;
+	    msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_COMPARE;
 	 } else {
-	    msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_GEN5;
+	    msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE;
 	 }
 	 break;
       case FS_OPCODE_TXB:
 	 if (inst->shadow_compare) {
-	    msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_COMPARE_GEN5;
+	    msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_BIAS_COMPARE;
 	 } else {
-	    msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_GEN5;
+	    msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_BIAS;
 	 }
 	 break;
       case FS_OPCODE_TXL:
 	 if (inst->shadow_compare) {
-	    msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_LOD_COMPARE_GEN5;
+	    msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_LOD_COMPARE;
 	 } else {
-	    msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_LOD_GEN5;
+	    msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_LOD;
 	 }
 	 break;
       case FS_OPCODE_TXD:
diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c
index 2336e27..ecfd21d 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c
@@ -1134,9 +1134,9 @@ void emit_tex(struct brw_wm_compile *c,
 
    if (intel->gen >= 5) {
       if (shadow)
-	 msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_GEN5;
+	 msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_COMPARE;
       else
-	 msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_GEN5;
+	 msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE;
    } else {
       /* Note that G45 and older determines shadow compare and dispatch width
        * from message length for most messages.
@@ -1186,14 +1186,14 @@ void emit_txb(struct brw_wm_compile *c,
     */
    if (c->dispatch_width == 16 || intel->gen < 5) {
       if (intel->gen >= 5)
-	 msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_GEN5;
+	 msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_BIAS;
       else
 	 msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS;
       mrf_per_channel = 2;
       dst_retyped = retype(vec16(dst[0]), BRW_REGISTER_TYPE_UW);
       response_length = 8;
    } else {
-      msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_GEN5;
+      msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_BIAS;
       mrf_per_channel = 1;
       dst_retyped = retype(vec8(dst[0]), BRW_REGISTER_TYPE_UW);
       response_length = 4;




More information about the mesa-commit mailing list