Commit 07ce50d8 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

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

parent e70b63fa
......@@ -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);
......
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