projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e0c6fc
)
added FLUSH_VERTICES() in _mesa_use_program()
author
Brian
<brian@yutani.localnet.net>
Sat, 3 Feb 2007 18:35:02 +0000
(11:35 -0700)
committer
Brian
<brian@yutani.localnet.net>
Sat, 3 Feb 2007 18:35:02 +0000
(11:35 -0700)
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 1914adb54ca4408134425003e1fef55455f4f840..842960099ea21898a95cb2c57741da4ee250dae7 100644
(file)
--- a/
src/mesa/shader/shader_api.c
+++ b/
src/mesa/shader/shader_api.c
@@
-842,6
+842,14
@@
_mesa_link_program(GLcontext *ctx, GLuint program)
void
_mesa_use_program(GLcontext *ctx, GLuint program)
{
+ if (ctx->Shader.CurrentProgram &&
+ ctx->Shader.CurrentProgram->Name == program) {
+ /* no-op */
+ return;
+ }
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
/* unbind old */
if (ctx->Shader.CurrentProgram) {
ctx->Shader.CurrentProgram->RefCount--;