-/* $Id: nvvertprog.h,v 1.1 2003/01/14 04:55:46 brianp Exp $ */
-
/*
* Mesa 3-D graphics library
* Version: 5.1
/* Private vertex program types and constants only used by files
* related to vertex programs.
+ *
+ * XXX TO-DO: Rename this file "vertprog.h" since it's not NV-specific.
*/
+
#ifndef NVVERTPROG_H
#define NVVERTPROG_H
-#define VP_NUM_INPUT_REGS MAX_NV_VERTEX_PROGRAM_INPUTS
-#define VP_NUM_OUTPUT_REGS MAX_NV_VERTEX_PROGRAM_INPUTS
-#define VP_NUM_TEMP_REGS MAX_NV_VERTEX_PROGRAM_TEMPS
-#define VP_NUM_PROG_REGS MAX_NV_VERTEX_PROGRAM_PARAMS
-
-/* Location of register groups within the whole register file */
-#define VP_INPUT_REG_START 0
-#define VP_INPUT_REG_END (VP_INPUT_REG_START + VP_NUM_INPUT_REGS - 1)
-#define VP_OUTPUT_REG_START (VP_INPUT_REG_END + 1)
-#define VP_OUTPUT_REG_END (VP_OUTPUT_REG_START + VP_NUM_OUTPUT_REGS - 1)
-#define VP_TEMP_REG_START (VP_OUTPUT_REG_END + 1)
-#define VP_TEMP_REG_END (VP_TEMP_REG_START + VP_NUM_TEMP_REGS - 1)
-#define VP_PROG_REG_START (VP_TEMP_REG_END + 1)
-#define VP_PROG_REG_END (VP_PROG_REG_START + VP_NUM_PROG_REGS - 1)
-
-
/* Vertex program opcodes */
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];
+ enum register_file File; /* which register file */
+ GLint Index; /* index into register file */
+ 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;
};
/* Instruction destination register */
struct vp_dst_register
{
- GLint Register;
+ enum register_file File; /* which register file */
+ GLint Index; /* index into register file */
GLboolean WriteMask[4];
};
enum vp_opcode Opcode;
struct vp_src_register SrcReg[3];
struct vp_dst_register DstReg;
+#if FEATURE_MESA_program_debug
+ GLint StringPos;
+#endif
};