projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4e312d
)
mesa: Fix remove_instructions to successfully remove when removeFlags[0].
author
Eric Anholt
<eric@anholt.net>
Fri, 6 Nov 2009 21:04:54 +0000
(13:04 -0800)
committer
Eric Anholt
<eric@anholt.net>
Fri, 6 Nov 2009 21:16:49 +0000
(13:16 -0800)
This fixes the dead code elimination to work on the particular code
mentioned in the previous commit.
src/mesa/shader/prog_optimize.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/prog_optimize.c
b/src/mesa/shader/prog_optimize.c
index 5aff16be46d0ceb3a0718ff775f465910d7ceec2..b4658cb37f904347eb5c2bd96bd43f3f9a4bed66 100644
(file)
--- a/
src/mesa/shader/prog_optimize.c
+++ b/
src/mesa/shader/prog_optimize.c
@@
-73,6
+73,12
@@
remove_instructions(struct gl_program *prog, const GLboolean *removeFlags)
}
}
}
+ /* Finish removing if the first instruction was to be removed. */
+ if (removeCount > 0) {
+ GLint removeStart = removeEnd - removeCount + 1;
+ _mesa_delete_instructions(prog, removeStart, removeCount);
+ removeStart = removeCount = 0; /* reset removal info */
+ }
return totalRemoved;
}