Module: wine Branch: master Commit: 4f004a5565b332a501e84f724d66bcb391cd1c63 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4f004a5565b332a501e84f724d...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Apr 21 00:35:05 2010 +0200
wined3d: Move location loading and modification together in IWineD3DDeviceImpl_ClearSurface().
---
dlls/wined3d/device.c | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index c840e2a..00d94fa 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4431,6 +4431,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac DWORD location = context->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN; if (!(depth_stencil->Flags & location) && !is_full_clear(depth_stencil, vp, scissor_rect, clear_rect)) surface_load_ds_location(depth_stencil, context, location); + surface_modify_ds_location(depth_stencil, location);
glDepthMask(GL_TRUE); IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_ZWRITEENABLE)); @@ -4441,6 +4442,8 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
if (Flags & WINED3DCLEAR_TARGET) { + IWineD3DSurface_ModifyLocation((IWineD3DSurface *)target, SFLAG_INDRAWABLE, TRUE); + glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_COLORWRITEENABLE)); IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_COLORWRITEENABLE1)); @@ -4507,16 +4510,6 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac } }
- if (Flags & WINED3DCLEAR_TARGET) - { - IWineD3DSurface_ModifyLocation((IWineD3DSurface *)target, SFLAG_INDRAWABLE, TRUE); - } - if (Flags & WINED3DCLEAR_ZBUFFER) { - /* Note that WINED3DCLEAR_ZBUFFER implies a depth stencil exists on the device */ - DWORD location = context->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN; - surface_modify_ds_location(depth_stencil, location); - } - LEAVE_GL();
if (wined3d_settings.strict_draw_ordering || ((target->Flags & SFLAG_SWAPCHAIN)