From b6bdfa27c9c84628d1f489a15d09214e920e7d86 Mon Sep 17 00:00:00 2001 From: Felix Kuehling Date: Thu, 17 Mar 2005 15:34:44 +0000 Subject: Invalidate 3D hardware state in SavageEnterVT. This fixes 3D applications running during a suspend-resume cycle. --- src/savage_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/savage_driver.c') 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; } -- cgit v1.2.3