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

d3d11/tests: Add test for creating RTV with DXGI_FORMAT_UNKNOWN.

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