nir: Create the params array in function_impl_create
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 18 Dec 2015 23:06:02 +0000 (15:06 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 23 Dec 2015 21:49:56 +0000 (13:49 -0800)
src/glsl/nir/nir.c

index b1a533083811a1f1ff3c06b68cf286e0d6c5f630..d2e9afa4479779904c3e842958341faad2b58f6e 100644 (file)
@@ -311,6 +311,10 @@ nir_function_impl_create(nir_function_overload *overload)
    overload->impl = impl;
    impl->overload = overload;
 
+   impl->num_params = overload->num_params;
+   impl->params = ralloc_array(overload->function->shader,
+                               nir_variable *, impl->num_params);
+
    return impl;
 }