<div dir="ltr">Forget this patch.  It's bogus.  The computation of prog_data->nr_params requires gathered info so the earliest we could put it is at the top of this function.  Instead, we'll just call anv_nir_lower_input_attachments earlier.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 16, 2016 at 11:31 AM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The lower_input_attachments pass that we're about to add will generate<br>
additional uses of system values and we want those to be reflected in<br>
gather_info.<br>
---<br>
 src/intel/vulkan/anv_pipeline.<wbr>c | 4 ++--<br>
 1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_<wbr>pipeline.c b/src/intel/vulkan/anv_<wbr>pipeline.c<br>
index bdac404..c251463 100644<br>
--- a/src/intel/vulkan/anv_<wbr>pipeline.c<br>
+++ b/src/intel/vulkan/anv_<wbr>pipeline.c<br>
@@ -166,8 +166,6 @@ anv_shader_compile_to_nir(<wbr>struct anv_device *device,<br>
<br>
    nir = brw_preprocess_nir(compiler, nir);<br>
<br>
-   nir_shader_gather_info(nir, entry_point->impl);<br>
-<br>
    nir_variable_mode indirect_mask = 0;<br>
    if (compiler->glsl_compiler_<wbr>options[stage].<wbr>EmitNoIndirectInput)<br>
       indirect_mask |= nir_var_shader_in;<br>
@@ -369,6 +367,8 @@ anv_pipeline_compile(struct anv_pipeline *pipeline,<br>
     */<br>
    nir->num_uniforms = prog_data->nr_params * 4;<br>
<br>
+   nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir)<wbr>);<br>
+<br>
    return nir;<br>
 }<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.5.0.400.gff86faf<br>
<br>
</font></span></blockquote></div><br></div>