Module: wine Branch: master Commit: 7f2257ca556f607e9e91337e67a0c12d40e73199 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7f2257ca556f607e9e91337e67...
Author: Alexander Dorofeyev alexd4@inbox.lv Date: Mon Apr 7 00:06:25 2008 +0300
wined3d: Add device->isInDraw checks in LoadLocation.
Prevents calling ActivateContext while holding gl lock, e.g. when preloading texture in sampler().
---
dlls/wined3d/surface.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 8190a15..97f0438 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4043,7 +4043,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D
/* Download the surface to system memory */ if(This->Flags & SFLAG_INTEXTURE) { - ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD); + if(!device->isInDraw) ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD); surface_bind_and_dirtify(This);
surface_download_data(This); @@ -4101,7 +4101,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D } else { /* Upload from system memory */ d3dfmt_get_conv(This, TRUE /* We need color keying */, TRUE /* We will use textures */, &format, &internal, &type, &convert, &bpp, This->srgb);
- ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD); + if(!device->isInDraw) ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD); surface_bind_and_dirtify(This); ENTER_GL();