From a03fc8277180e2171519165a724849e2254ef0b7 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Mon, 15 Jan 2007 21:19:52 +0100 Subject: mesa: Update _Current along Current on fragment program bound. Same as a previously committed patch for vertex program, we update fragment program ptr _Current along the Current one so that _Current can't end up pointing to a no more valid program. --- src/mesa/shader/program.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 6db62f591c..8442ba3248 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++; -- cgit v1.2.3