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

Jason Ekstrand jason at jlekstrand.net
Wed Jul 12 21:34:58 UTC 2017


On Wed, Jul 12, 2017 at 11:18 AM, Chad Versace <chadversary at chromium.org>
wrote:

> On Thu 29 Jun 2017, Jason Ekstrand wrote:
> > Reviewed-by: Topi Pohjolainen <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?

--Jason


> The rest of the patch looks good to me.
>
> > +         free(image);
> > +         return NULL;
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170712/f691c690/attachment.html>


More information about the mesa-dev mailing list