=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: dxgi/tests: Check that DXGI surface implements ID3D11Texture2D.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Sep 14 09:44:34 CDT 2015
Module: wine
Branch: master
Commit: cee4d0bb9151fc5361d36e36094c7d08c577af7b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cee4d0bb9151fc5361d36e36094c7d08c577af7b
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Mon Sep 14 00:13:38 2015 +0200
dxgi/tests: Check that DXGI surface implements ID3D11Texture2D.
---
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);
More information about the wine-cvs
mailing list