Module: Mesa Branch: glsl-to-tgsi Commit: 1e4933b9a18ac6294b34860cfc4cc09974fbe643 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1e4933b9a18ac6294b34860cfc4cc09974fbe643
Author: Bryan Cain <[email protected]> Date: Fri Jun 24 23:17:30 2011 -0500 glsl_to_tgsi: improve eliminate_dead_code_advanced() --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 13573fc..15a1a3c 100644 --- 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. */ _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
