summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-11-20 17:57:22 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-11-20 17:57:22 +0000
commitec770b8c60dc439f5a73c46d2bd25249b1dc1a1c (patch)
tree3271029d5ab0de45b16588929202e708d4a6436d
parent1a61462318c00f61faaa88111248d89eceac1c77 (diff)
downloadexternal_mesa3d-ec770b8c60dc439f5a73c46d2bd25249b1dc1a1c.zip
external_mesa3d-ec770b8c60dc439f5a73c46d2bd25249b1dc1a1c.tar.gz
external_mesa3d-ec770b8c60dc439f5a73c46d2bd25249b1dc1a1c.tar.bz2
move _mesa_init_instruction() to program.c
-rw-r--r--src/mesa/shader/nvvertparse.c23
-rw-r--r--src/mesa/shader/program.c25
2 files changed, 25 insertions, 23 deletions
diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c
index e2c14b9..fc44a49 100644
--- a/src/mesa/shader/nvvertparse.c
+++ b/src/mesa/shader/nvvertparse.c
@@ -1580,26 +1580,3 @@ _mesa_nv_vertex_output_register_name(GLuint i)
return OutputRegisters[i];
}
-
-/**
- * Initialize program instruction fields to defaults.
- */
-void
-_mesa_init_instruction(struct prog_instruction *inst)
-{
- _mesa_bzero(inst, sizeof(struct prog_instruction));
-
- inst->SrcReg[0].File = PROGRAM_UNDEFINED;
- inst->SrcReg[0].Swizzle = SWIZZLE_NOOP;
- inst->SrcReg[1].File = PROGRAM_UNDEFINED;
- inst->SrcReg[1].Swizzle = SWIZZLE_NOOP;
- inst->SrcReg[2].File = PROGRAM_UNDEFINED;
- inst->SrcReg[2].Swizzle = SWIZZLE_NOOP;
-
- inst->DstReg.File = PROGRAM_UNDEFINED;
- inst->DstReg.WriteMask = WRITEMASK_XYZW;
- inst->DstReg.CondMask = COND_TR;
- inst->DstReg.CondSwizzle = SWIZZLE_NOOP;
-
- inst->Precision = FLOAT32;
-}
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index 38982de..b637132 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -1192,6 +1192,31 @@ _mesa_load_state_parameters(GLcontext *ctx,
/**
+ * Initialize program instruction fields to defaults.
+ */
+void
+_mesa_init_instruction(struct prog_instruction *inst)
+{
+ _mesa_bzero(inst, sizeof(struct prog_instruction));
+
+ inst->SrcReg[0].File = PROGRAM_UNDEFINED;
+ inst->SrcReg[0].Swizzle = SWIZZLE_NOOP;
+ inst->SrcReg[1].File = PROGRAM_UNDEFINED;
+ inst->SrcReg[1].Swizzle = SWIZZLE_NOOP;
+ inst->SrcReg[2].File = PROGRAM_UNDEFINED;
+ inst->SrcReg[2].Swizzle = SWIZZLE_NOOP;
+
+ inst->DstReg.File = PROGRAM_UNDEFINED;
+ inst->DstReg.WriteMask = WRITEMASK_XYZW;
+ inst->DstReg.CondMask = COND_TR;
+ inst->DstReg.CondSwizzle = SWIZZLE_NOOP;
+
+ inst->SaturateMode = SATURATE_OFF;
+ inst->Precision = FLOAT32;
+}
+
+
+/**
* Basic info about each instruction
*/
struct instruction_info