nir/spirv: Fix constant num_elements and allocation
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 31 Dec 2015 02:51:57 +0000 (18:51 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 31 Dec 2015 02:51:59 +0000 (18:51 -0800)
commitcf6ce424e0405392fa92a41ace5d601b343a0f15
treefe456a66dd4662d412d2e28770221cc4b02d77a6
parent601b7d5f985b9831ddfeab268b28d14e1c7ea1b7
nir/spirv: Fix constant num_elements and allocation

Thanks to the addition of nir_clone, we now have a num_elements field in
nir_constant which we weren't setting.  Also, constants have to be parented
to the variable they initialize, so we have to make a copy.
src/glsl/nir/spirv/spirv_to_nir.c