Henri Verbeet : wined3d: Use the same order of operations for depth clears as for stencil clears.
Alexandre Julliard
julliard at winehq.org
Thu Mar 25 11:44:43 CDT 2010
Module: wine
Branch: master
Commit: 9eb5ba435ed9f57cfe5cecda2d94ea5701134acd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9eb5ba435ed9f57cfe5cecda2d94ea5701134acd
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Mar 25 09:32:37 2010 +0100
wined3d: Use the same order of operations for depth clears as for stencil clears.
---
dlls/wined3d/device.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index fab9e65..3acbc30 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4404,16 +4404,17 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
glMask = glMask | GL_STENCIL_BUFFER_BIT;
}
- if (Flags & WINED3DCLEAR_ZBUFFER) {
+ if (Flags & WINED3DCLEAR_ZBUFFER)
+ {
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(This->stencilBufferTarget, context, location);
+
glDepthMask(GL_TRUE);
+ IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_ZWRITEENABLE));
glClearDepth(Z);
checkGLcall("glClearDepth");
glMask = glMask | GL_DEPTH_BUFFER_BIT;
- IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_ZWRITEENABLE));
-
- if (!(depth_stencil->Flags & location) && !is_full_clear(depth_stencil, vp, scissor_rect, clear_rect))
- surface_load_ds_location(This->stencilBufferTarget, context, location);
}
if (Flags & WINED3DCLEAR_TARGET) {
More information about the wine-cvs
mailing list