Zebediah Figura : d3d8: Use wined3d_stateblock_get_state() in d3d8_device_GetRenderState().

Alexandre Julliard julliard at winehq.org
Mon Dec 2 17:10:15 CST 2019


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Wed Nov 27 23:53:40 2019 -0600

d3d8: Use wined3d_stateblock_get_state() in d3d8_device_GetRenderState().

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 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 89cdb4e14b..62c75baae0 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -1875,18 +1875,20 @@ static HRESULT WINAPI d3d8_device_GetRenderState(IDirect3DDevice8 *iface,
         D3DRENDERSTATETYPE state, DWORD *value)
 {
     struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
+    const struct wined3d_stateblock_state *device_state;
 
     TRACE("iface %p, state %#x, value %p.\n", iface, state, value);
 
     wined3d_mutex_lock();
+    device_state = wined3d_stateblock_get_state(device->state);
     switch (state)
     {
         case D3DRS_ZBIAS:
-            *value = wined3d_device_get_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS);
+            *value = device_state->rs[WINED3D_RS_DEPTHBIAS];
             break;
 
         default:
-            *value = wined3d_device_get_render_state(device->wined3d_device, state);
+            *value = device_state->rs[state];
     }
     wined3d_mutex_unlock();
 




More information about the wine-cvs mailing list