Minor tweaks to help out at a driver level.
authorKeith Whitwell <keith@tungstengraphics.com>
Thu, 22 Jan 2004 22:40:40 +0000 (22:40 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Thu, 22 Jan 2004 22:40:40 +0000 (22:40 +0000)
src/mesa/main/arbparse.c
src/mesa/main/nvfragprog.h
src/mesa/main/program.h

index ddffbc2b14cb3a190c5b5740506b19c034c3f893..a84f16f59ed26938fab301067f300b3e381c3263 100644 (file)
@@ -4649,16 +4649,16 @@ parse_extended_swizzle_mask (GLubyte ** inst, GLubyte * mask, GLboolean * Negate
             mask[a] = SWIZZLE_ONE;
             break;
          case COMPONENT_X:
-            mask[a] = 0;
+            mask[a] = SWIZZLE_X;
             break;
          case COMPONENT_Y:
-            mask[a] = 1;
+            mask[a] = SWIZZLE_Y;
             break;
          case COMPONENT_Z:
-            mask[a] = 2;
+            mask[a] = SWIZZLE_Z;
             break;
          case COMPONENT_W:
-            mask[a] = 3;
+            mask[a] = SWIZZLE_W;
             break;
 
       }
index 7752ddbab4703b6120016d982be9204f21f15a64..c3af7fb68dbc4699e57102aa4593bcb73aafee38 100644 (file)
 #define FRAG_BIT_TEX6  (1 << FRAG_ATTRIB_TEX6)
 #define FRAG_BIT_TEX7  (1 << FRAG_ATTRIB_TEX7)
 
+#define FRAG_BITS_TEX_ANY (FRAG_BIT_TEX0|      \
+                          FRAG_BIT_TEX1|       \
+                          FRAG_BIT_TEX2|       \
+                          FRAG_BIT_TEX3|       \
+                          FRAG_BIT_TEX4|       \
+                          FRAG_BIT_TEX5|       \
+                          FRAG_BIT_TEX6|       \
+                          FRAG_BIT_TEX7)
+
 /* output registers */
 #define FRAG_OUTPUT_COLR  0
 #define FRAG_OUTPUT_COLH  1
index 3c2aa1cdac62e38e948cd4ade1786b1591e1e52b..4dbc5cffd7cc1928c4c10f1e62533b60cdcc1fa0 100644 (file)
 
 
 /* for GL_ARB_v_p and GL_ARB_f_p SWZ instruction */
-#define SWIZZLE_ZERO 100
-#define SWIZZLE_ONE  101
+#define SWIZZLE_X    0
+#define SWIZZLE_Y    1
+#define SWIZZLE_Z    2
+#define SWIZZLE_W    3
+#define SWIZZLE_ZERO 4         /* keep these values together: KW */
+#define SWIZZLE_ONE  5         /* keep these values together: KW */
 
 
 /*