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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index bbe90a32e08..98ca733c0b9 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -260,10 +260,11 @@ update_program(struct gl_context *ctx)
}
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);
+
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
- _mesa_get_fixed_func_fragment_program(ctx));
- _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram,
- ctx->FragmentProgram._Current);
+ (struct gl_fragment_program *)
+ f->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program);
}
else {
/* No fragment program */