anv/pipeline: Call nir_gather_info later
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 22 Mar 2017 22:24:06 +0000 (15:24 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 3 May 2017 18:25:46 +0000 (11:25 -0700)
We want to insert more lowering code that may insert system values and
we need to gather info after that lowering.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/intel/vulkan/anv_pipeline.c

index 4bd4b4856cfc3f9ff43abf2f5b062c34a8626a19..599286c216945f1783f4a1464e5cb939c46bfb00 100644 (file)
@@ -181,8 +181,6 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline,
    if (stage == MESA_SHADER_FRAGMENT)
       NIR_PASS_V(nir, anv_nir_lower_input_attachments);
 
-   nir_shader_gather_info(nir, entry_point->impl);
-
    return nir;
 }
 
@@ -376,6 +374,8 @@ anv_pipeline_compile(struct anv_pipeline *pipeline,
 
    NIR_PASS_V(nir, anv_nir_lower_push_constants);
 
+   nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
+
    /* Figure out the number of parameters */
    prog_data->nr_params = 0;