summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/shader/program.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index 6db62f591c8..8442ba3248c 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -1953,6 +1953,8 @@ _mesa_BindProgram(GLenum target, GLuint id)
}
else if (target == GL_FRAGMENT_PROGRAM_NV ||
target == GL_FRAGMENT_PROGRAM_ARB) {
+ if (ctx->FragmentProgram._Current == ctx->FragmentProgram.Current)
+ ctx->FragmentProgram._Current = (struct gl_fragment_program *) newProg;
ctx->FragmentProgram.Current = (struct gl_fragment_program *) newProg;
}
newProg->RefCount++;