nir/sweep: Reparent the shader name
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 6 Oct 2015 00:16:02 +0000 (17:16 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 8 Oct 2015 15:20:31 +0000 (08:20 -0700)
commit9c528f5dfa69fcb4068df736be441c0db19e6e88
tree02ab6d6b46b95fa42768da5230e606b31ba3d78f
parentc8031a879a3f442a4ca43243914c797615110d9b
nir/sweep: Reparent the shader name

Previously the name of the nir shader was being freed prematurely during
nir_sweep. Since 756613ed35d the name was later being used to generate
filenames for the optimiser debug output and these would end up with
garbage from the dangling pointer.

Co-authored-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/nir/nir_sweep.c