https://git.reactos.org/?p=reactos.git;a=commitdiff;h=97475aa65caa06b621ef9…
commit 97475aa65caa06b621ef9a51198ac30a2a53b237
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_GetTechniqueDesc() 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 10aa0819138f4aaf0f872de74eaf953326afe997 by Michael Stefaniuc
<mstefani(a)winehq.org>
---
dll/directx/wine/d3dx9_36/effect.c | 31 ++++++++++++-------------------
sdk/tools/winesync/d3dx9.cfg | 2 +-
2 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c
index f50b40cd08a..0a0052d920c 100644
--- a/dll/directx/wine/d3dx9_36/effect.c
+++ b/dll/directx/wine/d3dx9_36/effect.c
@@ -1018,24 +1018,6 @@ static HRESULT d3dx9_base_effect_get_parameter_desc(struct
d3dx9_base_effect *ba
return D3D_OK;
}
-static HRESULT d3dx9_base_effect_get_technique_desc(struct d3dx9_base_effect *base,
- D3DXHANDLE technique, D3DXTECHNIQUE_DESC *desc)
-{
- struct d3dx_technique *tech = technique ? get_valid_technique(base, technique) :
&base->techniques[0];
-
- if (!desc || !tech)
- {
- WARN("Invalid argument specified.\n");
- return D3DERR_INVALIDCALL;
- }
-
- desc->Name = tech->name;
- desc->Passes = tech->pass_count;
- desc->Annotations = tech->annotation_count;
-
- return D3D_OK;
-}
-
static HRESULT d3dx9_get_param_value_ptr(struct d3dx_pass *pass, struct d3dx_state
*state,
void **param_value, struct d3dx_parameter **out_param,
BOOL update_all, BOOL *param_dirty)
@@ -3212,10 +3194,21 @@ static HRESULT WINAPI d3dx_effect_GetTechniqueDesc(ID3DXEffect
*iface, D3DXHANDL
D3DXTECHNIQUE_DESC *desc)
{
struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
+ struct d3dx_technique *tech = technique ?
get_valid_technique(&effect->base_effect, technique) :
&effect->base_effect.techniques[0];
TRACE("iface %p, technique %p, desc %p.\n", iface, technique, desc);
- return d3dx9_base_effect_get_technique_desc(&effect->base_effect, technique,
desc);
+ if (!desc || !tech)
+ {
+ WARN("Invalid argument specified.\n");
+ return D3DERR_INVALIDCALL;
+ }
+
+ desc->Name = tech->name;
+ desc->Passes = tech->pass_count;
+ desc->Annotations = tech->annotation_count;
+
+ return D3D_OK;
}
static HRESULT WINAPI d3dx_effect_GetPassDesc(ID3DXEffect *iface, D3DXHANDLE pass,
D3DXPASS_DESC *desc)
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index 9a0351bf7c6..68b6e7182db 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: 730e44ebe224c1b70e9f6eaf6a9aaeb8bc38a20b}
+tags: {wine: 10aa0819138f4aaf0f872de74eaf953326afe997}