glsl2: Create new talloc contexts the "right" way.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 25 Jun 2010 20:36:14 +0000 (13:36 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 30 Jun 2010 20:52:24 +0000 (13:52 -0700)
src/glsl/ir_copy_propagation.cpp
src/glsl/ir_dead_code_local.cpp

index a02852e..f502f5e 100644 (file)
@@ -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();
 
index 5e197e1..7a44ec8 100644 (file)
@@ -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) {