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/savage_xmesa.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/savage_xmesa.c')
-rw-r--r-- | src/mesa/drivers/dri/savage/savage_xmesa.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index 3c0fae76473..8d274866371 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -742,6 +742,7 @@ void savageGetLock( savageContextPtr imesa, GLuint flags ) int me = imesa->hHWContext; int stamp = dPriv->lastStamp; int heap; + unsigned int timestamp = 0; @@ -781,6 +782,15 @@ void savageGetLock( savageContextPtr imesa, GLuint flags ) } for (heap = 0; heap < imesa->lastTexHeap; ++heap) { + /* If a heap was changed, update its timestamp. Do this before + * DRI_AGE_TEXTURES updates the local_age. */ + if (imesa->textureHeaps[heap] && + imesa->textureHeaps[heap]->global_age[0] > + imesa->textureHeaps[heap]->local_age) { + if (timestamp == 0) + timestamp = savageEmitEventLocked(imesa, 0); + imesa->textureHeaps[heap]->timestamp = timestamp; + } DRI_AGE_TEXTURES( imesa->textureHeaps[heap] ); } |