<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 20, 2017 at 3:24 PM, Chad Versace <span dir="ltr"><<a href="mailto:chadversary@chromium.org" target="_blank">chadversary@chromium.org</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 Fri 16 Jun 2017, Jason Ekstrand wrote:<br>
> While we're here, we also make the two support checks static since there<br>
> are no users outside intel_mipmap_tree.c.<br>
> ---<br>
>  src/mesa/drivers/dri/i965/brw_<wbr>blorp.c         |  2 +-<br>
>  src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c | 45 +++++++++++++--------------<br>
>  src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.h | 18 ++---------<br>
>  3 files changed, 25 insertions(+), 40 deletions(-)<br>
<br>
</span>This patch greatly clarifies the code, making it more precise. I'm<br>
always in favor for replacing fuzzy, english phrases in code with<br>
terse, precise terms.<br>
<span class=""><br>
<br>
> @@ -734,8 +732,8 @@ intel_miptree_create(struct brw_context *brw,<br>
>      * clear actually occurs or when compressed single sampled buffer is<br>
>      * written by the GPU for the first time.<br>
>      */<br>
> -   if (intel_tiling_supports_non_<wbr>msrt_mcs(brw, mt->tiling) &&<br>
> -       intel_miptree_supports_non_<wbr>msrt_fast_clear(brw, mt)) {<br>
> +   if (intel_tiling_supports_ccs(<wbr>brw, mt->tiling) &&<br>
> +       intel_miptree_supports_ccs(<wbr>brw, mt)) {<br>
<br>
</span>That was my favorite hunk of the patch. Now it's obvious the the two<br>
lines are checking essentially the same thing. In fact, we can probably<br>
drop the tiling check here. The miptree check should be sufficient (and<br>
if it's not, that's a bug in my opinion).<br></blockquote><div><br></div><div>If only...  Unfortunately, we need intel_miptree_supports_ccs to *not* know about tiling because we have to decide whether or not to do CCS so that we can deside if we need HALIGN16 so that we can layout the miptree so that we can decide tiling.  Yes, it's terrible. <br></div></div><br></div></div>