ir_to_mesa: Allocate temporary instructions on the visitor's ralloc context
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 25 Jun 2011 00:12:31 +0000 (17:12 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 6 Jul 2011 23:41:34 +0000 (16:41 -0700)
commitdbda466fc05a6262ba857a7887e16347cf3d3e96
tree7a72c76a50e26f8dbfee531ff0f4f50a3954003b
parent0eb97979584b73907327eebc547302e6b8d8976a
ir_to_mesa: Allocate temporary instructions on the visitor's ralloc context

And don't delete them.  Let ralloc clean them up.  Deleting the
temporary IR leaves dangling references in the prog_instruction.  That
results in a bad dereference when printing the IR with MESA_GLSL=dump.

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38584
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/program/ir_to_mesa.cpp