[Mesa-stable] [Mesa-dev] [PATCH v2 4/5] intel/screen: Report the correct number of image planes

Jason Ekstrand jason at jlekstrand.net
Wed Aug 16 20:56:12 UTC 2017


On August 16, 2017 1:28:52 PM Ben Widawsky <ben at bwidawsk.net> wrote:

> On 17-08-16 13:26:00, Jason Ekstrand wrote:
>>For non-CCS images, we were reporting just one plane even though they
>>may have multiple in the case of YUV.
>>
>>Cc: <mesa-stable at lists.freedesktop.org>
>
> This has been wrong since it's initial implementation in 2014, ie. not stable
> material IMO..

I think that's just proof that no one cares about the query below which is 
really weird to me.  Still seems like a bug though.  Is like to hear from 
Kristian our Daniel to know if they know if there are any users and if this 
patch will break them.

> Reviewed-by: Ben Widawsky <ben at bwidawsk.net>
>
>>---
>> src/mesa/drivers/dri/i965/intel_screen.c | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>>
>>diff --git a/src/mesa/drivers/dri/i965/intel_screen.c 
>>b/src/mesa/drivers/dri/i965/intel_screen.c
>>index 9e65273..d454eeb 100644
>>--- a/src/mesa/drivers/dri/i965/intel_screen.c
>>+++ b/src/mesa/drivers/dri/i965/intel_screen.c
>>@@ -799,7 +799,14 @@ 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 = isl_drm_modifier_has_aux(image->modifier) ? 2 : 1;
>>+      if (isl_drm_modifier_has_aux(image->modifier)) {
>>+         assert(!image->planar_format || image->planar_format->nplanes == 1);
>>+         *value = 2;
>>+      } else if (image->planar_format) {
>>+         *value = image->planar_format->nplanes;
>>+      } else {
>>+         *value = 1;
>>+      }
>>       return true;
>>    case __DRI_IMAGE_ATTRIB_OFFSET:
>>       *value = image->offset;
>>--
>>2.5.0.400.gff86faf
>>
>>_______________________________________________
>>mesa-dev mailing list
>>mesa-dev at lists.freedesktop.org
>>https://lists.freedesktop.org/mailman/listinfo/mesa-dev




More information about the mesa-stable mailing list