Henri Verbeet : wined3d: Make sure we have an active GL context in IWineD3DSurfaceImpl_UnLoad().

Alexandre Julliard julliard at winehq.org
Fri Jun 26 09:47:11 CDT 2009


Module: wine
Branch: master
Commit: db5b126da6c5099b4dab9c575a49afde93381b0a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=db5b126da6c5099b4dab9c575a49afde93381b0a

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Fri Jun 26 10:07:09 2009 +0200

wined3d: Make sure we have an active GL context in IWineD3DSurfaceImpl_UnLoad().

---

 dlls/wined3d/surface.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 424d2e3..37cd88a 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -836,6 +836,7 @@ static void surface_remove_pbo(IWineD3DSurfaceImpl *This) {
 static void WINAPI IWineD3DSurfaceImpl_UnLoad(IWineD3DSurface *iface) {
     IWineD3DBaseTexture *texture = NULL;
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
+    IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
     renderbuffer_entry_t *entry, *entry2;
     TRACE("(%p)\n", iface);
 
@@ -866,6 +867,8 @@ static void WINAPI IWineD3DSurfaceImpl_UnLoad(IWineD3DSurface *iface) {
     IWineD3DSurface_ModifyLocation(iface, SFLAG_INSRGBTEX, FALSE);
     This->Flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED);
 
+    ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
+
     /* Destroy PBOs, but load them into real sysmem before */
     if(This->Flags & SFLAG_PBO) {
         surface_remove_pbo(This);




More information about the wine-cvs mailing list