<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 2, 2017 at 9:31 AM, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@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 Thu, Feb 2, 2017 at 9:03 AM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
> On Wed, Feb 1, 2017 at 4:07 PM, Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>> wrote:<br>
>><br>
>> On Wed, Feb 1, 2017 at 2:40 PM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
>> wrote:<br>
>> > Nothing uses this yet but it serves as a nice bit of documentation<br>
>> > that's relatively easy to find.<br>
>> > ---<br>
>> >  src/intel/isl/isl.h        |  2 ++<br>
>> >  src/intel/isl/isl_format.c | 15 +++++++++++++++<br>
>> >  2 files changed, 17 insertions(+)<br>
>> ><br>
>> > diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h<br>
>> > index bdc5ebf..47e4a1e 100644<br>
>> > --- a/src/intel/isl/isl.h<br>
>> > +++ b/src/intel/isl/isl.h<br>
>> > @@ -1040,6 +1040,8 @@ bool isl_format_supports_filtering(<wbr>const struct<br>
>> > gen_device_info *devinfo,<br>
>> >                                     enum isl_format format);<br>
>> >  bool isl_format_supports_vertex_<wbr>fetch(const struct gen_device_info<br>
>> > *devinfo,<br>
>> >                                        enum isl_format format);<br>
>> > +bool isl_format_supports_ccs_d(<wbr>const struct gen_device_info *devinfo,<br>
>> > +                               enum isl_format format);<br>
>> >  bool isl_format_supports_ccs_e(<wbr>const struct gen_device_info *devinfo,<br>
>> >                                 enum isl_format format);<br>
>> >  bool isl_format_supports_<wbr>multisampling(const struct gen_device_info<br>
>> > *devinfo,<br>
>> > diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c<br>
>> > index ebc8ec9..2705595 100644<br>
>> > --- a/src/intel/isl/isl_format.c<br>
>> > +++ b/src/intel/isl/isl_format.c<br>
>> > @@ -437,6 +437,21 @@ isl_format_supports_vertex_<wbr>fetch(const struct<br>
>> > gen_device_info *devinfo,<br>
>> >     return format_gen(devinfo) >= format_info[format].input_vb;<br>
>> >  }<br>
>> ><br>
>> > +/**<br>
>> > + * Returns true if the given format can support single-sample fast<br>
>> > clears.<br>
>> > + */<br>
>> > +bool<br>
>> > +isl_format_supports_ccs_d(<wbr>const struct gen_device_info *devinfo,<br>
>> > +                          enum isl_format format)<br>
>> > +{<br>
>> > +   if (!isl_format_supports_<wbr>rendering(devinfo, format))<br>
>> > +      return false;<br>
>> > +<br>
>> Add a check for non-MSRT?<br>
><br>
><br>
> Maybe?  There are other things we could potentially check for such as tiling<br>
> format, num samples, etc. in order to get a full "can this support<br>
> fast-clears" check.  I intended this to be just a format check.  Thoughts?<br>
><br>
</div></div>I'm fine with leaving it as it is with an added comment saying:<br>
It just checks for format. We need additional checks like tiling format,<br>
num samples to determine if this can support fast clears.<br></blockquote><div><br></div><div>Yeah, I can add a comment.  I'll add one to supports_ccs_e as well.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
As you're already here, you might want to add another helper to cover all<br>
the checks. I'll leave it up to you.<br></blockquote><div><br></div><div>As it currently stands, isl_surf_get_ccs_surf does a full set of checks and fails to create a CCS if sample count or tiling is wrong.  I mostly added this because Nanley was confused about the format criterion for fast-clears.<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">>><br>
>> > +   const struct isl_format_layout *fmtl =<br>
>> > isl_format_get_layout(format);<br>
>> > +<br>
>> > +   return fmtl->bpb == 32 || fmtl->bpb == 64 || fmtl->bpb == 128;<br>
>> > +}<br>
>> > +<br>
>> >  bool<br>
>> >  isl_format_supports_ccs_e(<wbr>const struct gen_device_info *devinfo,<br>
>> >                            enum isl_format format)<br>
>> > --<br>
>> > 2.5.0.400.gff86faf<br>
>> ><br>
>> > ______________________________<wbr>_________________<br>
>> > mesa-dev mailing list<br>
>> > <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
>> > <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
><br>
><br>
</div></div></blockquote></div><br></div></div>