<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 1, 2017 at 4:07 PM, 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 Wed, Feb 1, 2017 at 2:40 PM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> 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 gen_device_info *devinfo,<br>
>                                     enum isl_format format);<br>
>  bool isl_format_supports_vertex_<wbr>fetch(const struct gen_device_info *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 *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 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 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>
</div></div>Add a check for non-MSRT?<span class=""><br></span></blockquote><div><br></div><div>Maybe?  There are other things we could potentially check for such as tiling format, num samples, etc. in order to get a full "can this support fast-clears" check.  I intended this to be just a format check.  Thoughts?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> +   const struct isl_format_layout *fmtl = 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>
</span>> ______________________________<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>
</blockquote></div><br></div></div>