summaryrefslogtreecommitdiff
path: root/src/savage_dri.c
diff options
context:
space:
mode:
authorAlex Deucher <agd5f@yahoo.com>2004-10-07 03:40:46 +0000
committerAlex Deucher <agd5f@yahoo.com>2004-10-07 03:40:46 +0000
commit54a78b4d252ba06dd520c5d43ad55b31323408ec (patch)
treef885306bcebc8b805bc04d50174b0d4cfb9bd2f7 /src/savage_dri.c
parent4c47495cedaf66d96e92373c0b2b453d2a017190 (diff)
Require tiled mode for 3D
Diffstat (limited to 'src/savage_dri.c')
-rw-r--r--src/savage_dri.c103
1 files changed, 42 insertions, 61 deletions
diff --git a/src/savage_dri.c b/src/savage_dri.c
index 9d539d9..7c569cc 100644
--- a/src/savage_dri.c
+++ b/src/savage_dri.c
@@ -697,8 +697,7 @@ static Bool SAVAGEDRIAgpInit(ScreenPtr pScreen)
int size,numbuffer,i;
savageAgpBufferPtr agpbuffer;
- /* FIXME: Make these configurable...
- */
+
/*pSAVAGEDRIServer->agp.size = 16 * 1024 * 1024;*/
pSAVAGEDRIServer->agp.size = psav->agpSize * 1024 * 1024;
pSAVAGEDRIServer->agp.offset = pSAVAGEDRIServer->agp.size;
@@ -1295,7 +1294,7 @@ Bool SAVAGEDRIFinishScreenInit( ScreenPtr pScreen )
pSAVAGEDRI->frontbuffer = psav->FrameBufferBase +
pSAVAGEDRI->frontOffset;
pSAVAGEDRI->frontPitch = pSAVAGEDRIServer->frontPitch;
- pSAVAGEDRI->IsfrontTiled = psav->bTiled; /* AGD: was 0 */
+ pSAVAGEDRI->IsfrontTiled = psav->bTiled;
if(pSAVAGEDRI->cpp==2)
TileStride = (pSAVAGEDRI->width+63)&(~63);
@@ -1307,62 +1306,45 @@ Bool SAVAGEDRIFinishScreenInit( ScreenPtr pScreen )
else
zTileStride = (pSAVAGEDRI->width+31)&(~31);
- if(pSAVAGEDRI->IsfrontTiled)
- {
- if ((psav->Chipset == S3_TWISTER)
- || (psav->Chipset == S3_PROSAVAGE)
- || (psav->Chipset == S3_PROSAVAGEDDR)
- || (psav->Chipset == S3_SUPERSAVAGE))
- {
- pSAVAGEDRI->frontBitmapDesc = BCI_BD_BW_DISABLE | /* block write disabled */
- (1<<24) | /* destination tile format */
- (pScrn->bitsPerPixel<<16) | /* bpp */
- TileStride; /* stride */
- pSAVAGEDRI->frontPitch = TileStride;
- } else {
- pSAVAGEDRI->frontBitmapDesc = BCI_BD_BW_DISABLE | /* block write disabled */
- ((pSAVAGEDRI->cpp==2)?
- BCI_BD_TILE_16:BCI_BD_TILE_32) | /*16/32 bpp tile format */
- (pScrn->bitsPerPixel<<16) | /* bpp */
- TileStride; /* stride */
- pSAVAGEDRI->frontPitch = TileStride;
- }
- }
- else
- {
- pSAVAGEDRI->frontBitmapDesc = BCI_BD_BW_DISABLE | /* AGD: block write should be disabled: was 0x00000000 */
- pScrn->bitsPerPixel<<16 |
- pSAVAGEDRI->width;
- }
-
- {
- if ((psav->Chipset == S3_TWISTER)
- || (psav->Chipset == S3_PROSAVAGE)
- || (psav->Chipset == S3_PROSAVAGEDDR)
- || (psav->Chipset == S3_SUPERSAVAGE))
- {
- pSAVAGEDRI->backBitmapDesc = BCI_BD_BW_DISABLE |
- (1<<24) |
- (pScrn->bitsPerPixel<<16) |
- TileStride;
- pSAVAGEDRI->depthBitmapDesc = BCI_BD_BW_DISABLE |
- (1<<24) |
- (pScrn->bitsPerPixel<<16) |
- zTileStride;
- } else {
- pSAVAGEDRI->backBitmapDesc = BCI_BD_BW_DISABLE |
- ((pSAVAGEDRI->cpp==2)?
- BCI_BD_TILE_16:BCI_BD_TILE_32) |
- (pScrn->bitsPerPixel<<16) |
- TileStride;
- pSAVAGEDRI->depthBitmapDesc = BCI_BD_BW_DISABLE |
- ((pSAVAGEDRI->zpp==2)?
- BCI_BD_TILE_16:BCI_BD_TILE_32) |
- (pScrn->bitsPerPixel<<16) |
- zTileStride;
- }
+ if ((psav->Chipset == S3_TWISTER)
+ || (psav->Chipset == S3_PROSAVAGE)
+ || (psav->Chipset == S3_PROSAVAGEDDR)
+ || (psav->Chipset == S3_SUPERSAVAGE)) {
+ pSAVAGEDRI->frontBitmapDesc = BCI_BD_BW_DISABLE | /* block write disabled */
+ (1<<24) | /* destination tile format */
+ (pScrn->bitsPerPixel<<16) | /* bpp */
+ TileStride; /* stride */
+
+ pSAVAGEDRI->backBitmapDesc = BCI_BD_BW_DISABLE |
+ (1<<24) |
+ (pScrn->bitsPerPixel<<16) |
+ TileStride;
+
+ pSAVAGEDRI->depthBitmapDesc = BCI_BD_BW_DISABLE |
+ (1<<24) |
+ (pScrn->bitsPerPixel<<16) |
+ zTileStride;
+ } else {
+ pSAVAGEDRI->frontBitmapDesc = BCI_BD_BW_DISABLE | /* block write disabled */
+ ((pSAVAGEDRI->cpp==2)?
+ BCI_BD_TILE_16:BCI_BD_TILE_32) | /*16/32 bpp tile format */
+ (pScrn->bitsPerPixel<<16) | /* bpp */
+ TileStride; /* stride */
+
+ pSAVAGEDRI->backBitmapDesc = BCI_BD_BW_DISABLE |
+ ((pSAVAGEDRI->cpp==2)?
+ BCI_BD_TILE_16:BCI_BD_TILE_32) |
+ (pScrn->bitsPerPixel<<16) |
+ TileStride;
+
+ pSAVAGEDRI->depthBitmapDesc = BCI_BD_BW_DISABLE |
+ ((pSAVAGEDRI->zpp==2)?
+ BCI_BD_TILE_16:BCI_BD_TILE_32) |
+ (pScrn->bitsPerPixel<<16) |
+ zTileStride;
}
+ pSAVAGEDRI->frontPitch = TileStride;
pSAVAGEDRI->backOffset = pSAVAGEDRIServer->backOffset;
pSAVAGEDRI->backbufferSize = pSAVAGEDRIServer->backbufferSize;
pSAVAGEDRI->backbuffer = psav->FrameBufferBase +
@@ -1409,8 +1391,7 @@ Bool SAVAGEDRIFinishScreenInit( ScreenPtr pScreen )
if(pSAVAGEDRI->width > 1024)
shift = 1;
- /* pSAVAGEDRI->aperturePitch = psav->ulAperturePitch; */
- pSAVAGEDRI->aperturePitch = psav->ul3DAperturePitch;
+ pSAVAGEDRI->aperturePitch = psav->ulAperturePitch;
}
{
@@ -1427,10 +1408,10 @@ Bool SAVAGEDRIFinishScreenInit( ScreenPtr pScreen )
|| (psav->Chipset == S3_SAVAGE3D)) {
if(pSAVAGEDRI->cpp == 2)
{
- value |= ((psav->l3DDelta / 4) >> 5) << 24;
+ value |= ((psav->lDelta / 4) >> 5) << 24;
value |= 2<<30;
} else {
- value |= ((psav->l3DDelta / 4) >> 5) << 24;
+ value |= ((psav->lDelta / 4) >> 5) << 24;
value |= 3<<30;
}