mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-16 00:19:55 +00:00
Bug #9931: Fix linear allocations with a non-1-byte granularity.
This was introduced in 83080809f9. Instead of
aligning the offset, it doubled it. Results were appropriately spectacular.
This commit is contained in:
parent
9d94c13759
commit
024bbc7cbb
1 changed files with 1 additions and 1 deletions
|
|
@ -968,7 +968,7 @@ localAllocateOffscreenLinear(
|
||||||
linear->size = h * w;
|
linear->size = h * w;
|
||||||
linear->offset = (pitch * area->box.y1) + area->box.x1;
|
linear->offset = (pitch * area->box.y1) + area->box.x1;
|
||||||
if (gran > 1)
|
if (gran > 1)
|
||||||
linear->offset += ((linear->offset + gran - 1) / gran) * gran;
|
linear->offset = ((linear->offset + gran - 1) / gran) * gran;
|
||||||
linear->granularity = gran;
|
linear->granularity = gran;
|
||||||
linear->MoveLinearCallback = moveCB;
|
linear->MoveLinearCallback = moveCB;
|
||||||
linear->RemoveLinearCallback = removeCB;
|
linear->RemoveLinearCallback = removeCB;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue