d3d10core/tests: Add test for creating DSV with DXGI_FORMAT_UNKNOWN.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2016-03-07 13:57:09 +01:00 committed by Alexandre Julliard
parent e70b63fa84
commit 07ce50d864

View file

@ -867,6 +867,20 @@ static void test_create_depthstencil_view(void)
ok(U(dsv_desc).Texture2D.MipSlice == 0, "Got Unexpected mip slice %u.\n", U(dsv_desc).Texture2D.MipSlice);
ID3D10DepthStencilView_Release(dsview);
dsv_desc.Format = DXGI_FORMAT_UNKNOWN;
hr = ID3D10Device_CreateDepthStencilView(device, (ID3D10Resource *)texture, &dsv_desc, &dsview);
ok(SUCCEEDED(hr), "Failed to create a depthstencil view, hr %#x.\n", hr);
memset(&dsv_desc, 0, sizeof(dsv_desc));
ID3D10DepthStencilView_GetDesc(dsview, &dsv_desc);
todo_wine ok(dsv_desc.Format == texture_desc.Format, "Got unexpected format %#x.\n", dsv_desc.Format);
ok(dsv_desc.ViewDimension == D3D10_DSV_DIMENSION_TEXTURE2D,
"Got unexpected view dimension %#x.\n", dsv_desc.ViewDimension);
ok(!U(dsv_desc).Texture2D.MipSlice, "Got Unexpected mip slice %u.\n", U(dsv_desc).Texture2D.MipSlice);
ID3D10DepthStencilView_Release(dsview);
ID3D10Texture2D_Release(texture);
refcount = ID3D10Device_Release(device);