Mesa (glsl2): glsl2: Use a better talloc context for ir_expression_flattening.

Eric Anholt anholt at kemper.freedesktop.org
Mon Jul 12 23:07:20 UTC 2010


Module: Mesa
Branch: glsl2
Commit: d74c9ff046c9cf8ee33c202eb5eba3dfc7f8e06e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d74c9ff046c9cf8ee33c202eb5eba3dfc7f8e06e

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jul 12 15:41:31 2010 -0700

glsl2: Use a better talloc context for ir_expression_flattening.

The instruction can be hung off of any other in the tree, even if the
other one will be deleted, since it'll get stolen to the shader's
context later if it's still live.

---

 src/glsl/ir_expression_flattening.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/ir_expression_flattening.cpp b/src/glsl/ir_expression_flattening.cpp
index 0f10b67..629194c 100644
--- a/src/glsl/ir_expression_flattening.cpp
+++ b/src/glsl/ir_expression_flattening.cpp
@@ -82,7 +82,7 @@ do_expression_flattening(exec_list *instructions,
 ir_rvalue *
 ir_expression_flattening_visitor::operand_to_temp(ir_rvalue *ir)
 {
-   void *ctx = talloc_parent(base_ir);
+   void *ctx = base_ir;
    ir_variable *var;
    ir_assignment *assign;
 




More information about the mesa-commit mailing list