projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3bd06e5
)
glsl_to_tgsi: improve eliminate_dead_code_advanced()
author
Bryan Cain
<bryancain3@gmail.com>
Sat, 25 Jun 2011 04:17:30 +0000
(23:17 -0500)
committer
Bryan Cain
<bryancain3@gmail.com>
Mon, 1 Aug 2011 22:59:09 +0000
(17:59 -0500)
src/mesa/state_tracker/st_glsl_to_tgsi.cpp
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 13573fc1b94851f7474b8176bd0ebebe72b9728d..15a1a3c51c4a2847ad90d81437342e8f9f07b48d 100644
(file)
--- a/
src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/
src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@
-3379,6
+3379,15
@@
glsl_to_tgsi_visitor::eliminate_dead_code_advanced(void)
}
}
+ /* Anything still in the write array at this point is dead code. */
+ for (int r = 0; r < this->next_temp; r++) {
+ for (int c = 0; c < 4; c++) {
+ glsl_to_tgsi_instruction *inst = writes[4 * r + c];
+ if (inst)
+ inst->dead_mask |= (1 << c);
+ }
+ }
+
/* Now actually remove the instructions that are completely dead and update
* the writemask of other instructions with dead channels.
*/