summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/nvvertprog.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-06-13 02:31:42 +0000
committerBrian Paul <[email protected]>2003-06-13 02:31:42 +0000
commit93db675bd9d46bfeb51c7ffd7282da5453645212 (patch)
treec51a59c9a738510e1f870bcde6d76639809b6b65 /src/mesa/main/nvvertprog.h
parent6a0db5626987adebb5078bacf7548d89976576a4 (diff)
added new GL_ARB_v_p instructions
Diffstat (limited to 'src/mesa/main/nvvertprog.h')
-rw-r--r--src/mesa/main/nvvertprog.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/mesa/main/nvvertprog.h b/src/mesa/main/nvvertprog.h
index b96d1133eb6..44207e2e4c8 100644
--- a/src/mesa/main/nvvertprog.h
+++ b/src/mesa/main/nvvertprog.h
@@ -48,6 +48,11 @@
#define VP_PROG_REG_END (VP_PROG_REG_START + VP_NUM_PROG_REGS - 1)
+/* for GL_ARB_v_p SWZ instruction */
+#define SWIZZLE_ZERO 100
+#define SWIZZLE_ONE 101
+
+
/* Vertex program opcodes */
enum vp_opcode
{
@@ -72,15 +77,24 @@ enum vp_opcode
VP_OPCODE_RCC,
VP_OPCODE_SUB,
VP_OPCODE_ABS,
- VP_OPCODE_END
+ VP_OPCODE_END,
+ /* Additional opcodes for GL_ARB_vertex_program */
+ VP_OPCODE_FLR,
+ VP_OPCODE_FRC,
+ VP_OPCODE_EX2,
+ VP_OPCODE_LG2,
+ VP_OPCODE_POW,
+ VP_OPCODE_XPD,
+ VP_OPCODE_SWZ
};
/* Instruction source register */
struct vp_src_register
{
- GLint Register; /* or the offset from the address register */
- GLuint Swizzle[4];
+ GLint Register; /* or the offset from the address register */
+ GLubyte Swizzle[4]; /* Each value is 0,1,2,3 for x,y,z,w or */
+ /* SWIZZLE_ZERO or SWIZZLE_ONE for VP_OPCODE_SWZ. */
GLboolean Negate;
GLboolean RelAddr;
};