Zebediah Figura : d3d9: Retrieve clip planes from the primary stateblock.

Alexandre Julliard julliard at winehq.org
Mon Feb 17 15:42:16 CST 2020


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Feb 13 18:51:03 2020 -0600

d3d9: Retrieve clip planes from the primary stateblock.

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/d3d9/device.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 8a79585f37..a681e220c5 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -2297,17 +2297,16 @@ static HRESULT WINAPI d3d9_device_SetClipPlane(IDirect3DDevice9Ex *iface, DWORD
 static HRESULT WINAPI d3d9_device_GetClipPlane(IDirect3DDevice9Ex *iface, DWORD index, float *plane)
 {
     struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
-    HRESULT hr;
 
     TRACE("iface %p, index %u, plane %p.\n", iface, index, plane);
 
     index = min(index, device->max_user_clip_planes - 1);
 
     wined3d_mutex_lock();
-    hr = wined3d_device_get_clip_plane(device->wined3d_device, index, (struct wined3d_vec4 *)plane);
+    memcpy(plane, &wined3d_stateblock_get_state(device->state)->clip_planes[index], sizeof(struct wined3d_vec4));
     wined3d_mutex_unlock();
 
-    return hr;
+    return D3D_OK;
 }
 
 static void resolve_depth_buffer(struct d3d9_device *device)




More information about the wine-cvs mailing list