<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 27, 2017 at 12:35 AM, Iago Toral <span dir="ltr"><<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This sounds good to me, but I guess it is not really fixing anything,<br>
right? I ask because the subject claims that this patch does something<br>
that the original code was already supposed to be doing.<br><div class="HOEnZb"><div class="h5"></div></div></blockquote><div><br></div><div>This patch is a bit of an artifact of history.  I needed it at one point in the development of the series but I think it may have ended up not mattering in the end.  I still think it's a nice clean-up.</div><div><br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
On Wed, 2017-10-25 at 16:25 -0700, Jason Ekstrand wrote:<br>
> Before, we bailing in assign_constant_locations based on the minimum<br>
> dispatch size.  The more direct thing to do is simply to check for<br>
> whether or not we have constant locations and bail if we do.  For<br>
> nir_setup_uniforms, it's completely safe to do it multiple times<br>
> because<br>
> we just copy a value from the NIR shader.<br>
> ---<br>
>  src/intel/compiler/brw_fs.<wbr>cpp     | 4 +++-<br>
>  src/intel/compiler/brw_fs_<wbr>nir.cpp | 5 ++++-<br>
>  2 files changed, 7 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/src/intel/compiler/brw_fs.<wbr>cpp<br>
> b/src/intel/compiler/brw_fs.<wbr>cpp<br>
> index 52079d3..75139fd 100644<br>
> --- a/src/intel/compiler/brw_fs.<wbr>cpp<br>
> +++ b/src/intel/compiler/brw_fs.<wbr>cpp<br>
> @@ -1956,8 +1956,10 @@ void<br>
>  fs_visitor::assign_constant_<wbr>locations()<br>
>  {<br>
>     /* Only the first compile gets to decide on locations. */<br>
> -   if (dispatch_width != min_dispatch_width)<br>
> +   if (push_constant_loc) {<br>
> +      assert(pull_constant_<wbr>loc);<br>
>        return;<br>
> +   }<br>
>  <br>
>     bool is_live[uniforms];<br>
>     memset(is_live, 0, sizeof(is_live));<br>
> diff --git a/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
> b/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
> index 7556576..05efee3 100644<br>
> --- a/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
> +++ b/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
> @@ -81,8 +81,11 @@ fs_visitor::nir_setup_outputs(<wbr>)<br>
>  void<br>
>  fs_visitor::nir_setup_<wbr>uniforms()<br>
>  {<br>
> -   if (dispatch_width != min_dispatch_width)<br>
> +   /* Only the first compile gets to set up uniforms. */<br>
> +   if (push_constant_loc) {<br>
> +      assert(pull_constant_<wbr>loc);<br>
>        return;<br>
> +   }<br>
>  <br>
>     uniforms = nir->num_uniforms / 4;<br>
>  }<br>
</div></div></blockquote></div><br></div></div>