diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-05-07 20:18:49 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-05-07 20:18:49 -0600 |
commit | a266af9200444a4f651e0ff0cf54e533be38d44d (patch) | |
tree | c2041831b6d93f816ecd5f202d53f25c70712df7 /src/mesa | |
parent | 1a82d9648b3db780e58e4966924157542d148c58 (diff) |
mesa: minor fixes in _mesa_free_shader_program_data() and _mesa_link_program()
From master:
Set shProg->NumShaders = 0 after freeing program's list of shaders.
Set _NEW_PROGRAM in _mesa_link_program() to fix a state validation bug.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/shader_api.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index f12fa28d97..5ec03563ba 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -126,6 +126,8 @@ _mesa_free_shader_program_data(GLcontext *ctx, for (i = 0; i < shProg->NumShaders; i++) { _mesa_reference_shader(ctx, &shProg->Shaders[i], NULL); } + shProg->NumShaders = 0; + if (shProg->Shaders) { _mesa_free(shProg->Shaders); shProg->Shaders = NULL; @@ -1008,6 +1010,8 @@ _mesa_link_program(GLcontext *ctx, GLuint program) return; } + FLUSH_VERTICES(ctx, _NEW_PROGRAM); + _slang_link(ctx, program, shProg); } |