https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2a0486d85408f7eccf03e…
commit 2a0486d85408f7eccf03ea004474d812b6de186e
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Mon Sep 21 22:40:28 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_GetParameterDesc() 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 262238d46752700c2041cb9548724c66bd017eca by Michael Stefaniuc
<mstefani(a)winehq.org>
---
dll/directx/wine/d3dx9_36/effect.c | 49 ++++++++++++++++----------------------
sdk/tools/winesync/d3dx9.cfg | 2 +-
2 files changed, 22 insertions(+), 29 deletions(-)
diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c
index 0237be20e1e..b307c827721 100644
--- a/dll/directx/wine/d3dx9_36/effect.c
+++ b/dll/directx/wine/d3dx9_36/effect.c
@@ -993,33 +993,6 @@ static inline DWORD d3dx9_effect_version(DWORD major, DWORD minor)
return (0xfeff0000 | ((major) << 8) | (minor));
}
-static HRESULT d3dx9_base_effect_get_parameter_desc(struct d3dx9_base_effect *base,
- D3DXHANDLE parameter, D3DXPARAMETER_DESC *desc)
-{
- struct d3dx_parameter *param = get_valid_parameter(base, parameter);
-
- if (!desc || !param)
- {
- WARN("Invalid argument specified.\n");
- return D3DERR_INVALIDCALL;
- }
-
- desc->Name = param->name;
- desc->Semantic = param->semantic;
- desc->Class = param->class;
- desc->Type = param->type;
- desc->Rows = param->rows;
- desc->Columns = param->columns;
- desc->Elements = param->element_count;
- desc->Annotations = is_top_level_parameter(param)
- ? top_level_parameter_from_parameter(param)->annotation_count : 0;
- desc->StructMembers = param->member_count;
- desc->Flags = param->flags;
- desc->Bytes = param->bytes;
-
- 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)
@@ -2339,10 +2312,30 @@ static HRESULT WINAPI d3dx_effect_GetParameterDesc(ID3DXEffect
*iface, D3DXHANDL
D3DXPARAMETER_DESC *desc)
{
struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
+ struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect,
parameter);
TRACE("iface %p, parameter %p, desc %p.\n", iface, parameter, desc);
- return d3dx9_base_effect_get_parameter_desc(&effect->base_effect, parameter,
desc);
+ if (!desc || !param)
+ {
+ WARN("Invalid argument specified.\n");
+ return D3DERR_INVALIDCALL;
+ }
+
+ desc->Name = param->name;
+ desc->Semantic = param->semantic;
+ desc->Class = param->class;
+ desc->Type = param->type;
+ desc->Rows = param->rows;
+ desc->Columns = param->columns;
+ desc->Elements = param->element_count;
+ desc->Annotations = is_top_level_parameter(param)
+ ? top_level_parameter_from_parameter(param)->annotation_count : 0;
+ desc->StructMembers = param->member_count;
+ desc->Flags = param->flags;
+ desc->Bytes = param->bytes;
+
+ return D3D_OK;
}
static HRESULT WINAPI d3dx_effect_GetTechniqueDesc(ID3DXEffect *iface, D3DXHANDLE
technique,
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index f0797fa61fd..90c9dafb656 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: f34f13825fd060fda40f0a5b02dc1b420e3a8e1e}
+tags: {wine: 262238d46752700c2041cb9548724c66bd017eca}