[v3 PATCH] d3d11/test: Test for ID3D11InfoQueue interface
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Thu May 26 03:06:40 CDT 2016
Once this patch is accepted, Ill add the same tests to d3d10.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
dlls/d3d11/tests/d3d11.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index e17114e..91baa84d 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -886,6 +886,9 @@ static void test_device_interfaces(void)
todo_wine ok(hr == E_NOINTERFACE, "Device should not implement ID3D10Device interface, hr %#x.\n", hr);
if (SUCCEEDED(hr)) IUnknown_Release(iface);
+ hr = ID3D11Device_QueryInterface(device, &IID_ID3D11InfoQueue, (void **)&iface);
+ ok(hr == E_NOINTERFACE, "Found ID3D11InfoQueue interface in non-debug mode, hr %#x.\n", hr);
+
hr = ID3D11Device_QueryInterface(device, &IID_ID3D10Device1, (void **)&iface);
todo_wine ok(hr == E_NOINTERFACE, "Device should not implement ID3D10Device1 interface, hr %#x.\n", hr);
if (SUCCEEDED(hr)) IUnknown_Release(iface);
@@ -893,6 +896,26 @@ static void test_device_interfaces(void)
refcount = ID3D11Device_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
}
+
+ for (i = 0; i < sizeof(d3d11_feature_levels) / sizeof(*d3d11_feature_levels); ++i)
+ {
+ struct device_desc device_desc;
+
+ device_desc.feature_level = &d3d11_feature_levels[i];
+ device_desc.flags = D3D11_CREATE_DEVICE_DEBUG;
+ if (!(device = create_device(&device_desc)))
+ {
+ skip("Failed to create device for feature level %#x.\n", d3d11_feature_levels[i]);
+ continue;
+ }
+
+ hr = ID3D11Device_QueryInterface(device, &IID_ID3D11InfoQueue, (void **)&iface);
+ todo_wine ok(hr == S_OK, "Device should implement ID3D11InfoQueue interface, hr %#x.\n", hr);
+ if (SUCCEEDED(hr)) IUnknown_Release(iface);
+
+ refcount = ID3D11Device_Release(device);
+ ok(!refcount, "Device has %u references left.\n", refcount);
+ }
}
static void test_get_immediate_context(void)
--
1.9.1
More information about the wine-patches
mailing list