[Mesa-dev] [PATCH v2 24/27] i965/screen: Support import and export of surfaces with CCS

Jason Ekstrand jason at jlekstrand.net
Fri Jul 14 20:31:54 UTC 2017


On Fri, Jul 14, 2017 at 11:46 AM, Chad Versace <chadversary at chromium.org>
wrote:

> On Wed 12 Jul 2017, Jason Ekstrand wrote:
> > On Wed, Jul 12, 2017 at 11:18 AM, Chad Versace <[1]
> chadversary at chromium.org>
> > wrote:
> >
> >     On Thu 29 Jun 2017, Jason Ekstrand wrote:
> >     > Reviewed-by: Topi Pohjolainen <[2]topi.pohjolainen at intel.com>
> >     > ---
> >     >  src/mesa/drivers/dri/i965/intel_screen.c | 55
> >     +++++++++++++++++++++++++++++---
> >     >  1 file changed, 50 insertions(+), 5 deletions(-)
> >     >
> >     > diff --git a/src/mesa/drivers/dri/i965/intel_screen.c
> b/src/mesa/drivers/
> >     dri/i965/intel_screen.c
> >     > index 03226af..66fd99a 100644
> >     > --- a/src/mesa/drivers/dri/i965/intel_screen.c
> >     > +++ b/src/mesa/drivers/dri/i965/intel_screen.c
> >     > @@ -671,7 +671,21 @@ intel_create_image_common(__DRIscreen
> *dri_screen,
> >     >        return NULL;
> >     >     }
> >     >
> >     > -   image->bo = brw_bo_alloc_tiled(screen->bufmgr, "image",
> surf.size,
> >     > +   struct isl_surf aux_surf;
> >     > +   if (mod_info->aux_usage == ISL_AUX_USAGE_CCS_E) {
> >     > +      ok = isl_surf_get_ccs_surf(&screen->isl_dev, &surf,
> &aux_surf, 0);
> >     > +      assert(ok);
> >     > +      if (!ok) {
> >
> >     Why assert(ok) then handle !ok ?
> >
> >
> > I should probably drop the assert.  This is definitely something that can
> > happen if you try to import an image with bad CCS information.  I
> thought maybe
> > asserting in debug builds would be useful.  Thoughs?
>
> If it's an error that we recover from, then it's better to emit
> an error message. Or, alternatively, do the assert and delete the
> recovery code.
>

It's not recoverable in the sense that the surface would be unusable.  I'll
drop the assert and just let it error out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170714/97d04804/attachment.html>


More information about the mesa-dev mailing list