Re: [Mesa-dev] [PATCH v2 3/4] i965/screen: Report the correct number of image planes
On 5 September 2017 at 19:31, Jason Ekstrandwrote: > On Tue, Sep 5, 2017 at 10:25 AM, Emil Velikov > wrote: >> >> Hi Jason, >> >> On 5 September 2017 at 16:48, Jason Ekstrand wrote: >> > For non-CCS images, we were reporting just one plane even though they >> > may have multiple in the case of YUV. >> > >> > Reviewed-by: Ben Widawsky >> I think we want this for stable, right? > > > Maybe? Ben and I were debating it. I don't think it would hurt to send it > to stable but I also doubt it benefits us given that everything seems to be > working. I'm happy to add the tag if you'd like. > You and Ben know this code far better than me, so I'll leave it to you guys :-) Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v2 3/4] i965/screen: Report the correct number of image planes
On Tue, Sep 5, 2017 at 10:25 AM, Emil Velikovwrote: > Hi Jason, > > On 5 September 2017 at 16:48, Jason Ekstrand wrote: > > For non-CCS images, we were reporting just one plane even though they > > may have multiple in the case of YUV. > > > > Reviewed-by: Ben Widawsky > I think we want this for stable, right? > Maybe? Ben and I were debating it. I don't think it would hurt to send it to stable but I also doubt it benefits us given that everything seems to be working. I'm happy to add the tag if you'd like. > The series looks good, FWIW > Reviewed-by: Emil Velikov > > -Emil > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v2 3/4] i965/screen: Report the correct number of image planes
Hi Jason, On 5 September 2017 at 16:48, Jason Ekstrandwrote: > For non-CCS images, we were reporting just one plane even though they > may have multiple in the case of YUV. > > Reviewed-by: Ben Widawsky I think we want this for stable, right? The series looks good, FWIW Reviewed-by: Emil Velikov -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v2 3/4] i965/screen: Report the correct number of image planes
For non-CCS images, we were reporting just one plane even though they may have multiple in the case of YUV. Reviewed-by: Ben Widawsky--- 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 d39509b..ace244f 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@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev