Zebediah Figura : d3d8: Handle stateblocks in d3d8_device_SetRenderState().

Alexandre Julliard julliard at winehq.org
Fri Oct 18 14:01:15 CDT 2019


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Oct  3 19:38:07 2019 -0500

d3d8: Handle stateblocks in d3d8_device_SetRenderState().

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/d3d8/device.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 827ec47c60..cc1409d5c1 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -1827,15 +1827,11 @@ static HRESULT WINAPI d3d8_device_SetRenderState(IDirect3DDevice8 *iface,
     TRACE("iface %p, state %#x, value %#x.\n", iface, state, value);
 
     wined3d_mutex_lock();
-    switch (state)
-    {
-        case D3DRS_ZBIAS:
-            wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, value);
-            break;
-
-        default:
-            wined3d_device_set_render_state(device->wined3d_device, state, value);
-    }
+    if (state == D3DRS_ZBIAS)
+        state = WINED3D_RS_DEPTHBIAS;
+    wined3d_stateblock_set_render_state(device->update_state, state, value);
+    if (!device->recording)
+        wined3d_device_set_render_state(device->wined3d_device, state, value);
     wined3d_mutex_unlock();
 
     return D3D_OK;




More information about the wine-cvs mailing list