https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4c48bb18fda14c8924303…
commit 4c48bb18fda14c89243034a0361ec32abf022ce8
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Mon Sep 21 23:07:40 2020 +0200
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Thu Feb 4 16:37:07 2021 +0100
[WINESYNC] d3dx9/tests: Add a few D3DXLoadSurfaceFromSurface() tests with different
rects.
Signed-off-by: Robin Kertels <robin.kertels(a)gmail.com>
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id ea7cf679150f790d2e375d99ee226ea4881b490a by Robin Kertels
<robin.kertels(a)gmail.com>
---
modules/rostests/winetests/d3dx9_36/surface.c | 37 +++++++++++++++++++++++++++
sdk/tools/winesync/d3dx9.cfg | 2 +-
2 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/modules/rostests/winetests/d3dx9_36/surface.c
b/modules/rostests/winetests/d3dx9_36/surface.c
index e9b9e041785..4590a758d78 100644
--- a/modules/rostests/winetests/d3dx9_36/surface.c
+++ b/modules/rostests/winetests/d3dx9_36/surface.c
@@ -1032,6 +1032,43 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL,
D3DX_FILTER_LINEAR, 0);
ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, D3D_OK);
+ /* rects */
+ SetRect(&rect, 2, 2, 1, 1);
+ hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect,
D3DX_FILTER_NONE, 0);
+ ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, D3DERR_INVALIDCALL);
+ hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect,
D3DX_DEFAULT, 0);
+ ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, D3DERR_INVALIDCALL);
+ hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL,
D3DX_FILTER_NONE, 0);
+ ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, D3DERR_INVALIDCALL);
+ hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL,
D3DX_DEFAULT, 0);
+ ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, D3DERR_INVALIDCALL);
+ hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL,
D3DX_FILTER_POINT, 0);
+ ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, D3DERR_INVALIDCALL);
+ SetRect(&rect, 1, 1, 1, 1);
+ hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect,
D3DX_FILTER_NONE, 0);
+ ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, D3D_OK);
+ hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL,
D3DX_FILTER_NONE, 0);
+ ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, D3D_OK);
+ hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect,
D3DX_DEFAULT, 0);
+ ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, E_FAIL);
+ hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL,
D3DX_DEFAULT, 0);
+ ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, E_FAIL);
+ if (0)
+ {
+ /* Somehow it crashes with a STATUS_INTEGER_DIVIDE_BY_ZERO exception
+ * on Windows. */
+ hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL,
D3DX_FILTER_POINT, 0);
+ ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, E_FAIL);
+ }
+ SetRect(&rect, 1, 1, 2, 2);
+ SetRect(&destrect, 1, 1, 2, 2);
+ hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, &destrect,
D3DX_FILTER_NONE, 0);
+ ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, D3D_OK);
+ hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL,
D3DX_FILTER_NONE, 0);
+ ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, D3D_OK);
+ hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &destrect,
D3DX_FILTER_NONE, 0);
+ ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected
%#x.\n", hr, D3D_OK);
+
IDirect3DSurface9_Release(newsurf);
check_release((IUnknown*)surf, 0);
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index 3bc87510483..d42dffe471b 100644
--- a/sdk/tools/winesync/d3dx9.cfg
+++ b/sdk/tools/winesync/d3dx9.cfg
@@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h:
sdk/inc
include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h:
sdk/include/dxsdk/d3dx9of.h,
include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h:
sdk/include/dxsdk/d3dx9shape.h,
include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h:
sdk/include/dxsdk/d3dx9xof.h}
-tags: {wine: 625622ad4182061ee3111032ab0ae4a494b74e73}
+tags: {wine: ea7cf679150f790d2e375d99ee226ea4881b490a}