[Mesa-dev] [PATCH v2 25/27] i965: Pretend that CCS modified images are two planes

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


On Thu 29 Jun 2017, Jason Ekstrand wrote:
> From: Ben Widawsky <ben at bwidawsk.net>
> 
> v2: move is_aux into if block. (Jason)
> Use else block instead of goto (Jason)
> 
> v3: Fix up logic for is_aux (Ben)
> Fix up size calculations and add FIXME (Ben)
> 
> v4 (Jason Ekstrand):
> Use the aux_pitch in the image instead of calculating it
> 
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> Acked-by: Daniel Stone <daniels at collabora.com>
> Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/intel_screen.c | 54 +++++++++++++++++++-------------
>  1 file changed, 33 insertions(+), 21 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
> index 66fd99a..323cd5a 100644
> --- a/src/mesa/drivers/dri/i965/intel_screen.c
> +++ b/src/mesa/drivers/dri/i965/intel_screen.c
> @@ -757,7 +757,7 @@ intel_query_image(__DRIimage *image, int attrib, int *value)
>     case __DRI_IMAGE_ATTRIB_FOURCC:
>        return intel_lookup_fourcc(image->dri_format, value);
>     case __DRI_IMAGE_ATTRIB_NUM_PLANES:
> -      *value = 1;
> +      *value = image->aux_offset ? 2 : 1;

It makes me uncomfortable that we use image->aux_offset throughout the
patch to detect the presence of an aux surface. It just feels wrong to
me, and I'd like to see that query based on the image's modifier
instead.

Anyway, this patch is
Reviewed-by: Chad Versace <chadversary at chromium.org>


More information about the mesa-dev mailing list