summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/state.c')
-rw-r--r--src/mesa/main/state.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 19c9bbabda2..1b2b2f32464 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -277,17 +277,21 @@ update_program(struct gl_context *ctx)
fsProg->FragmentProgram);
}
else if (ctx->FragmentProgram._Enabled) {
- /* use user-defined vertex program */
+ /* use user-defined fragment program */
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
ctx->FragmentProgram.Current);
}
else if (ctx->FragmentProgram._MaintainTexEnvProgram) {
/* Use fragment program generated from fixed-function state.
*/
+ struct gl_shader_program *f = _mesa_get_fixed_func_fragment_program(ctx);
+#if 0
+ _mesa_reference_shader_program(ctx,
+ &ctx->Shader.CurrentFragmentProgram, f);
+#endif
+
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
- _mesa_get_fixed_func_fragment_program(ctx));
- _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram,
- ctx->FragmentProgram._Current);
+ f->FragmentProgram);
}
else {
/* no fragment program */