summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2004-01-22 22:40:40 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2004-01-22 22:40:40 +0000
commitdca71ea44bc4a9d454550c70e20b38f678b18a7e (patch)
tree20ad30dd1ffc405fc76829f8c04aecf7d44f20f9
parent004d71f55429a97513457c1cc67b910d86e8bca9 (diff)
Minor tweaks to help out at a driver level.
-rw-r--r--src/mesa/main/arbparse.c8
-rw-r--r--src/mesa/main/nvfragprog.h9
-rw-r--r--src/mesa/main/program.h8
3 files changed, 19 insertions, 6 deletions
diff --git a/src/mesa/main/arbparse.c b/src/mesa/main/arbparse.c
index ddffbc2b14..a84f16f59e 100644
--- a/src/mesa/main/arbparse.c
+++ b/src/mesa/main/arbparse.c
@@ -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;
}
diff --git a/src/mesa/main/nvfragprog.h b/src/mesa/main/nvfragprog.h
index 7752ddbab4..c3af7fb68d 100644
--- a/src/mesa/main/nvfragprog.h
+++ b/src/mesa/main/nvfragprog.h
@@ -64,6 +64,15 @@
#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
diff --git a/src/mesa/main/program.h b/src/mesa/main/program.h
index 3c2aa1cdac..4dbc5cffd7 100644
--- a/src/mesa/main/program.h
+++ b/src/mesa/main/program.h
@@ -36,8 +36,12 @@
/* 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 */
/*