d3d11/tests: Add test for creating RTV 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:08 +01:00 committed by Alexandre Julliard
parent 1e5f819cee
commit e70b63fa84
1 changed files with 14 additions and 0 deletions

View File

@ -1447,6 +1447,20 @@ static void test_create_rendertarget_view(void)
if (SUCCEEDED(hr)) IUnknown_Release(iface);
ID3D11RenderTargetView_Release(rtview);
rtv_desc.Format = DXGI_FORMAT_UNKNOWN;
hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)texture, &rtv_desc, &rtview);
ok(SUCCEEDED(hr), "Failed to create a rendertarget view, hr %#x.\n", hr);
memset(&rtv_desc, 0, sizeof(rtv_desc));
ID3D11RenderTargetView_GetDesc(rtview, &rtv_desc);
todo_wine ok(rtv_desc.Format == texture_desc.Format, "Got unexpected format %#x.\n", rtv_desc.Format);
ok(rtv_desc.ViewDimension == D3D11_RTV_DIMENSION_TEXTURE2D, "Got unexpected view dimension %#x.\n",
rtv_desc.ViewDimension);
ok(!U(rtv_desc).Texture2D.MipSlice, "Got unexpected mip slice %#x.\n", U(rtv_desc).Texture2D.MipSlice);
ID3D11RenderTargetView_Release(rtview);
ID3D11Texture2D_Release(texture);
refcount = ID3D11Device_Release(device);