[PATCH 08/10] dxgi/tests: Check that DXGI surface implements ID3D11Texture2D.

Józef Kucia jkucia at codeweavers.com
Sun Sep 13 17:13:38 CDT 2015


---
 dlls/dxgi/tests/device.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/dlls/dxgi/tests/device.c b/dlls/dxgi/tests/device.c
index d6db790..fe2c453 100644
--- a/dlls/dxgi/tests/device.c
+++ b/dlls/dxgi/tests/device.c
@@ -172,10 +172,10 @@ done:
 
 static void test_create_surface(void)
 {
-    ID3D10Texture2D *texture;
-    IDXGISurface *surface;
     DXGI_SURFACE_DESC desc;
+    IDXGISurface *surface;
     IDXGIDevice *device;
+    IUnknown *texture;
     ULONG refcount;
     HRESULT hr;
 
@@ -196,7 +196,12 @@ static void test_create_surface(void)
 
     hr = IDXGISurface_QueryInterface(surface, &IID_ID3D10Texture2D, (void **)&texture);
     ok(SUCCEEDED(hr), "Surface should implement ID3D10Texture2D\n");
-    if (SUCCEEDED(hr)) ID3D10Texture2D_Release(texture);
+    IUnknown_Release(texture);
+
+    hr = IDXGISurface_QueryInterface(surface, &IID_ID3D11Texture2D, (void **)&texture);
+    ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */,
+            "Surface should implement ID3D11Texture2D.\n");
+    if (SUCCEEDED(hr)) IUnknown_Release(texture);
 
     IDXGISurface_Release(surface);
     refcount = IDXGIDevice_Release(device);
-- 
2.4.6




More information about the wine-patches mailing list