From 4f398b29dd42260d2c02e8e795546fd0623397b1 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 9 Feb 2010 21:56:39 -0600 Subject: [PATCH] glamor: Align stride of fallback pixmap data to 32 bits. fb/pixman demand this alignment, and all sorts of things go badly otherwise. Fixes piglit x11-8bpp-7x8-draw. --- glamor/glamor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glamor/glamor.c b/glamor/glamor.c index 7bb093474..7bc75aa13 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -112,7 +112,8 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth, 0); screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, - (w * pixmap->drawable.bitsPerPixel + 7) / 8, + (((w * pixmap->drawable.bitsPerPixel + + 7) / 8) + 3) & ~3, NULL); return pixmap;