<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 17, 2017 at 10:42 AM, Pohjolainen, Topi <span dir="ltr"><<a href="mailto:topi.pohjolainen@gmail.com" target="_blank">topi.pohjolainen@gmail.com</a>></span> wrote:<br><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 Mon, Jul 17, 2017 at 08:04:40AM -0700, Jason Ekstrand wrote:<br>
> We need this split for the same reason that we need the split for CCS:<br>
> intel_miptree_supports_hiz is called *before* we choose the actual<br>
> tiling.  Adding a tiling_supports_hiz helper lets choose_aux_usage<br>
> more accurately decide whether or not to enable hiz.  In particular,<br>
> this prevents us from enabling HiZ on linear depth buffers.<br>
><br>
> Cc: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@gmail.com">topi.pohjolainen@gmail.com</a>><br>
> ---<br>
>  src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c | 12 +++++++++++-<br>
>  1 file changed, 11 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
> index 12b8d04..0fc9b67 100644<br>
> --- a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
> +++ b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
> @@ -213,6 +213,15 @@ intel_miptree_supports_ccs(<wbr>struct brw_context *brw,<br>
>  }<br>
><br>
>  static bool<br>
> +intel_tiling_supports_hiz(<wbr>const struct brw_context *brw, unsigned tiling)<br>
> +{<br>
> +   if (brw->gen < 6)<br>
> +      return false;<br>
> +<br>
> +   return tiling == I915_TILING_Y;<br>
> +}<br>
> +<br>
> +static bool<br>
>  intel_miptree_supports_hiz(<wbr>struct brw_context *brw,<br>
>                             struct intel_mipmap_tree *mt)<br>
>  {<br>
> @@ -597,7 +606,8 @@ intel_miptree_choose_aux_<wbr>usage(struct brw_context *brw,<br>
>        } else {<br>
>           mt->aux_usage = ISL_AUX_USAGE_CCS_D;<br>
>        }<br>
> -   } else if (intel_miptree_supports_hiz(<wbr>brw, mt)) {<br>
> +   } else if (intel_tiling_supports_hiz(<wbr>brw, mt) &&<br>
<br>
</div></div>      } else if (intel_tiling_supports_hiz(<wbr>brw, mt->tiling) &&<br></blockquote><div><br></div><div>Yup.  Already found+fixed.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
With that:<br>
<br>
Reviewed-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br><div class="HOEnZb"><div class="h5"></div></div></blockquote><div><br></div><div>Thanks!<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">
> +              intel_miptree_supports_hiz(<wbr>brw, mt)) {<br>
>        mt->aux_usage = ISL_AUX_USAGE_HIZ;<br>
>     }<br>
><br>
> --<br>
> 2.5.0.400.gff86faf<br>
><br>
</div></div></blockquote></div><br></div></div>