Commit da5cc1ec authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

d3d11: Support NULL DepthStecilView pointer in ClearDepthStencilView.

parent e62475b0
...@@ -999,6 +999,9 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearDepthStencilView(ID3D ...@@ -999,6 +999,9 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearDepthStencilView(ID3D
TRACE("iface %p, depth_stencil_view %p, flags %#x, depth %.8e, stencil %u.\n", TRACE("iface %p, depth_stencil_view %p, flags %#x, depth %.8e, stencil %u.\n",
iface, depth_stencil_view, flags, depth, stencil); iface, depth_stencil_view, flags, depth, stencil);
if (!view)
return;
wined3d_flags = wined3d_clear_flags_from_d3d11_clear_flags(flags); wined3d_flags = wined3d_clear_flags_from_d3d11_clear_flags(flags);
wined3d_mutex_lock(); wined3d_mutex_lock();
......
...@@ -5955,6 +5955,9 @@ static void test_clear_depth_stencil_view(void) ...@@ -5955,6 +5955,9 @@ static void test_clear_depth_stencil_view(void)
ID3D11DeviceContext_ClearDepthStencilView(context, dsv, D3D11_CLEAR_DEPTH, 0.25f, 0); ID3D11DeviceContext_ClearDepthStencilView(context, dsv, D3D11_CLEAR_DEPTH, 0.25f, 0);
check_texture_float(depth_texture, 0.25f, 0); check_texture_float(depth_texture, 0.25f, 0);
ID3D11DeviceContext_ClearDepthStencilView(context, NULL, D3D11_CLEAR_DEPTH, 1.0f, 0);
check_texture_float(depth_texture, 0.25f, 0);
ID3D11Texture2D_Release(depth_texture); ID3D11Texture2D_Release(depth_texture);
ID3D11DepthStencilView_Release(dsv); ID3D11DepthStencilView_Release(dsv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment