i965: Rename BRW_SAMPLER_MESSAGE_..._GEN5 to GEN5_SAMPLER_MESSAGE.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 16 Mar 2011 07:06:59 +0000 (00:06 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 16 Mar 2011 20:51:44 +0000 (13:51 -0700)
We already have lots of GEN6_* defines; this seems more consistent.

src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_wm_emit.c

index 5496b4fdd3b99379742614987dc4ab44a7fb77de..403e05d0537a1e025ec0d24df95927e923f38912 100644 (file)
 #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
index 2c997b4eb3aedcabbdb3c47c4319d30909da3921..8cc4166f05905c533fd56dc92bb57d48c837e914 100644 (file)
@@ -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:
index 2336e27c1ef21e8d577f8c6f4c8cf132a8c5e046..ecfd21d439961440478747cf2849a9ed4a01fe1a 100644 (file)
@@ -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;