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

Chad Versace chadversary at chromium.org
Wed Jul 12 18:18:31 UTC 2017


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 ?

The rest of the patch looks good to me.

> +         free(image);
> +         return NULL;



More information about the mesa-dev mailing list