[Mesa-dev] [PATCH 2/5] glsl: Remove bonus tree walking in opt_constant_folding().
Kenneth Graunke
kenneth at whitecape.org
Mon May 9 06:50:11 UTC 2016
It looks like this was missed when converting opt_constant_folding()
from a hierarchical visitor to an rvalue visitor in 6606fde3.
ir_rvalue_visitor already processes values on the way back up the tree,
so we will have already visited every child node. There's no point in
doing it again.
No change in shader-db.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/compiler/glsl/opt_constant_folding.cpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/compiler/glsl/opt_constant_folding.cpp b/src/compiler/glsl/opt_constant_folding.cpp
index 150a17b..de13c9e 100644
--- a/src/compiler/glsl/opt_constant_folding.cpp
+++ b/src/compiler/glsl/opt_constant_folding.cpp
@@ -89,8 +89,6 @@ ir_constant_folding_visitor::handle_rvalue(ir_rvalue **rvalue)
if (constant) {
*rvalue = constant;
this->progress = true;
- } else {
- (*rvalue)->accept(this);
}
}
--
2.8.2
More information about the mesa-dev
mailing list