glamor: fix glamor_xv_query_image_attributes() for odd-width images

Images which are one pixel wider than a multiple of 8 are being handled
incorrectly. Other drivers round up the width to a multiple of two
before they start calculating. Do the same.

https://bugzilla.gnome.org/show_bug.cgi?id=795235

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
David Woodhouse 2018-04-17 22:22:21 +01:00 committed by Adam Jackson
parent ac7a4bf44c
commit 12a6b189fb

View File

@ -210,6 +210,7 @@ glamor_xv_query_image_attributes(int id,
switch (id) {
case FOURCC_YV12:
case FOURCC_I420:
*w = ALIGN(*w, 2);
*h = ALIGN(*h, 2);
size = ALIGN(*w, 4);
if (pitches)