diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-03-20 09:10:19 +0100 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-03-20 09:10:19 +0100 |
commit | 4651d00b183cb498879d605c4b93cd3a0c63cb33 (patch) | |
tree | 73a7f30a2178ed1402fdae37ab4730f008382e1f | |
parent | 2d2fb54ba370c1df9ef5102e83c17a7ff5c55403 (diff) |
radeon: Make sure 3D clients will re-upload textures to video RAM after LeaveVT.
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.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c index ca0b201..4842542 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -6874,6 +6874,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 |