[Mesa-dev] [PATCH 04/18] intel/isl: Rework the asserts and fails in isl_surf_get_ccs

Jason Ekstrand jason at jlekstrand.net
Thu Nov 17 03:28:17 UTC 2016


On Thu, Nov 3, 2016 at 7:26 AM, Pohjolainen, Topi <
topi.pohjolainen at gmail.com> wrote:

> On Fri, Oct 28, 2016 at 02:17:00AM -0700, Jason Ekstrand wrote:
> > There are some invariants such as number of samples on which we should
> > assert.  However, most other things should silently return false since
> > they're much easier for isl_surf_get_ccs to check than the caller.  We
> also
> > update the checking to be a bit more complete.
> >
> > Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
> > ---
> >  src/intel/isl/isl.c | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
> > index ec53072..578c0e7 100644
> > --- a/src/intel/isl/isl.c
> > +++ b/src/intel/isl/isl.c
> > @@ -1448,9 +1448,14 @@ isl_surf_get_ccs_surf(const struct isl_device
> *dev,
> >     assert(surf->samples == 1 && surf->msaa_layout ==
> ISL_MSAA_LAYOUT_NONE);
> >     assert(ISL_DEV_GEN(dev) >= 7);
> >
> > -   assert(ISL_DEV_GEN(dev) >= 8 || surf->dim == ISL_SURF_DIM_2D);
> > +   if (surf->usage & ISL_SURF_USAGE_DISABLE_AUX_BIT)
>
> Patch one stops setting the flag. Is this needed?
>

I don't know... As long as we have the flag, I figure we may as well
respect it.  Once we get i965 converted over, we may decide it's useless
and rop the flag.


> > +      return false;
> >
> > -   assert(surf->logical_level0_px.depth == 1);
> > +   if (ISL_DEV_GEN(dev) <= 8 && surf->dim != ISL_SURF_DIM_2D)
> > +      return false;
> > +
> > +   if (isl_format_is_compressed(surf->format))
> > +      return false;
> >
> >     /* TODO: More conditions where it can fail. */
> >
> > --
> > 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/20161116/418cdd62/attachment.html>


More information about the mesa-dev mailing list