diff options
author | Felix Kuehling <fxkuehl@gmx.de> | 2005-03-17 15:34:44 +0000 |
---|---|---|
committer | Felix Kuehling <fxkuehl@gmx.de> | 2005-03-17 15:34:44 +0000 |
commit | b6bdfa27c9c84628d1f489a15d09214e920e7d86 (patch) | |
tree | 2afdadade690f6d9fffb93bb4b3fecc11ba3e5ef | |
parent | d2b0d82024da031257e943c424bd5f63cd0474e3 (diff) |
Invalidate 3D hardware state in SavageEnterVT. This fixes 3D applicationsXORG-6_8_99_1
running during a suspend-resume cycle.
-rw-r--r-- | src/savage_driver.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/savage_driver.c b/src/savage_driver.c index 5b7704e..977ebc3 100644 --- a/src/savage_driver.c +++ b/src/savage_driver.c @@ -31,6 +31,7 @@ #ifdef XF86DRI #define _XF86DRI_SERVER_ #include "savage_dri.h" +#include "savage_sarea.h" #endif @@ -2025,6 +2026,7 @@ static Bool SavageEnterVT(int scrnIndex, int flags) #ifdef XF86DRI SavagePtr psav= SAVPTR(pScrn); ScreenPtr pScreen; + SAVAGESAREAPrivPtr pSAREAPriv; #endif TRACE(("SavageEnterVT(%d)\n", flags)); @@ -2035,6 +2037,10 @@ static Bool SavageEnterVT(int scrnIndex, int flags) #ifdef XF86DRI if (psav->directRenderingEnabled) { pScreen = screenInfo.screens[scrnIndex]; + pSAREAPriv = (SAVAGESAREAPrivPtr)DRIGetSAREAPrivate(pScreen); + /* Assume that 3D state was clobbered, invalidate it by + * changing ctxOwner in the sarea. */ + pSAREAPriv->ctxOwner = DRIGetContext(pScreen); DRIUnlock(pScreen); psav->LockHeld = 0; } |