https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7c212953a73358fb11126…
commit 7c212953a73358fb11126b153467c96ff92c2be4
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: Pass a struct d3dx_effect to the version helpers.
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 f9351bae3e22ac500c237ab5a0b0556561e913d6 by Michael Stefaniuc
<mstefani(a)winehq.org>
---
dll/directx/wine/d3dx9_36/effect.c | 20 ++++++++++----------
sdk/tools/winesync/d3dx9.cfg | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c
index 4cf181b5598..786f9f9304c 100644
--- a/dll/directx/wine/d3dx9_36/effect.c
+++ b/dll/directx/wine/d3dx9_36/effect.c
@@ -1147,14 +1147,14 @@ static BOOL walk_parameter_tree(struct d3dx_parameter *param,
walk_parameter_dep
return FALSE;
}
-static ULONG64 *get_version_counter_ptr(struct d3dx9_base_effect *base)
+static ULONG64 *get_version_counter_ptr(struct d3dx_effect *effect)
{
- return base->pool ? &base->pool->version_counter :
&base->version_counter;
+ return effect->base_effect.pool ?
&effect->base_effect.pool->version_counter :
&effect->base_effect.version_counter;
}
-static ULONG64 next_effect_update_version(struct d3dx9_base_effect *base)
+static ULONG64 next_effect_update_version(struct d3dx_effect *effect)
{
- return next_update_version(get_version_counter_ptr(base));
+ return next_update_version(get_version_counter_ptr(effect));
}
static void set_dirty(struct d3dx_parameter *param)
@@ -1581,7 +1581,7 @@ static HRESULT d3dx9_apply_pass_states(struct d3dx_effect *effect,
struct d3dx_p
unsigned int i;
HRESULT ret;
HRESULT hr;
- ULONG64 new_update_version =
next_effect_update_version(&effect->base_effect);
+ ULONG64 new_update_version = next_effect_update_version(effect);
TRACE("effect %p, pass %p, state_count %u.\n", effect, pass,
pass->state_count);
@@ -5749,7 +5749,7 @@ static HRESULT d3dx_parse_array_selector(struct d3dx_effect *effect,
struct d3dx
FIXME("Unaligned string_size %u.\n", string_size);
if (FAILED(ret = d3dx_create_param_eval(base, (DWORD *)(ptr + string_size) + 1,
object->size - (string_size + sizeof(DWORD)), D3DXPT_INT,
¶m->param_eval,
- get_version_counter_ptr(base), NULL, 0)))
+ get_version_counter_ptr(effect), NULL, 0)))
return ret;
ret = D3D_OK;
param = state->referenced_param;
@@ -5769,7 +5769,7 @@ static HRESULT d3dx_parse_array_selector(struct d3dx_effect *effect,
struct d3dx
TRACE("Creating preshader for object %u.\n",
param->members[i].object_id);
object = &effect->objects[param->members[i].object_id];
if (FAILED(ret = d3dx_create_param_eval(base, object->data,
object->size, param->type,
- ¶m->members[i].param_eval,
get_version_counter_ptr(base),
+ ¶m->members[i].param_eval,
get_version_counter_ptr(effect),
skip_constants, skip_constants_count)))
break;
}
@@ -5888,7 +5888,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const
char *data,
if (FAILED(hr = d3dx9_create_object(base, object)))
return hr;
if (FAILED(hr = d3dx_create_param_eval(base, object->data,
object->size, param->type,
- ¶m->param_eval,
get_version_counter_ptr(base),
+ ¶m->param_eval,
get_version_counter_ptr(effect),
skip_constants, skip_constants_count)))
return hr;
}
@@ -5902,7 +5902,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const
char *data,
if (FAILED(hr = d3dx9_copy_data(effect, param->object_id, ptr)))
return hr;
if (FAILED(hr = d3dx_create_param_eval(base, object->data,
object->size, param->type,
- ¶m->param_eval, get_version_counter_ptr(base),
NULL, 0)))
+ ¶m->param_eval, get_version_counter_ptr(effect),
NULL, 0)))
return hr;
break;
@@ -5931,7 +5931,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const
char *data,
if (!refpar->param_eval)
{
if (FAILED(hr = d3dx_create_param_eval(base, refobj->data,
refobj->size,
- refpar->type, &refpar->param_eval,
get_version_counter_ptr(base),
+ refpar->type, &refpar->param_eval,
get_version_counter_ptr(effect),
skip_constants, skip_constants_count)))
return hr;
}
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index 702d64801fc..849738ee26c 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: 956b30dbf3899e3cd0ccccc17d99f01047caf634}
+tags: {wine: f9351bae3e22ac500c237ab5a0b0556561e913d6}