Zebediah Figura : ddraw: Stop setting the device state when setting some default render states.

Alexandre Julliard julliard at winehq.org
Thu Feb 6 15:44:17 CST 2020


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Jan 30 21:26:07 2020 -0600

ddraw: Stop setting the device state when setting some default render states.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ddraw/device.c  | 10 ----------
 dlls/ddraw/surface.c |  2 --
 2 files changed, 12 deletions(-)

diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 3a35eaeb5e..03b03f4584 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -3578,7 +3578,6 @@ static void setup_lighting(const struct d3d_device *device, DWORD fvf, DWORD fla
         enable = FALSE;
 
     wined3d_stateblock_set_render_state(device->state, WINED3D_RS_LIGHTING, enable);
-    wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_LIGHTING, enable);
 }
 
 
@@ -7060,22 +7059,13 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
 
     wined3d_stateblock_set_render_state(ddraw->state, WINED3D_RS_ZENABLE,
             d3d_device_update_depth_stencil(device));
-    wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_ZENABLE,
-            d3d_device_update_depth_stencil(device));
     if (version == 1) /* Color keying is initially enabled for version 1 devices. */
-    {
         wined3d_stateblock_set_render_state(ddraw->state, WINED3D_RS_COLORKEYENABLE, TRUE);
-        wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_COLORKEYENABLE, TRUE);
-    }
     else if (version == 2)
-    {
         wined3d_stateblock_set_render_state(ddraw->state, WINED3D_RS_SPECULARENABLE, TRUE);
-        wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_SPECULARENABLE, TRUE);
-    }
     if (version < 7)
     {
         wined3d_stateblock_set_render_state(ddraw->state, WINED3D_RS_NORMALIZENORMALS, TRUE);
-        wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_NORMALIZENORMALS, TRUE);
         IDirect3DDevice3_SetRenderState(&device->IDirect3DDevice3_iface,
                 D3DRENDERSTATE_TEXTUREMAPBLEND, D3DTBLEND_MODULATE);
     }
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 03546e17f1..442aeed67b 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -6089,8 +6089,6 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
 
             wined3d_stateblock_set_render_state(ddraw->state, WINED3D_RS_ZENABLE,
                     !!swapchain_desc.enable_auto_depth_stencil);
-            wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_ZENABLE,
-                    !!swapchain_desc.enable_auto_depth_stencil);
         }
     }
 




More information about the wine-cvs mailing list