Module: wine Branch: master Commit: 5163a360e05b7a4e23e3d45afc910ff3707fedcd URL: http://source.winehq.org/git/wine.git/?a=commit;h=5163a360e05b7a4e23e3d45afc...
Author: Roderick Colenbrander thunderbird2k@gmx.net Date: Sat Oct 18 17:35:45 2008 +0000
wined3d: arbfp_blit_unset should call ENTER_GL/LEAVE_GL instead of the caller.
---
dlls/wined3d/arb_program_shader.c | 3 +++ dlls/wined3d/surface.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 2727124..9923749 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -3707,6 +3707,8 @@ static HRESULT arbfp_blit_set(IWineD3DDevice *iface, WINED3DFORMAT fmt, GLenum t
static void arbfp_blit_unset(IWineD3DDevice *iface) { IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface; + + ENTER_GL(); glDisable(GL_FRAGMENT_PROGRAM_ARB); checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)"); glDisable(GL_TEXTURE_2D); @@ -3719,6 +3721,7 @@ static void arbfp_blit_unset(IWineD3DDevice *iface) { glDisable(GL_TEXTURE_RECTANGLE_ARB); checkGLcall("glDisable(GL_TEXTURE_RECTANGLE_ARB)"); } + LEAVE_GL(); }
static BOOL arbfp_blit_conv_supported(WINED3DFORMAT fmt) { diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 53392a5..2d6a097 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3556,8 +3556,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
glBindTexture(Src->glDescription.target, 0); checkGLcall("glBindTexture(Src->glDescription.target, 0)"); - /* Leave the opengl state valid for blitting */ - myDevice->blitter->unset_shader((IWineD3DDevice *) myDevice);
/* Restore the color key parameters */ Src->CKeyFlags = oldCKeyFlags; @@ -3569,6 +3567,9 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
LEAVE_GL();
+ /* Leave the opengl state valid for blitting */ + myDevice->blitter->unset_shader((IWineD3DDevice *) myDevice); + /* Flush in case the drawable is used by multiple GL contexts */ if(dstSwapchain && (This == (IWineD3DSurfaceImpl *) dstSwapchain->frontBuffer || dstSwapchain->num_contexts >= 2)) glFlush();