diff options
author | Alex Deucher <agd5f@yahoo.com> | 2004-10-07 02:29:02 +0000 |
---|---|---|
committer | Alex Deucher <agd5f@yahoo.com> | 2004-10-07 02:29:02 +0000 |
commit | 4c47495cedaf66d96e92373c0b2b453d2a017190 (patch) | |
tree | 7b6772f5699f5b8e3d71dfb51765ad8bbb3935a0 /src | |
parent | a9c9f97c80b3c80912fa79551755ff81e79dbbe6 (diff) |
fix glDrawPixels on Supersavage
Diffstat (limited to 'src')
-rw-r--r-- | src/savage_dri.c | 10 |
1 files 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 */ } } |