projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a82d96
)
mesa: minor fixes in _mesa_free_shader_program_data() and _mesa_link_program()
author
Brian Paul
<brian.paul@tungstengraphics.com>
Thu, 8 May 2008 02:18:49 +0000
(20:18 -0600)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Thu, 8 May 2008 02:18:49 +0000
(20:18 -0600)
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.
src/mesa/shader/shader_api.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/shader_api.c
b/src/mesa/shader/shader_api.c
index f12fa28d97bb4d21407bed38bcec429a4918a74e..5ec03563ba2e4af807b6a9e3231466a05ca4b845 100644
(file)
--- 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);
}