summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/savage/savagetex.c
diff options
context:
space:
mode:
authorFelix Kuehling <[email protected]>2005-01-01 20:40:14 +0000
committerFelix Kuehling <[email protected]>2005-01-01 20:40:14 +0000
commit1067ce0cea1392b4ea1cc1c2c940cec33efb9c96 (patch)
tree8a489032a80fea40a528c64e745cc5bd53aacfdf /src/mesa/drivers/dri/savage/savagetex.c
parent467d64a177d611293c6db14daf97997b389f3cb0 (diff)
Removed all direct hardware access (MMIO, BCI) from the Savage DRI
driver. It uses the new DRM version 2.0.x now, which has just been committed to DRM CVS.
Diffstat (limited to 'src/mesa/drivers/dri/savage/savagetex.c')
-rw-r--r--src/mesa/drivers/dri/savage/savagetex.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/savage/savagetex.c b/src/mesa/drivers/dri/savage/savagetex.c
index c6143baabdd..924f06187b4 100644
--- a/src/mesa/drivers/dri/savage/savagetex.c
+++ b/src/mesa/drivers/dri/savage/savagetex.c
@@ -606,7 +606,7 @@ void savagePrintGlobalLRU( savageContextPtr imesa , GLuint heap)
{
int i, j;
- drm_savage_tex_region_t *list = imesa->sarea->texList[heap];
+ drm_tex_region_t *list = imesa->sarea->texList[heap];
for (i = 0, j = SAVAGE_NR_TEX_REGIONS ; i < SAVAGE_NR_TEX_REGIONS ; i++) {
@@ -628,7 +628,7 @@ void savagePrintGlobalLRU( savageContextPtr imesa , GLuint heap)
void savageResetGlobalLRU( savageContextPtr imesa, GLuint heap )
{
- drm_savage_tex_region_t *list = imesa->sarea->texList[heap];
+ drm_tex_region_t *list = imesa->sarea->texList[heap];
int sz = 1 << imesa->savageScreen->logTextureGranularity[heap];
int i;
@@ -661,7 +661,7 @@ static void savageUpdateTexLRU( savageContextPtr imesa, savageTextureObjectPtr t
int logsz = imesa->savageScreen->logTextureGranularity[heap];
int start = t->MemBlock->ofs >> logsz;
int end = (t->MemBlock->ofs + t->MemBlock->size - 1) >> logsz;
- drm_savage_tex_region_t *list = imesa->sarea->texList[heap];
+ drm_tex_region_t *list = imesa->sarea->texList[heap];
imesa->texAge[heap] = ++imesa->sarea->texAge[heap];
@@ -787,16 +787,19 @@ int savageUploadTexImages( savageContextPtr imesa, savageTextureObjectPtr t )
ofs = t->MemBlock->ofs;
t->texParams.hwPhysAddress = imesa->savageScreen->textureOffset[heap] + ofs;
t->BufAddr = (char *)((GLuint) imesa->savageScreen->texVirtual[heap] + ofs);
- imesa->dirty |= SAVAGE_UPLOAD_CTX;
+ imesa->dirty |= SAVAGE_UPLOAD_GLOBAL; /* FIXME: really needed? */
}
/* Let the world know we've used this memory recently.
*/
+ LOCK_HARDWARE(imesa);
savageUpdateTexLRU( imesa, t );
+ UNLOCK_HARDWARE(imesa);
if (t->dirty_images) {
+ savageFlushVertices (imesa);
LOCK_HARDWARE(imesa);
- savageFlushVerticesLocked (imesa);
+ savageFlushCmdBufLocked (imesa, GL_FALSE);
savageDmaFinish (imesa);
if (SAVAGE_DEBUG & DEBUG_VERBOSE_LRU)
fprintf(stderr, "*");
@@ -1436,8 +1439,7 @@ static void savageUpdateTextureState_s4( GLcontext *ctx )
imesa->CurrentTexObj[1] = 0;
savageUpdateTex0State_s4( ctx );
savageUpdateTex1State_s4( ctx );
- imesa->dirty |= (SAVAGE_UPLOAD_CTX |
- SAVAGE_UPLOAD_TEX0 |
+ imesa->dirty |= (SAVAGE_UPLOAD_TEX0 |
SAVAGE_UPLOAD_TEX1);
}
static void savageUpdateTextureState_s3d( GLcontext *ctx )
@@ -1446,8 +1448,7 @@ static void savageUpdateTextureState_s3d( GLcontext *ctx )
if (imesa->CurrentTexObj[0]) imesa->CurrentTexObj[0]->bound &= ~1;
imesa->CurrentTexObj[0] = 0;
savageUpdateTexState_s3d( ctx );
- imesa->dirty |= (SAVAGE_UPLOAD_CTX |
- SAVAGE_UPLOAD_TEX0);
+ imesa->dirty |= (SAVAGE_UPLOAD_TEX0);
}
void savageUpdateTextureState( GLcontext *ctx)
{