move _mesa_init_instruction() to program.c
authorBrian Paul <brian.paul@tungstengraphics.com>
Sun, 20 Nov 2005 17:57:22 +0000 (17:57 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sun, 20 Nov 2005 17:57:22 +0000 (17:57 +0000)
src/mesa/shader/nvvertparse.c
src/mesa/shader/program.c

index e2c14b991858d17031e8559723c822529e542099..fc44a49d4c7683096677c120ea22d5971882a52a 100644 (file)
@@ -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;
-}
index 38982de99360d913b8e510d70eb9bfe4af8db3a0..b6371329a5cbb77932f546ad127ceda2c8973a82 100644 (file)
@@ -1191,6 +1191,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
  */