From 4c47495cedaf66d96e92373c0b2b453d2a017190 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 7 Oct 2004 02:29:02 +0000 Subject: fix glDrawPixels on Supersavage --- src/savage_dri.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/savage_dri.c b/src/savage_dri.c index 50211f5..9d539d9 100644 --- a/src/savage_dri.c +++ b/src/savage_dri.c @@ -1446,10 +1446,12 @@ Bool SAVAGEDRIFinishScreenInit( ScreenPtr pScreen ) value |= (((pSAVAGEDRI->width + 0x1F) & 0xFFE0) >> 5) << 20; value |= 3<<30; } - - OUTREG(TILED_SURFACE_REGISTER_0, value|(pSAVAGEDRI->frontOffset >> 5) ); /* front */ - OUTREG(TILED_SURFACE_REGISTER_1, value|(pSAVAGEDRI->backOffset >> 5) ); /* back */ - OUTREG(TILED_SURFACE_REGISTER_2, value|(pSAVAGEDRI->depthOffset >> 5) ); /* depth */ + int offset_shift = 5; + if (psav->Chipset == S3_SUPERSAVAGE) /* supersavages have a different shift */ + offset_shift = 6; + OUTREG(TILED_SURFACE_REGISTER_0, value|(pSAVAGEDRI->frontOffset >> offset_shift) ); /* front */ + OUTREG(TILED_SURFACE_REGISTER_1, value|(pSAVAGEDRI->backOffset >> offset_shift) ); /* back */ + OUTREG(TILED_SURFACE_REGISTER_2, value|(pSAVAGEDRI->depthOffset >> offset_shift) ); /* depth */ } } -- cgit v1.2.3