Updated d3dx9_36-CloneEffect patchset.

Fix test failures.
This commit is contained in:
Paul Gofman 2019-09-27 13:14:03 +03:00
parent c58f817de8
commit cdfddb170a
2 changed files with 47 additions and 7 deletions

View File

@ -1,17 +1,18 @@
From a625d57a2c3d125604ec3c8fe1381ed2df3d72ac Mon Sep 17 00:00:00 2001
From a31e5531eb8f3be5fddf9f81f48f191b1a10c2aa Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 16 Mar 2015 08:18:33 +0100
Subject: [PATCH] d3dx9_36: Improve stub for ID3DXEffectImpl_CloneEffect.
---
dlls/d3dx9_36/effect.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
dlls/d3dx9_36/effect.c | 4 +++-
dlls/d3dx9_36/tests/effect.c | 16 +++++-----------
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
index 87eaf86..fd4635e 100644
index 7d686a435d..f8d8ab9cd2 100644
--- a/dlls/d3dx9_36/effect.c
+++ b/dlls/d3dx9_36/effect.c
@@ -4381,7 +4381,9 @@ static HRESULT WINAPI ID3DXEffectImpl_CloneEffect(ID3DXEffect *iface,
@@ -4100,7 +4100,9 @@ static HRESULT WINAPI d3dx_effect_CloneEffect(ID3DXEffect *iface, IDirect3DDevic
if (!device)
return D3DERR_INVALIDCALL;
@ -22,6 +23,45 @@ index 87eaf86..fd4635e 100644
}
#if D3DX_SDK_VERSION >= 27
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
index 5c4a3c5e77..ff15426938 100644
--- a/dlls/d3dx9_36/tests/effect.c
+++ b/dlls/d3dx9_36/tests/effect.c
@@ -7419,29 +7419,23 @@ static void test_effect_clone(void)
ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr);
hr = effect->lpVtbl->CloneEffect(effect, device, &cloned);
-todo_wine
ok(hr == D3D_OK, "Got result %#x.\n", hr);
-if (hr == D3D_OK)
-{
- ok(cloned != effect, "Expected new effect instance.\n");
+
+ todo_wine ok(cloned != effect, "Expected new effect instance.\n");
cloned->lpVtbl->Release(cloned);
-}
/* Try with different device. */
device2 = create_device(&window2);
hr = effect->lpVtbl->CloneEffect(effect, device2, &cloned);
-todo_wine
ok(hr == D3D_OK, "Got result %#x.\n", hr);
-if (hr == D3D_OK)
-{
- ok(cloned != effect, "Expected new effect instance.\n");
+ todo_wine ok(cloned != effect, "Expected new effect instance.\n");
hr = cloned->lpVtbl->GetDevice(cloned, &device3);
ok(hr == S_OK, "Failed to get effect device.\n");
- ok(device3 == device2, "Unexpected device instance.\n");
+ todo_wine ok(device3 == device2, "Unexpected device instance, device3 %p, device2 %p.\n", device3, device2);
IDirect3DDevice9_Release(device3);
cloned->lpVtbl->Release(cloned);
-}
+
IDirect3DDevice9_Release(device2);
DestroyWindow(window2);
effect->lpVtbl->Release(effect);
--
1.9.1
2.21.0

View File

@ -2648,7 +2648,7 @@ fi
# | * [#44635] Improve stub for ID3DXEffectImpl_CloneEffect
# |
# | Modified files:
# | * dlls/d3dx9_36/effect.c
# | * dlls/d3dx9_36/effect.c, dlls/d3dx9_36/tests/effect.c
# |
if test "$enable_d3dx9_36_CloneEffect" -eq 1; then
patch_apply d3dx9_36-CloneEffect/0001-d3dx9_36-Improve-stub-for-ID3DXEffectImpl_CloneEffec.patch