summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_instruction.h
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2006-12-13 14:54:47 -0700
committerBrian <brian@yutani.localnet.net>2006-12-13 14:54:47 -0700
commitfe1d01cb398cbcb5b28a0b222845d3865c4d612b (patch)
tree92faedffbd069150e9cf4993506802962c640459 /src/mesa/shader/program_instruction.h
parent8627bf14524a85cedc3d1794fce9f562fd12bf79 (diff)
Checkpoint of work for new GLSL compiler back-end. Lots of assorted changes.
Diffstat (limited to 'src/mesa/shader/program_instruction.h')
-rw-r--r--src/mesa/shader/program_instruction.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mesa/shader/program_instruction.h b/src/mesa/shader/program_instruction.h
index ad3a6d4dd4..2fcdfaa2be 100644
--- a/src/mesa/shader/program_instruction.h
+++ b/src/mesa/shader/program_instruction.h
@@ -91,8 +91,10 @@
* Program instruction opcodes, for both vertex and fragment programs.
* \note changes to this opcode list must be reflected in t_vb_arbprogram.c
*/
+typedef enum prog_opcode {
/* ARB_vp ARB_fp NV_vp NV_fp */
-enum prog_opcode { /*---------------------------------*/
+ /*---------------------------------*/
+ OPCODE_NOP = 0,
OPCODE_ABS, /* X X 1.1 */
OPCODE_ADD, /* X X X X */
OPCODE_ARA, /* 2 */
@@ -164,7 +166,7 @@ enum prog_opcode { /*---------------------------------*/
OPCODE_X2D, /* X */
OPCODE_XPD, /* X X */
MAX_OPCODE
-};
+} gl_inst_opcode;
/**
@@ -263,7 +265,7 @@ struct prog_dst_register
*/
struct prog_instruction
{
- enum prog_opcode Opcode;
+ gl_inst_opcode Opcode;
#if FEATURE_MESA_program_debug
GLshort StringPos;
#endif
@@ -344,6 +346,8 @@ struct prog_instruction
* For BRA and CAL instructions, the location to jump to.
*/
GLuint BranchTarget;
+
+ const char *Comment;
};
@@ -351,10 +355,10 @@ extern void
_mesa_init_instructions(struct prog_instruction *inst, GLuint count);
extern GLuint
-_mesa_num_inst_src_regs(enum prog_opcode opcode);
+_mesa_num_inst_src_regs(gl_inst_opcode opcode);
extern const char *
-_mesa_opcode_string(enum prog_opcode opcode);
+_mesa_opcode_string(gl_inst_opcode opcode);
#endif /* PROG_INSTRUCTION_H */