Stefan Dösinger : wined3d: Remove ugly code from stateblock init.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 13 06:31:32 CDT 2007


Module: wine
Branch: master
Commit: f41ab3be9b84f17798bf0d60158772b5d77ebc7e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f41ab3be9b84f17798bf0d60158772b5d77ebc7e

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Mon Jul 30 18:46:20 2007 +0200

wined3d: Remove ugly code from stateblock init.

---

 dlls/wined3d/stateblock.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 14c8533..b3700ee 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -914,15 +914,8 @@ static HRESULT  WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
     IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILFAIL,      WINED3DSTENCILOP_KEEP);
     IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILZFAIL,     WINED3DSTENCILOP_KEEP);
     IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILPASS,      WINED3DSTENCILOP_KEEP);
-
-    /* Setting stencil func also uses values for stencil ref/mask, so manually set defaults
-     * so only a single call performed (and ensure defaults initialized before making that call)
-     *
-     * IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILREF, 0);
-     * IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILMASK, 0xFFFFFFFF);
-     */
-    This->renderState[WINED3DRS_STENCILREF] = 0;
-    This->renderState[WINED3DRS_STENCILMASK] = 0xFFFFFFFF;
+    IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILREF,       0);
+    IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILMASK,      0xFFFFFFFF);
     IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILFUNC,      WINED3DCMP_ALWAYS);
     IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILWRITEMASK, 0xFFFFFFFF);
     IWineD3DDevice_SetRenderState(device, WINED3DRS_TEXTUREFACTOR,    0xFFFFFFFF);




More information about the wine-cvs mailing list