https://git.reactos.org/?p=reactos.git;a=commitdiff;h=862292231b064de0589dc506f7ea47d0b5735edc

commit 862292231b064de0589dc506f7ea47d0b5735edc
Author:     winesync <[email protected]>
AuthorDate: Mon Sep 21 22:40:26 2020 +0200
Commit:     Jérôme Gardou <[email protected]>
CommitDate: Thu Feb 4 16:37:02 2021 +0100

    [WINESYNC] d3dx9: Merge the d3dx_effect_GetPass() helper.
    
    Signed-off-by: Michael Stefaniuc <[email protected]>
    Signed-off-by: Matteo Bruni <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id e419ac91ba5bd295b596f334951657b54dba3e99 by Michael 
Stefaniuc <[email protected]>
---
 dll/directx/wine/d3dx9_36/effect.c | 27 ++++++++++-----------------
 sdk/tools/winesync/d3dx9.cfg       |  2 +-
 2 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/dll/directx/wine/d3dx9_36/effect.c 
b/dll/directx/wine/d3dx9_36/effect.c
index b463d6ed140..841812ae2b7 100644
--- a/dll/directx/wine/d3dx9_36/effect.c
+++ b/dll/directx/wine/d3dx9_36/effect.c
@@ -1208,22 +1208,6 @@ static D3DXHANDLE 
d3dx9_base_effect_get_technique_by_name(struct d3dx9_base_effe
     return NULL;
 }
 
-static D3DXHANDLE d3dx9_base_effect_get_pass(struct d3dx9_base_effect *base,
-        D3DXHANDLE technique, UINT index)
-{
-    struct d3dx_technique *tech = get_valid_technique(base, technique);
-
-    if (tech && index < tech->pass_count)
-    {
-        TRACE("Returning pass %p\n", &tech->passes[index]);
-        return get_pass_handle(&tech->passes[index]);
-    }
-
-    WARN("Pass not found.\n");
-
-    return NULL;
-}
-
 static D3DXHANDLE d3dx9_base_effect_get_pass_by_name(struct d3dx9_base_effect 
*base,
         D3DXHANDLE technique, const char *name)
 {
@@ -3440,10 +3424,19 @@ static D3DXHANDLE WINAPI 
d3dx_effect_GetTechniqueByName(ID3DXEffect *iface, cons
 static D3DXHANDLE WINAPI d3dx_effect_GetPass(ID3DXEffect *iface, D3DXHANDLE 
technique, UINT index)
 {
     struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
+    struct d3dx_technique *tech = get_valid_technique(&effect->base_effect, 
technique);
 
     TRACE("iface %p, technique %p, index %u.\n", iface, technique, index);
 
-    return d3dx9_base_effect_get_pass(&effect->base_effect, technique, index);
+    if (tech && index < tech->pass_count)
+    {
+        TRACE("Returning pass %p\n", &tech->passes[index]);
+        return get_pass_handle(&tech->passes[index]);
+    }
+
+    WARN("Pass not found.\n");
+
+    return NULL;
 }
 
 static D3DXHANDLE WINAPI d3dx_effect_GetPassByName(ID3DXEffect *iface, 
D3DXHANDLE technique, const char *name)
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index eae4af7df47..5cfcfb1dc17 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: 89941842affb0fec7068a8bd7adca77d8c036032}
+tags: {wine: e419ac91ba5bd295b596f334951657b54dba3e99}

Reply via email to