summaryrefslogtreecommitdiff
path: root/fb
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2007-06-27 10:16:40 -0700
committerAaron Plattner <aplattner@nvidia.com>2007-06-27 10:16:40 -0700
commit1e189ed1daab58c1de67d387306fde0a9e7984a4 (patch)
tree389b45df59fde3ab014cb52dbde9288eff36e5b7 /fb
parentbf1ad1aa4270dccf1540943d97e80b317c0adb56 (diff)
Handle tileStride > 1 in fbEvenTile.
Patch courtesy of James Jones.
Diffstat (limited to 'fb')
-rw-r--r--fb/fb.h1
-rw-r--r--fb/fbtile.c12
2 files changed, 8 insertions, 5 deletions
diff --git a/fb/fb.h b/fb/fb.h
index 655d5ae0b..1ecae4760 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -2032,6 +2032,7 @@ fbEvenTile (FbBits *dst,
int height,
FbBits *tile,
+ FbStride tileStride,
int tileHeight,
int alu,
diff --git a/fb/fbtile.c b/fb/fbtile.c
index e7df1af5a..a9ffa9794 100644
--- a/fb/fbtile.c
+++ b/fb/fbtile.c
@@ -42,6 +42,7 @@ fbEvenTile (FbBits *dst,
int height,
FbBits *tile,
+ FbStride tileStride,
int tileHeight,
int alu,
@@ -68,9 +69,9 @@ fbEvenTile (FbBits *dst,
/*
* Compute tile start scanline and rotation parameters
*/
- tileEnd = tile + tileHeight;
+ tileEnd = tile + tileHeight * tileStride;
modulus (- yRot, tileHeight, tileY);
- t = tile + tileY;
+ t = tile + tileY * tileStride;
modulus (- xRot, FB_UNIT, tileX);
rot = tileX;
@@ -80,8 +81,9 @@ fbEvenTile (FbBits *dst,
/*
* Pick up bits for this scanline
*/
- bits = READ(t++);
- if (t == tileEnd) t = tile;
+ bits = READ(t);
+ t += tileStride;
+ if (t >= tileEnd) t = tile;
bits = FbRotLeft(bits,rot);
and = fbAnd(alu,bits,pm);
xor = fbXor(alu,bits,pm);
@@ -194,7 +196,7 @@ fbTile (FbBits *dst,
{
if (FbEvenTile (tileWidth))
fbEvenTile (dst, dstStride, dstX, width, height,
- tile, tileHeight,
+ tile, tileStride, tileHeight,
alu, pm, xRot, yRot);
else
fbOddTile (dst, dstStride, dstX, width, height,