diff options
author | Felix Kuehling <[email protected]> | 2005-02-23 16:37:27 +0000 |
---|---|---|
committer | Felix Kuehling <[email protected]> | 2005-02-23 16:37:27 +0000 |
commit | 540b260cbd39c103c045410b5312d4c57a569e33 (patch) | |
tree | a28288aa2ddb7f418dd6060d11af48ca75a5a51f /src/mesa/drivers/dri/savage/savagetex.c | |
parent | 8f5f6b3d59fa2ee25654283a235991f332bc8960 (diff) |
With Savage DRM version 2.3.x or later use event counters for texture
heap aging, similar to the way it's done in the i810 and i855 drivers.
This avoids idling the engine on every texture upload.
Diffstat (limited to 'src/mesa/drivers/dri/savage/savagetex.c')
-rw-r--r-- | src/mesa/drivers/dri/savage/savagetex.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/savage/savagetex.c b/src/mesa/drivers/dri/savage/savagetex.c index ec04b189620..0badde9dac7 100644 --- a/src/mesa/drivers/dri/savage/savagetex.c +++ b/src/mesa/drivers/dri/savage/savagetex.c @@ -770,7 +770,14 @@ static void savageUploadTexImages( savageContextPtr imesa, savageTexObjPtr t ) savageFlushVertices (imesa); LOCK_HARDWARE(imesa); savageFlushCmdBufLocked (imesa, GL_FALSE); - WAIT_IDLE_EMPTY_LOCKED(imesa); + /* Heap timestamps are only reliable with Savage DRM 2.3.x or + * later. Earlier versions had only 16 bit time stamps which + * would wrap too frequently. */ + if (imesa->savageScreen->driScrnPriv->drmMinor >= 3) { + unsigned int heap = t->base.heap->heapId; + savageWaitEvent (imesa, imesa->textureHeaps[heap]->timestamp); + } else + WAIT_IDLE_EMPTY_LOCKED(imesa); for (i = 0 ; i < numLevels ; i++) { const GLint j = t->base.firstLevel + i; /* the texObj's level */ |