diff options
author | Jerome Glisse <[email protected]> | 2007-01-15 21:19:52 +0100 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2007-01-15 21:21:10 +0100 |
commit | a03fc8277180e2171519165a724849e2254ef0b7 (patch) | |
tree | 8e6b87be472668892634093b165f12de61964d4d /src/mesa/shader | |
parent | 7520478eb055350702d09e533db02258187d8c74 (diff) |
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.
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/program.c | 2 |
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++; |