Module: wine Branch: master Commit: cee4d0bb9151fc5361d36e36094c7d08c577af7b URL: http://source.winehq.org/git/wine.git/?a=commit;h=cee4d0bb9151fc5361d36e3609...
Author: Józef Kucia jkucia@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);