Module: wine Branch: master Commit: b0583a241007931f4d0dcd03cf33a04e044490d4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b0583a241007931f4d0dcd03cf...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Feb 3 18:17:56 2010 +0100
wined3d: Never acquire a context in IWineD3DSurfaceImpl_BindTexture().
The caller is already responsible for doing this, so it's redundant at best.
---
dlls/wined3d/surface.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 2bc08b8..612979a 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2700,7 +2700,6 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface, BO static void WINAPI IWineD3DSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL srgb) { /* TODO: check for locks */ IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - IWineD3DDeviceImpl *device = This->resource.device; IWineD3DBaseTexture *baseTexture = NULL;
TRACE("(%p)Checking to see if the container is a base texture\n", This); @@ -2711,13 +2710,11 @@ static void WINAPI IWineD3DSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL } else { - struct wined3d_context *context = NULL; GLuint *name;
TRACE("(%p) : Binding surface\n", This);
name = srgb ? &This->texture_name_srgb : &This->texture_name; - if (!device->isInDraw) context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD);
ENTER_GL();
@@ -2751,8 +2748,6 @@ static void WINAPI IWineD3DSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL checkGLcall("glBindTexture");
LEAVE_GL(); - - if (context) context_release(context); } }