Henri Verbeet : wined3d: Make sure we have an active GL context before calling surface_remove_pbo() .

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


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

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

wined3d: Make sure we have an active GL context before calling surface_remove_pbo().

---

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

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 37cd88a..e3070d2 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4826,6 +4826,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D
              * but it isn't set (yet) in all cases it is getting called. */
             if((convert != NO_CONVERSION) && (This->Flags & SFLAG_PBO)) {
                 TRACE("Removing the pbo attached to surface %p\n", This);
+                if (!device->isInDraw) ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
                 surface_remove_pbo(This);
             }
 




More information about the wine-cvs mailing list