[Mesa-dev] [PATCH 2/5] intel/isl: Add a supports_ccs_d helper

Jason Ekstrand jason at jlekstrand.net
Thu Feb 2 17:42:36 UTC 2017


On Thu, Feb 2, 2017 at 9:31 AM, Anuj Phogat <anuj.phogat at gmail.com> wrote:

> On Thu, Feb 2, 2017 at 9:03 AM, Jason Ekstrand <jason at jlekstrand.net>
> wrote:
> > On Wed, Feb 1, 2017 at 4:07 PM, Anuj Phogat <anuj.phogat at gmail.com>
> wrote:
> >>
> >> On Wed, Feb 1, 2017 at 2:40 PM, Jason Ekstrand <jason at jlekstrand.net>
> >> wrote:
> >> > Nothing uses this yet but it serves as a nice bit of documentation
> >> > that's relatively easy to find.
> >> > ---
> >> >  src/intel/isl/isl.h        |  2 ++
> >> >  src/intel/isl/isl_format.c | 15 +++++++++++++++
> >> >  2 files changed, 17 insertions(+)
> >> >
> >> > diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h
> >> > index bdc5ebf..47e4a1e 100644
> >> > --- a/src/intel/isl/isl.h
> >> > +++ b/src/intel/isl/isl.h
> >> > @@ -1040,6 +1040,8 @@ bool isl_format_supports_filtering(const struct
> >> > gen_device_info *devinfo,
> >> >                                     enum isl_format format);
> >> >  bool isl_format_supports_vertex_fetch(const struct gen_device_info
> >> > *devinfo,
> >> >                                        enum isl_format format);
> >> > +bool isl_format_supports_ccs_d(const struct gen_device_info
> *devinfo,
> >> > +                               enum isl_format format);
> >> >  bool isl_format_supports_ccs_e(const struct gen_device_info
> *devinfo,
> >> >                                 enum isl_format format);
> >> >  bool isl_format_supports_multisampling(const struct gen_device_info
> >> > *devinfo,
> >> > diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c
> >> > index ebc8ec9..2705595 100644
> >> > --- a/src/intel/isl/isl_format.c
> >> > +++ b/src/intel/isl/isl_format.c
> >> > @@ -437,6 +437,21 @@ isl_format_supports_vertex_fetch(const struct
> >> > gen_device_info *devinfo,
> >> >     return format_gen(devinfo) >= format_info[format].input_vb;
> >> >  }
> >> >
> >> > +/**
> >> > + * Returns true if the given format can support single-sample fast
> >> > clears.
> >> > + */
> >> > +bool
> >> > +isl_format_supports_ccs_d(const struct gen_device_info *devinfo,
> >> > +                          enum isl_format format)
> >> > +{
> >> > +   if (!isl_format_supports_rendering(devinfo, format))
> >> > +      return false;
> >> > +
> >> Add a check for non-MSRT?
> >
> >
> > 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?
> >
> I'm fine with leaving it as it is with an added comment saying:
> It just checks for format. We need additional checks like tiling format,
> num samples to determine if this can support fast clears.
>

Yeah, I can add a comment.  I'll add one to supports_ccs_e as well.


> As you're already here, you might want to add another helper to cover all
> the checks. I'll leave it up to you.
>

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.


> >>
> >> > +   const struct isl_format_layout *fmtl =
> >> > isl_format_get_layout(format);
> >> > +
> >> > +   return fmtl->bpb == 32 || fmtl->bpb == 64 || fmtl->bpb == 128;
> >> > +}
> >> > +
> >> >  bool
> >> >  isl_format_supports_ccs_e(const struct gen_device_info *devinfo,
> >> >                            enum isl_format format)
> >> > --
> >> > 2.5.0.400.gff86faf
> >> >
> >> > _______________________________________________
> >> > mesa-dev mailing list
> >> > mesa-dev at lists.freedesktop.org
> >> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170202/d7e7dd5b/attachment.html>


More information about the mesa-dev mailing list