summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/programopt.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2006-12-13 14:54:47 -0700
committerBrian <[email protected]>2006-12-13 14:54:47 -0700
commitfe1d01cb398cbcb5b28a0b222845d3865c4d612b (patch)
tree92faedffbd069150e9cf4993506802962c640459 /src/mesa/shader/programopt.c
parent8627bf14524a85cedc3d1794fce9f562fd12bf79 (diff)
Checkpoint of work for new GLSL compiler back-end. Lots of assorted changes.
Diffstat (limited to 'src/mesa/shader/programopt.c')
-rw-r--r--src/mesa/shader/programopt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c
index 783177739d1..51caa02f9fa 100644
--- a/src/mesa/shader/programopt.c
+++ b/src/mesa/shader/programopt.c
@@ -136,6 +136,7 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog)
GLuint colorTemp, fogFactorTemp; /* temporary registerss */
GLfloat fogVals[4];
GLuint fogConsts; /* constant values for EXP, EXP2 mode */
+ GLuint swizzle;
if (fprog->FogOption == GL_NONE) {
_mesa_problem(ctx, "_mesa_append_fog_code() called for fragment program"
@@ -172,7 +173,9 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog)
fogVals[1] = 1.0 / SQRTF(log(2.0));
fogVals[2] = 0.0;
fogVals[3] = 0.0;
- fogConsts = _mesa_add_unnamed_constant(fprog->Base.Parameters, fogVals, 4);
+ fogConsts = _mesa_add_unnamed_constant(fprog->Base.Parameters,
+ fogVals, 4, &swizzle);
+ ASSERT(swizzle == SWIZZLE_NOOP);
/* Scan program to find where result.color is written */
inst = newInst;