From 241d306221265b18785e4f1b2d07a13b493d394d Mon Sep 17 00:00:00 2001 From: Lionel Ulmer Date: Wed, 4 Jun 2003 23:17:23 +0000 Subject: [PATCH] - protect viewport setting with GL lock - no need anymore to flush to FB on execute buffer calling --- dlls/ddraw/d3ddevice/mesa.c | 4 ++++ dlls/ddraw/d3dexecutebuffer.c | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/ddraw/d3ddevice/mesa.c b/dlls/ddraw/d3ddevice/mesa.c index faad8ba3d0b..d43978983a9 100644 --- a/dlls/ddraw/d3ddevice/mesa.c +++ b/dlls/ddraw/d3ddevice/mesa.c @@ -2232,11 +2232,15 @@ GL_IDirect3DDeviceImpl_7_SetViewport(LPDIRECT3DDEVICE7 iface, } This->active_viewport = *lpData; + ENTER_GL(); + /* Set the viewport */ glDepthRange(lpData->dvMinZ, lpData->dvMaxZ); glViewport(lpData->dwX, This->surface->surface_desc.dwHeight - (lpData->dwHeight + lpData->dwY), lpData->dwWidth, lpData->dwHeight); + + LEAVE_GL(); return DD_OK; } diff --git a/dlls/ddraw/d3dexecutebuffer.c b/dlls/ddraw/d3dexecutebuffer.c index 3e6e556236e..9ff5e1c9046 100644 --- a/dlls/ddraw/d3dexecutebuffer.c +++ b/dlls/ddraw/d3dexecutebuffer.c @@ -74,11 +74,6 @@ static void execute(IDirect3DExecuteBufferImpl *This, if (TRACE_ON(ddraw)) _dump_executedata(&(This->data)); - if (((IDirect3DDeviceGLImpl *) lpDevice)->state == SURFACE_MEMORY_DIRTY) { - lpDevice->flush_to_framebuffer(lpDevice, NULL, ((IDirect3DDeviceGLImpl *) lpDevice)->lock_surf); - } - ((IDirect3DDeviceGLImpl *) lpDevice)->state = SURFACE_GL; - while (1) { LPD3DINSTRUCTION current = (LPD3DINSTRUCTION) instr; BYTE size;