nir: Allocate nir_tex_instr::sources out of the instruction itself.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 28 Mar 2015 07:02:37 +0000 (00:02 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 2 Apr 2015 21:20:03 +0000 (14:20 -0700)
commitda5ec2ac0bc20b52fefe59081efcdb9b3989f6a7
treebaa386df6a87e586980d6c7ffbf6f2d9cd9003e4
parent7380c641b116a47d5729c553dcf3ed7143e877cc
nir: Allocate nir_tex_instr::sources out of the instruction itself.

The lifetime of the sources array needs to be match the nir_tex_instr
itself.  So, allocate it using the instruction itself as the context.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/glsl/nir/nir.c