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.
This commit is contained in:
parent
7520478eb0
commit
a03fc82771
|
@ -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++;
|
||||
|
|
Loading…
Reference in New Issue