Mesa (glsl2): glsl2: Create new talloc contexts the "right" way.

Ian Romanick idr at kemper.freedesktop.org
Wed Jun 30 13:56:40 PDT 2010


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Fri Jun 25 13:36:14 2010 -0700

glsl2: Create new talloc contexts the "right" way.

---

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

diff --git a/src/glsl/ir_copy_propagation.cpp b/src/glsl/ir_copy_propagation.cpp
index a02852e..f502f5e 100644
--- a/src/glsl/ir_copy_propagation.cpp
+++ b/src/glsl/ir_copy_propagation.cpp
@@ -225,7 +225,7 @@ copy_propagation_basic_block(ir_instruction *first,
    bool *out_progress = (bool *)data;
    bool progress = false;
 
-   void *ctx = talloc(NULL, void*);
+   void *ctx = talloc_new(NULL);
    for (ir = first;; ir = (ir_instruction *)ir->next) {
       ir_assignment *ir_assign = ir->as_assignment();
 
diff --git a/src/glsl/ir_dead_code_local.cpp b/src/glsl/ir_dead_code_local.cpp
index 5e197e1..7a44ec8 100644
--- a/src/glsl/ir_dead_code_local.cpp
+++ b/src/glsl/ir_dead_code_local.cpp
@@ -185,7 +185,7 @@ dead_code_local_basic_block(ir_instruction *first,
    bool *out_progress = (bool *)data;
    bool progress = false;
 
-   void *ctx = talloc(NULL, void*);
+   void *ctx = talloc_new(NULL);
    /* Safe looping, since process_assignment */
    for (ir = first, ir_next = (ir_instruction *)first->next;;
 	ir = ir_next, ir_next = (ir_instruction *)ir->next) {



More information about the mesa-commit mailing list