summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_instruction.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-05-30 22:17:35 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-05-30 22:17:35 +0000
commita8c4242395b1bce0eac2a20243e5289414a9f511 (patch)
tree7ff0d74522c04fb170ad0ce472c1fe3562de4498 /src/mesa/shader/program_instruction.h
parente4cb9cd167b2993a4d73871b80216af9766f130b (diff)
Define new NEGATE_* tokens for setting the src register's NegateBase field.
Before, we were using GL_TRUE/GL_FALSE in a few places. Note: only the SWZ instruction can negate individual components.
Diffstat (limited to 'src/mesa/shader/program_instruction.h')
-rw-r--r--src/mesa/shader/program_instruction.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/mesa/shader/program_instruction.h b/src/mesa/shader/program_instruction.h
index 20886d9f02..93bcfc240a 100644
--- a/src/mesa/shader/program_instruction.h
+++ b/src/mesa/shader/program_instruction.h
@@ -75,6 +75,19 @@
/**
+ * Per-component negation masks
+ */
+/*@{*/
+#define NEGATE_X 0x1
+#define NEGATE_Y 0x2
+#define NEGATE_Z 0x4
+#define NEGATE_W 0x8
+#define NEGATE_XYZW 0xf
+#define NEGATE_NONE 0x0
+/*@}*/
+
+
+/**
* Program instruction opcodes, for both vertex and fragment programs.
* \note changes to this opcode list must be reflected in t_vb_arbprogram.c
*/
@@ -173,7 +186,8 @@ struct prog_src_register
*/
/*@{*/
/**
- * Per-component negation for the SWZ instruction.
+ * Per-component negation for the SWZ instruction. For non-SWZ
+ * instructions the only possible values are NEGATE_XYZW and NEGATE_NONE.
*
* \since
* ARB_vertex_program, ARB_fragment_program
@@ -190,8 +204,7 @@ struct prog_src_register
GLuint Abs:1;
/**
- * Take the component-wise negation. The negation occurs \b after the
- * (optional) absolute value operation.
+ * Post-absolute value negation (all components).
*/
GLuint NegateAbs:1;
/*@}*/