From a635bb5357648779815ec6729d55f6b478493213 Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Tue, 17 Mar 2009 19:34:45 +0100 Subject: [PATCH] exa: round of fb_pitch to the next byte --- exa/exa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exa/exa.c b/exa/exa.c index 3fcb3e248..ecb2117cf 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -258,9 +258,9 @@ exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, int w, int h, int bpp) { if (pExaScr->info->flags & EXA_OFFSCREEN_ALIGN_POT && w != 1) - pExaPixmap->fb_pitch = (1 << (exaLog2(w - 1) + 1)) * bpp / 8; + pExaPixmap->fb_pitch = ((1 << (exaLog2(w - 1) + 1)) * bpp + 7) / 8; else - pExaPixmap->fb_pitch = w * bpp / 8; + pExaPixmap->fb_pitch = (w * bpp + 7) / 8; pExaPixmap->fb_pitch = EXA_ALIGN(pExaPixmap->fb_pitch, pExaScr->info->pixmapPitchAlign);