<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 6, 2017 at 9:40 AM, Jordan Justen <span dir="ltr"><<a href="mailto:jordan.l.justen@intel.com" target="_blank">jordan.l.justen@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2017-09-29 14:25:20, Jason Ekstrand wrote:<br>
> diff --git a/src/intel/compiler/brw_vec4_<wbr>visitor.cpp b/src/intel/compiler/brw_vec4_<wbr>visitor.cpp<br>
> index ff5cd2d..ae51619 100644<br>
> --- a/src/intel/compiler/brw_vec4_<wbr>visitor.cpp<br>
> +++ b/src/intel/compiler/brw_vec4_<wbr>visitor.cpp<br>
> @@ -1782,6 +1782,11 @@ vec4_visitor::move_uniform_<wbr>array_access_to_pull_<wbr>constants()<br>
>        return;<br>
>     }<br>
><br>
> +   /* Allocate the pull_params array */<br>
> +   assert(stage_prog_data->nr_<wbr>pull_params == 0);<br>
> +   stage_prog_data->pull_param = ralloc_array(mem_ctx, uint32_t,<br>
> +                                              this->uniforms * 4);<br>
<br>
</span>Why allocate this based on this->uniforms if nr_pull_params is 0?<span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">At this point in the function nr_pull_params is always 0.  It gets assigned later on in the function but we know that it will be <= uniforms * 4.</div><div class="gmail_extra"><br></div><div class="gmail_extra">--Jason<br></div></div>