[Mesa-dev] [PATCH v3 11/14] i965/screen: Support import and export of surfaces with CCS

Chad Versace chadversary at chromium.org
Fri Jul 14 22:48:04 UTC 2017


On Wed 12 Jul 2017, Jason Ekstrand wrote:
> Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/intel_screen.c | 69 +++++++++++++++++++++++++++++---
>  1 file changed, 64 insertions(+), 5 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
> index b292300..259e98a 100644
> --- a/src/mesa/drivers/dri/i965/intel_screen.c
> +++ b/src/mesa/drivers/dri/i965/intel_screen.c
> @@ -674,6 +674,19 @@ intel_create_image_common(__DRIscreen *dri_screen,
>        return NULL;
>     }
>  
> +   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) {
> +         free(image);
> +         return NULL;
> +      }

The weird assert-but-not-really is still here.

> +
> +      /* Scanout hardware requires that the CCS be placed after the main
> +       * surface in memory.  We consider any CCS that is placed any earlier in
> +       * memory to be invalid and reject it.
> +       *
> +       * At some point in the future, this restriction may be relaxed if the
> +       * hardware becomes less strict but we may need a new modifier for that.
> +       */
> +      assert(size > 0);
> +      if (image->aux_offset < size) {
> +         brw_bo_unreference(image->bo);
> +         free(image);
> +         return NULL;
> +      }

Thanks for the comment.
Reviewed-by: Chad Versace <chadversary at chromium.org>



More information about the mesa-dev mailing list