d3d10core/tests: Check that shader resource view implements ID3D11ShaderResourceView.

This commit is contained in:
Józef Kucia 2015-09-14 00:13:33 +02:00 committed by Alexandre Julliard
parent c32def6c41
commit 6d916dc3e5
1 changed files with 11 additions and 0 deletions

View File

@ -887,6 +887,7 @@ static void test_create_shader_resource_view(void)
ID3D10Device *device, *tmp;
ID3D10Texture2D *texture;
ID3D10Buffer *buffer;
IUnknown *iface;
HRESULT hr;
if (!(device = create_device()))
@ -925,6 +926,11 @@ static void test_create_shader_resource_view(void)
ok(refcount == expected_refcount, "Got unexpected refcount %u, expected %u.\n", refcount, expected_refcount);
ID3D10Device_Release(tmp);
hr = ID3D10ShaderResourceView_QueryInterface(srview, &IID_ID3D11ShaderResourceView, (void **)&iface);
ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */,
"Shader resource view should implement ID3D11ShaderResourceView.\n");
if (SUCCEEDED(hr)) IUnknown_Release(iface);
ID3D10ShaderResourceView_Release(srview);
ID3D10Buffer_Release(buffer);
@ -954,6 +960,11 @@ static void test_create_shader_resource_view(void)
U(srv_desc).Texture2D.MostDetailedMip);
ok(U(srv_desc).Texture2D.MipLevels == 10, "Got unexpected MipLevels %u.\n", U(srv_desc).Texture2D.MipLevels);
hr = ID3D10ShaderResourceView_QueryInterface(srview, &IID_ID3D11ShaderResourceView, (void **)&iface);
ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */,
"Shader resource view should implement ID3D11ShaderResourceView.\n");
if (SUCCEEDED(hr)) IUnknown_Release(iface);
ID3D10ShaderResourceView_Release(srview);
ID3D10Texture2D_Release(texture);