<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 6, 2017 at 5:41 PM, Chad Versace <span dir="ltr"><<a href="mailto:chad@kiwitree.net" target="_blank">chad@kiwitree.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">On Tue 06 Jun 2017, Jason Ekstrand wrote:<br>
> On Tue, Jun 6, 2017 at 1:22 PM, Chad Versace <<a href="mailto:chadversary@chromium.org">chadversary@chromium.org</a>><br>
> wrote:<br>
><br>
> > On Fri 26 May 2017, Jason Ekstrand wrote:<br>
> > > This enum describes all of the states that a auxiliary compressed<br>
> > > surface can have.  All of the states as well as normative language for<br>
> > > referring to each of the compression operations is provided in the<br>
> > > truly colossal comment for the new isl_aux_state enum.  There is also<br>
> > > a diagram showing how surfaces move between the different states.<br>
> > > ---<br>
> > >  src/intel/isl/isl.h | 142 ++++++++++++++++++++++++++++++<br>
> > ++++++++++++++++++++++<br>
> > >  1 file changed, 142 insertions(+)<br>
> > ><br>
> > > diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h<br>
> > > index b9d8fa8..df6d3e3 100644<br>
> > > --- a/src/intel/isl/isl.h<br>
> > > +++ b/src/intel/isl/isl.h<br>
> > > @@ -560,6 +560,148 @@ enum isl_aux_usage {<br>
> > >     ISL_AUX_USAGE_CCS_E,<br>
> > >  };<br>
> > ><br>
> > > +/**<br>
> > > + * Enum for keeping track of the state an auxiliary compressed surface.<br>
> ><br>
> > This is really nice and helpful for everyone.<br>
> ><br>
> > I also learned something new from it: that a resolve on CCS_E also<br>
> > ambiguates the aux surface. Do you have any insight on why the hardware<br>
> > does that?<br>
> ><br>
> > > + *<br>
> > > + * For any given auxiliary surface compression format (HiZ, CCS, or<br>
> > MCS), any<br>
> > > + * given slice (lod + array layer) can be in one of the six states<br>
> > described<br>
> > > + * by this enum.  Draw and resolve operations may cause the slice to<br>
> > change<br>
> > > + * from one state to another.  The six valid states are:<br>
> ><br>
> > I have one suggestion: please carefully distinguish between CCS_D and<br>
> > CCS_E in the documentation. In my experience, muddy thinking where the<br>
> > two are not cleanly distinguished leads to confused minds and confusing<br>
> > code.<br>
> ><br>
> > For someone who already has a firm grasp on aux state, the ambiguous<br>
> > term "CCS" poses no problem. That wise person automatically infers from<br>
> > context if "CCS" applies to CCS_D, to CCS_E, or to both. But for someone<br>
> > who's understanding of aux isn't as solid, the term "CCS" can lead to<br>
> > incorrect inferences.<br>
> ><br>
> > For example, below you say that the partial resolve "operation is only<br>
> > available for CCS". That's misleading. It should say "only available for<br>
> > CCS_E".<br>
> ><br>
> > Another benefit: It becomes possible to document that<br>
> > ISL_AUX_STATE_COMPRESSED_NO_<wbr>CLEAR is valid only for CCS_E and HIZ, but<br>
> > not valid for CCS_D and MCS.<br>
> ><br>
><br>
> It is valid for MCS.  If you don't fast-clear but only render, then you're<br>
> in that state.  It's only invalid for CCS_D.<br>
<br>
</div></div>Oops. You're right. compressed-no-clear is the "normal" state for MCS<br>
compression blocks.<br>
<span class="gmail-"><br>
><br>
><br>
> > Other than the CCS_D/CCS_E distinction, the patch looks good to me. This<br>
> > is a really nice addition to the driver.<br>
> ><br>
><br>
> How about a section after the auxiliary compression ops section which goes<br>
> into detail on each of the compression types and discusses which states are<br>
> valid etc.<br>
<br>
</span>That sounds good, as long as there's not too much duplication between<br>
the two sections.<br>
</blockquote></div><br></div><div class="gmail_extra">How about this:<br><br><a href="https://cgit.freedesktop.org/~jekstrand/mesa/commit/?h=wip/i965-resolve-rework-v3&id=8478b102c99e3ec43ec687b3f4e52acb9acbd5ba">https://cgit.freedesktop.org/~jekstrand/mesa/commit/?h=wip/i965-resolve-rework-v3&id=8478b102c99e3ec43ec687b3f4e52acb9acbd5ba</a><br></div></div>