https://git.reactos.org/?p=reactos.git;a=commitdiff;h=43d0a8829129b5121df0c…
commit 43d0a8829129b5121df0c61ec660475f412d74d0
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Mon Sep 21 22:40:26 2020 +0200
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Thu Feb 4 16:37:02 2021 +0100
[WINESYNC] d3dx9: Merge the d3dx_effect_GetPassByName() helper.
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 730e44ebe224c1b70e9f6eaf6a9aaeb8bc38a20b by Michael Stefaniuc
<mstefani(a)winehq.org>
---
dll/directx/wine/d3dx9_36/effect.c | 47 ++++++++++++++++----------------------
sdk/tools/winesync/d3dx9.cfg | 2 +-
2 files changed, 21 insertions(+), 28 deletions(-)
diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c
index 841812ae2b7..f50b40cd08a 100644
--- a/dll/directx/wine/d3dx9_36/effect.c
+++ b/dll/directx/wine/d3dx9_36/effect.c
@@ -1208,32 +1208,6 @@ static D3DXHANDLE d3dx9_base_effect_get_technique_by_name(struct
d3dx9_base_effe
return NULL;
}
-static D3DXHANDLE d3dx9_base_effect_get_pass_by_name(struct d3dx9_base_effect *base,
- D3DXHANDLE technique, const char *name)
-{
- struct d3dx_technique *tech = get_valid_technique(base, technique);
-
- if (tech && name)
- {
- unsigned int i;
-
- for (i = 0; i < tech->pass_count; ++i)
- {
- struct d3dx_pass *pass = &tech->passes[i];
-
- if (!strcmp(pass->name, name))
- {
- TRACE("Returning pass %p\n", pass);
- return get_pass_handle(pass);
- }
- }
- }
-
- WARN("Pass not found.\n");
-
- return NULL;
-}
-
static unsigned int get_annotation_from_object(struct d3dx_effect *effect, D3DXHANDLE
object,
struct d3dx_parameter **annotations)
{
@@ -3442,10 +3416,29 @@ static D3DXHANDLE WINAPI d3dx_effect_GetPass(ID3DXEffect *iface,
D3DXHANDLE tech
static D3DXHANDLE WINAPI d3dx_effect_GetPassByName(ID3DXEffect *iface, D3DXHANDLE
technique, const char *name)
{
struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
+ struct d3dx_technique *tech = get_valid_technique(&effect->base_effect,
technique);
TRACE("iface %p, technique %p, name %s.\n", iface, technique,
debugstr_a(name));
- return d3dx9_base_effect_get_pass_by_name(&effect->base_effect, technique,
name);
+ if (tech && name)
+ {
+ unsigned int i;
+
+ for (i = 0; i < tech->pass_count; ++i)
+ {
+ struct d3dx_pass *pass = &tech->passes[i];
+
+ if (!strcmp(pass->name, name))
+ {
+ TRACE("Returning pass %p\n", pass);
+ return get_pass_handle(pass);
+ }
+ }
+ }
+
+ WARN("Pass not found.\n");
+
+ return NULL;
}
static D3DXHANDLE WINAPI d3dx_effect_GetFunction(ID3DXEffect *iface, UINT index)
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index 5cfcfb1dc17..9a0351bf7c6 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: e419ac91ba5bd295b596f334951657b54dba3e99}
+tags: {wine: 730e44ebe224c1b70e9f6eaf6a9aaeb8bc38a20b}