diff options
author | Eric Anholt <eric@anholt.net> | 2007-03-06 16:18:59 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-03-06 16:20:34 -0800 |
commit | 024bbc7cbb924daaf3e305ddfc8e74509acd1e15 (patch) | |
tree | c158acacc4b804a5e384d1f83d5600671774f4ed | |
parent | 9d94c137596d3f9d9118ec70455b7a30b3582046 (diff) |
Bug #9931: Fix linear allocations with a non-1-byte granularity.
This was introduced in 83080809f9a1c1d24b0318e54632f25f5940da25. Instead of
aligning the offset, it doubled it. Results were appropriately spectacular.
-rw-r--r-- | hw/xfree86/common/xf86fbman.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c index d64cfaee4..537d53d7d 100644 --- a/hw/xfree86/common/xf86fbman.c +++ b/hw/xfree86/common/xf86fbman.c @@ -968,7 +968,7 @@ localAllocateOffscreenLinear( linear->size = h * w; linear->offset = (pitch * area->box.y1) + area->box.x1; if (gran > 1) - linear->offset += ((linear->offset + gran - 1) / gran) * gran; + linear->offset = ((linear->offset + gran - 1) / gran) * gran; linear->granularity = gran; linear->MoveLinearCallback = moveCB; linear->RemoveLinearCallback = removeCB; |