On Thu 29 Jun 2017, Jason Ekstrand wrote:
> From: Ben Widawsky <b...@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 <b...@bwidawsk.net>
> Acked-by: Daniel Stone <dani...@collabora.com>
> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@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 <chadvers...@chromium.org>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to