i965: Fix use of undefined mem_ctx in vector splitting.
authorEric Anholt <eric@anholt.net>
Wed, 29 Sep 2010 22:19:52 +0000 (15:19 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 29 Sep 2010 22:51:05 +0000 (15:51 -0700)
src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp

index 552254df87b39259b3667f205905e952c1de286c..38195f6910d9572870cf55b5d6c58f4d1e540825 100644 (file)
@@ -212,7 +212,6 @@ public:
    struct variable_entry *get_splitting_entry(ir_variable *var);
 
    exec_list *variable_list;
-   void *mem_ctx;
 };
 
 struct variable_entry *
@@ -300,6 +299,7 @@ ir_vector_splitting_visitor::visit_leave(ir_assignment *ir)
       }
       ir->remove();
    } else if (lhs) {
+      void *mem_ctx = lhs->mem_ctx;
       int elem = -1;
 
       switch (ir->write_mask) {