[Mesa-dev] [PATCH v3 08/14] anv/pipeline: Call nir_gather_info later

Jason Ekstrand jason at jlekstrand.net
Thu Apr 27 16:31:37 UTC 2017


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 at igalia.com>
---
 src/intel/vulkan/anv_pipeline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 0685d0a..248a462 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -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;
 }
 
@@ -377,6 +375,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;
 
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list