summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorFelix Kuehling <[email protected]>2005-02-12 14:03:05 +0000
committerFelix Kuehling <[email protected]>2005-02-12 14:03:05 +0000
commit0872b85b1ea97850d42972c80c2d3350d5ae2d44 (patch)
tree27f28b99cb497b97a37619f28de73292e4729c6c /src/mesa
parent6125515cec54ce31521bb815d0d6f216a1ca0c3d (diff)
Savage3D-based chips seem so use a constant tile stride of 2048 for
vertically incomplete tiles, but only if the color depth is 32bpp. Nobody said this was supposed to be logical!
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/savage/savagetex.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/savage/savagetex.c b/src/mesa/drivers/dri/savage/savagetex.c
index 49aedc41301..47d9df13f86 100644
--- a/src/mesa/drivers/dri/savage/savagetex.c
+++ b/src/mesa/drivers/dri/savage/savagetex.c
@@ -269,7 +269,16 @@ static void savageUploadTexLevel( savageTexObjPtr t, int level )
GLuint wInTiles = width / tileInfo->width;
GLubyte *src = image->Data;
GLubyte *dest = (GLubyte *)(t->bufAddr + t->image[level].offset);
+ GLuint tileStride = tileInfo->width * bpp * height;
+ savageContextPtr imesa = (savageContextPtr)t->base.heap->driverContext;
GLuint x;
+ /* Savage3D-based chips seem so use a constant tile stride
+ * of 2048 for vertically incomplete tiles, but only if
+ * the color depth is 32bpp. Nobody said this was supposed
+ * to be logical!
+ */
+ if (bpp == 4 && imesa->savageScreen->chipset < S3_SAVAGE4)
+ tileStride = 2048;
for (x = 0; x < wInTiles; ++x) {
if (*dirtyPtr & dirtyMask) {
savageUploadTile (tileInfo,
@@ -278,7 +287,7 @@ static void savageUploadTexLevel( savageTexObjPtr t, int level )
bpp, src, width * bpp, dest);
}
src += tileInfo->width * bpp;
- dest += tileInfo->width * bpp * height;
+ dest += tileStride;
if (dirtyMask == 1<<31) {
dirtyMask = 1;
dirtyPtr++;