mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:26:10 +00:00
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:
parent
1e5f819cee
commit
e70b63fa84
1 changed files with 14 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue