From a5570f3561ed4839a8a499e8938d62ad7a5a14ca Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Tue, 20 Mar 2007 09:10:19 +0100 Subject: 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. --- src/radeon_driver.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 14d13b5..fe56930 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 -- cgit v1.2.3