aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/savage/savageioctl.c
diff options
context:
space:
mode:
authorFelix Kuehling <[email protected]>2005-02-23 16:37:27 +0000
committerFelix Kuehling <[email protected]>2005-02-23 16:37:27 +0000
commit540b260cbd39c103c045410b5312d4c57a569e33 (patch)
treea28288aa2ddb7f418dd6060d11af48ca75a5a51f /src/mesa/drivers/dri/savage/savageioctl.c
parent8f5f6b3d59fa2ee25654283a235991f332bc8960 (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/savageioctl.c')
-rw-r--r--src/mesa/drivers/dri/savage/savageioctl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/savage/savageioctl.c b/src/mesa/drivers/dri/savage/savageioctl.c
index 707fcb6ffb5..3c932553613 100644
--- a/src/mesa/drivers/dri/savage/savageioctl.c
+++ b/src/mesa/drivers/dri/savage/savageioctl.c
@@ -617,6 +617,18 @@ void savageFlushCmdBufLocked( savageContextPtr imesa, GLboolean discard )
imesa->cmdBuf.write = imesa->cmdBuf.base;
savageEmitOldState(imesa);
imesa->cmdBuf.start = imesa->cmdBuf.write;
+
+ /* Timestamp current texture objects for texture heap aging.
+ * Only useful with long-lived 32-bit event tags available
+ * with Savage DRM 2.3.x or later. */
+ if ((imesa->CurrentTexObj[0] || imesa->CurrentTexObj[1]) &&
+ imesa->savageScreen->driScrnPriv->drmMinor >= 3) {
+ unsigned int e = savageEmitEventLocked(imesa, 0);
+ if (imesa->CurrentTexObj[0])
+ imesa->CurrentTexObj[0]->timestamp = e;
+ if (imesa->CurrentTexObj[1])
+ imesa->CurrentTexObj[1]->timestamp = e;
+ }
}
if (discard) {