[PATCH 2/4] d3d10core: Support NULL DepthStecilView pointer in ClearDepthStencilView

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Tue Apr 12 02:52:33 CDT 2016


Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 dlls/d3d10core/tests/device.c | 3 +++
 dlls/d3d11/device.c           | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index 6978c26..e43b6e6 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -6200,6 +6200,9 @@ static void test_clear_depth_stencil_view(void)
     ID3D10Device_ClearDepthStencilView(device, dsv, D3D10_CLEAR_DEPTH, 0.25f, 0);
     check_texture_float(depth_texture, 0.25f, 0);
 
+    ID3D10Device_ClearDepthStencilView(device, NULL, D3D10_CLEAR_DEPTH, 1.0f, 0);
+    check_texture_float(depth_texture, 0.25f, 0);
+
     ID3D10Texture2D_Release(depth_texture);
     ID3D10DepthStencilView_Release(dsv);
 
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index c59e5a9..7ea4ee5 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -3460,6 +3460,9 @@ static void STDMETHODCALLTYPE d3d10_device_ClearDepthStencilView(ID3D10Device1 *
     TRACE("iface %p, depth_stencil_view %p, flags %#x, depth %.8e, stencil %u.\n",
             iface, depth_stencil_view, flags, depth, stencil);
 
+    if (!view)
+        return;
+
     wined3d_flags = wined3d_clear_flags_from_d3d11_clear_flags(flags);
 
     wined3d_mutex_lock();
-- 
1.9.1




More information about the wine-patches mailing list