https://git.reactos.org/?p=reactos.git;a=commitdiff;h=826d5b5fcb6f3430502e6…
commit 826d5b5fcb6f3430502e6f1c05772c089e105174
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Mon Sep 21 22:40:29 2020 +0200
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Thu Feb 4 16:37:03 2021 +0100
[WINESYNC] d3dx9: Move param_tree out of struct d3dx9_base_effect.
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 adc1b5a8bc6bcce427e231485015da43d24ca5cb by Michael Stefaniuc
<mstefani(a)winehq.org>
---
dll/directx/wine/d3dx9_36/effect.c | 11 ++++++-----
sdk/tools/winesync/d3dx9.cfg | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c
index 317425415ac..f03e9c95377 100644
--- a/dll/directx/wine/d3dx9_36/effect.c
+++ b/dll/directx/wine/d3dx9_36/effect.c
@@ -166,7 +166,6 @@ struct d3dx9_base_effect
ULONG64 version_counter;
- struct wine_rb_tree param_tree;
char *full_name_tmp;
unsigned int full_name_tmp_size;
};
@@ -180,6 +179,7 @@ struct d3dx_effect
unsigned int parameter_count;
unsigned int object_count;
struct d3dx_object *objects;
+ struct wine_rb_tree param_tree;
struct ID3DXEffectStateManager *manager;
struct IDirect3DDevice9 *device;
@@ -907,6 +907,7 @@ static struct d3dx_parameter *get_annotation_by_name(struct
d3dx_effect *effect,
struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base,
struct d3dx_parameter *parameter, const char *name)
{
+ struct d3dx_effect *effect = base->effect;
struct d3dx_parameter *temp_parameter;
unsigned int name_len, param_name_len;
unsigned int i, count, length;
@@ -921,7 +922,7 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect
*base,
if (!parameter)
{
- if ((entry = wine_rb_get(&base->param_tree, name)))
+ if ((entry = wine_rb_get(&effect->param_tree, name)))
return WINE_RB_ENTRY_VALUE(entry, struct d3dx_parameter, rb_entry);
return NULL;
}
@@ -950,7 +951,7 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect
*base,
memcpy(full_name + param_name_len + 1, name, name_len);
full_name[param_name_len + 1 + name_len] = 0;
- if ((entry = wine_rb_get(&base->param_tree, full_name)))
+ if ((entry = wine_rb_get(&effect->param_tree, full_name)))
return WINE_RB_ENTRY_VALUE(entry, struct d3dx_parameter, rb_entry);
return NULL;
}
@@ -5133,7 +5134,7 @@ static void add_param_to_tree(struct d3dx_effect *effect, struct
d3dx_parameter
memcpy(param->full_name, param->name, len);
}
TRACE("Full name is %s.\n", param->full_name);
- wine_rb_put(&effect->base_effect.param_tree, param->full_name,
¶m->rb_entry);
+ wine_rb_put(&effect->param_tree, param->full_name,
¶m->rb_entry);
if (is_top_level_parameter(param))
for (i = 0; i < param->top_level_param->annotation_count; ++i)
@@ -5996,7 +5997,7 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const
char *data, U
goto err_out;
}
- wine_rb_init(&base->param_tree, param_rb_compare);
+ wine_rb_init(&effect->param_tree, param_rb_compare);
if (effect->parameter_count)
{
base->parameters = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index 21d0e2cbc75..5fef219d7b2 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: cffe35488dc16414c6938e0f1a0169fb59730c97}
+tags: {wine: adc1b5a8bc6bcce427e231485015da43d24ca5cb}