summaryrefslogtreecommitdiff
path: root/exa/exa.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-08-14 19:46:55 +0000
committerEric Anholt <anholt@freebsd.org>2005-08-14 19:46:55 +0000
commitebedc8bbb54b9b4e1814bc2758216af2bab93540 (patch)
tree98b942007c17210130e5cbed9d3f389b296bccb2 /exa/exa.c
parente3509c940fa1fc3988d23f884ca8bffc87d091e5 (diff)
- Fix the exa pixmap offset/pitch alignment to deal with non-POT alignment
requirements. MGA, notably, uses a multiple of 3 in some cases. - Rename the pixmap offset/pitch alignment fields to more clearly state their meaning.
Diffstat (limited to 'exa/exa.c')
-rw-r--r--exa/exa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/exa/exa.c b/exa/exa.c
index f7574586d..5ba8af356 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -162,13 +162,13 @@ exaPixmapAllocArea (PixmapPtr pPixmap)
if (pExaScr->info->card.flags & EXA_OFFSCREEN_ALIGN_POT && w != 1)
w = 1 << (exaLog2(w - 1) + 1);
- pitch = (w * bpp / 8 + pExaScr->info->card.offscreenPitch - 1) &
- ~(pExaScr->info->card.offscreenPitch - 1);
+ pitch = (w * bpp / 8) + (pExaScr->info->card.pixmapPitchAlign - 1);
+ pitch -= pitch % pExaScr->info->card.pixmapPitchAlign;
pExaPixmap->devKind = pPixmap->devKind;
pExaPixmap->devPrivate = pPixmap->devPrivate;
pExaPixmap->area = exaOffscreenAlloc (pScreen, pitch * h,
- pExaScr->info->card.offscreenByteAlign,
+ pExaScr->info->card.pixmapOffsetAlign,
FALSE,
exaPixmapSave, (pointer) pPixmap);
if (!pExaPixmap->area)