=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3d11/tests: Test values of unused fields in D3D11_DEPTH_STENCIL_DESC.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Mar 16 11:36:41 CDT 2016
Module: wine
Branch: master
Commit: bf88464c98bc30fa7635b7579ab700be3a541b00
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bf88464c98bc30fa7635b7579ab700be3a541b00
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Wed Mar 16 10:02:37 2016 +0100
d3d11/tests: Test values of unused fields in D3D11_DEPTH_STENCIL_DESC.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d11/tests/d3d11.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 81cb87f..89f9c5b 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -2737,6 +2737,51 @@ static void test_create_depthstencil_state(void)
refcount = ID3D11DepthStencilState_Release(ds_state1);
ok(!refcount, "Got unexpected refcount %u.\n", refcount);
+ ds_desc.DepthEnable = FALSE;
+ ds_desc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO;
+ ds_desc.DepthFunc = D3D11_COMPARISON_NEVER;
+ ds_desc.StencilEnable = FALSE;
+ ds_desc.StencilReadMask = 0;
+ ds_desc.StencilWriteMask = 0;
+ ds_desc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_ZERO;
+ ds_desc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_ZERO;
+ ds_desc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_ZERO;
+ ds_desc.FrontFace.StencilFunc = D3D11_COMPARISON_NEVER;
+ ds_desc.BackFace = ds_desc.FrontFace;
+
+ hr = ID3D11Device_CreateDepthStencilState(device, &ds_desc, &ds_state1);
+ ok(SUCCEEDED(hr), "Failed to create depthstencil state, hr %#x.\n", hr);
+
+ memset(&ds_desc, 0, sizeof(ds_desc));
+ ID3D11DepthStencilState_GetDesc(ds_state1, &ds_desc);
+ ok(!ds_desc.DepthEnable, "Got unexpected depth enable %#x.\n", ds_desc.DepthEnable);
+ ok(ds_desc.DepthWriteMask == D3D11_DEPTH_WRITE_MASK_ALL,
+ "Got unexpected depth write mask %#x.\n", ds_desc.DepthWriteMask);
+ ok(ds_desc.DepthFunc == D3D11_COMPARISON_LESS, "Got unexpected depth func %#x.\n", ds_desc.DepthFunc);
+ ok(!ds_desc.StencilEnable, "Got unexpected stencil enable %#x.\n", ds_desc.StencilEnable);
+ ok(ds_desc.StencilReadMask == D3D11_DEFAULT_STENCIL_READ_MASK,
+ "Got unexpected stencil read mask %#x.\n", ds_desc.StencilReadMask);
+ ok(ds_desc.StencilWriteMask == D3D11_DEFAULT_STENCIL_WRITE_MASK,
+ "Got unexpected stencil write mask %#x.\n", ds_desc.StencilWriteMask);
+ ok(ds_desc.FrontFace.StencilDepthFailOp == D3D11_STENCIL_OP_KEEP,
+ "Got unexpected front face stencil depth fail op %#x.\n", ds_desc.FrontFace.StencilDepthFailOp);
+ ok(ds_desc.FrontFace.StencilPassOp == D3D11_STENCIL_OP_KEEP,
+ "Got unexpected front face stencil pass op %#x.\n", ds_desc.FrontFace.StencilPassOp);
+ ok(ds_desc.FrontFace.StencilFailOp == D3D11_STENCIL_OP_KEEP,
+ "Got unexpected front face stencil fail op %#x.\n", ds_desc.FrontFace.StencilFailOp);
+ ok(ds_desc.FrontFace.StencilFunc == D3D11_COMPARISON_ALWAYS,
+ "Got unexpected front face stencil func %#x.\n", ds_desc.FrontFace.StencilFunc);
+ ok(ds_desc.BackFace.StencilDepthFailOp == D3D11_STENCIL_OP_KEEP,
+ "Got unexpected back face stencil depth fail op %#x.\n", ds_desc.BackFace.StencilDepthFailOp);
+ ok(ds_desc.BackFace.StencilPassOp == D3D11_STENCIL_OP_KEEP,
+ "Got unexpected back face stencil pass op %#x.\n", ds_desc.BackFace.StencilPassOp);
+ ok(ds_desc.BackFace.StencilFailOp == D3D11_STENCIL_OP_KEEP,
+ "Got unexpected back face stencil fail op %#x.\n", ds_desc.BackFace.StencilFailOp);
+ ok(ds_desc.BackFace.StencilFunc == D3D11_COMPARISON_ALWAYS,
+ "Got unexpected back face stencil func %#x.\n", ds_desc.BackFace.StencilFunc);
+
+ ID3D11DepthStencilState_Release(ds_state1);
+
refcount = ID3D11Device_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
}
More information about the wine-cvs
mailing list