summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-03-20 09:10:19 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2007-03-20 09:26:15 +0100
commita5570f3561ed4839a8a499e8938d62ad7a5a14ca (patch)
treed9febfadf67746b666cd272dbc4c896cd4722224
parent355fa6a5f01183ce2c6fadc7f1e8cb683b9adfd4 (diff)
radeon: Make sure 3D clients will re-upload textures to video RAM after LeaveVT.ati-6.6-branch
Walk the SAREA texList and bump the age of every active object, so their owners will consider them kicked out when they grab the HW lock next time.
-rw-r--r--src/radeon_driver.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 14d13b5c..fe569308 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -9142,6 +9142,19 @@ _X_EXPORT void RADEONLeaveVT(int scrnIndex, int flags)
/* we need to backup the PCIE GART TABLE from fb memory */
memcpy(info->pciGartBackup, (info->FB + info->pciGartOffset), info->pciGartSize);
}
+
+ /* Make sure 3D clients will re-upload textures to video RAM */
+ if (info->textureSize) {
+ RADEONSAREAPrivPtr pSAREAPriv =
+ (RADEONSAREAPrivPtr)DRIGetSAREAPrivate(pScrn->pScreen);
+ drmTextureRegionPtr list = pSAREAPriv->texList[0];
+ int age = ++pSAREAPriv->texAge[0], i = 0;
+
+ do {
+ list[i].age = age;
+ i = list[i].next;
+ } while (i != 0);
+ }
}
#endif