summaryrefslogtreecommitdiff
path: root/src/mesa/main/nvfragprog.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-08-17 17:11:50 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-08-17 17:11:50 +0000
commitf2dd273322cc9ec0cfe80a609f9a1e5db5931e2e (patch)
treeedc2da6b3b703c474fc12003e4c38505cb8ef2a5 /src/mesa/main/nvfragprog.h
parent4f12be02491713d6998fa43e3efc19daf2faffeb (diff)
Re-org of register files for vertex/fragment programs. Will be easier to
hook in global state references, etc. for ARB programs.
Diffstat (limited to 'src/mesa/main/nvfragprog.h')
-rw-r--r--src/mesa/main/nvfragprog.h23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/mesa/main/nvfragprog.h b/src/mesa/main/nvfragprog.h
index 2f2434b42e..33b219c4ce 100644
--- a/src/mesa/main/nvfragprog.h
+++ b/src/mesa/main/nvfragprog.h
@@ -53,19 +53,6 @@
#define FRAG_OUTPUT_DEPR 2
-/* Location of register sets within the whole register file */
-#define FP_INPUT_REG_START 0
-#define FP_INPUT_REG_END (FP_INPUT_REG_START + MAX_NV_FRAGMENT_PROGRAM_INPUTS - 1)
-#define FP_OUTPUT_REG_START (FP_INPUT_REG_END + 1)
-#define FP_OUTPUT_REG_END (FP_OUTPUT_REG_START + MAX_NV_FRAGMENT_PROGRAM_OUTPUTS - 1)
-#define FP_TEMP_REG_START (FP_OUTPUT_REG_END + 1)
-#define FP_TEMP_REG_END (FP_TEMP_REG_START + MAX_NV_FRAGMENT_PROGRAM_TEMPS - 1)
-#define FP_PROG_REG_START (FP_TEMP_REG_END + 1)
-#define FP_PROG_REG_END (FP_PROG_REG_START + MAX_NV_FRAGMENT_PROGRAM_PARAMS - 1)
-#define FP_DUMMY_REG_START (FP_PROG_REG_END + 1)
-#define FP_DUMMY_REG_END (FP_DUMMY_REG_START + MAX_NV_FRAGMENT_PROGRAM_WRITE_ONLYS - 1)
-
-
/* condition codes */
#define COND_GT 1 /* greater than zero */
#define COND_EQ 2 /* equal to zero */
@@ -84,6 +71,7 @@
#define FIXED12 0x4
+/* Fragment program instruction opcodes */
enum fp_opcode {
FP_OPCODE_ADD = 1000,
FP_OPCODE_COS,
@@ -134,10 +122,11 @@ enum fp_opcode {
};
+/* Instruction source register */
struct fp_src_register
{
- GLint Register; /* or the offset from the address register */
- GLboolean IsParameter; /* true if register refers to a param or constant */
+ enum register_file File;
+ GLint Index;
GLuint Swizzle[4];
GLboolean NegateBase; /* negate before absolute value? */
GLboolean Abs; /* take absolute value? */
@@ -148,13 +137,15 @@ struct fp_src_register
/* Instruction destination register */
struct fp_dst_register
{
- GLint Register;
+ enum register_file File;
+ GLint Index;
GLboolean WriteMask[4];
GLuint CondMask;
GLuint CondSwizzle[4];
};
+/* Fragment program instruction */
struct fp_instruction
{
enum fp_opcode Opcode;