ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
February 2021
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
30 participants
434 discussions
Start a n
N
ew thread
[reactos] 79/218: [WINESYNC] d3dx9: Pass a struct d3dx_effect to d3dx9_base_effect_cleanup().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3b863b369321355830167…
commit 3b863b369321355830167cb4a720fa5c688d3367 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 d3dx9_base_effect_cleanup(). 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 2f16d2f4ca86263571797d9544a9534e8aa29c16 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 19 ++++++++++--------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 2eab4fd4097..3dacdebd23a 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -687,8 +687,9 @@ static void free_technique(struct d3dx_technique *technique) technique->name = NULL; } -static void d3dx9_base_effect_cleanup(struct d3dx9_base_effect *base) +static void d3dx9_base_effect_cleanup(struct d3dx_effect *effect) { + struct d3dx9_base_effect *base = &effect->base_effect; unsigned int i; TRACE("base %p.\n", base); @@ -697,7 +698,7 @@ static void d3dx9_base_effect_cleanup(struct d3dx9_base_effect *base) if (base->parameters) { - for (i = 0; i < base->effect->parameter_count; ++i) + for (i = 0; i < effect->parameter_count; ++i) free_top_level_parameter(&base->parameters[i]); HeapFree(GetProcessHeap(), 0, base->parameters); base->parameters = NULL; @@ -711,14 +712,14 @@ static void d3dx9_base_effect_cleanup(struct d3dx9_base_effect *base) base->techniques = NULL; } - if (base->effect->objects) + if (effect->objects) { - for (i = 0; i < base->effect->object_count; ++i) + for (i = 0; i < effect->object_count; ++i) { - free_object(&base->effect->objects[i]); + free_object(&effect->objects[i]); } - HeapFree(GetProcessHeap(), 0, base->effect->objects); - base->effect->objects = NULL; + heap_free(effect->objects); + effect->objects = NULL; } } @@ -726,7 +727,7 @@ static void free_effect(struct d3dx_effect *effect) { TRACE("Free effect %p\n", effect); - d3dx9_base_effect_cleanup(&effect->base_effect); + d3dx9_base_effect_cleanup(effect); if (effect->pool) { @@ -6306,7 +6307,7 @@ static HRESULT d3dx9_base_effect_init(struct d3dx9_base_effect *base, debugstr_a(skip_constants[i]), j); HeapFree(GetProcessHeap(), 0, skip_constants_buffer); HeapFree(GetProcessHeap(), 0, skip_constants); - d3dx9_base_effect_cleanup(base); + d3dx9_base_effect_cleanup(effect); return D3DERR_INVALIDCALL; } } diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 26ac628eb93..61529b927f5 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: 7738fec56b8d55f006babf4d9fb7a1b79cf363af} +tags: {wine: 2f16d2f4ca86263571797d9544a9534e8aa29c16}
3 years, 10 months
1
0
0
0
[reactos] 78/218: [WINESYNC] d3dx9: Pass a struct d3dx_effect to get_annotation_by_name().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e60679e844018d53bfd3f…
commit e60679e844018d53bfd3fd08db62aa2f21702153 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 get_annotation_by_name(). 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 7738fec56b8d55f006babf4d9fb7a1b79cf363af by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 7 ++++--- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 961353e2ac1..2eab4fd4097 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -858,9 +858,10 @@ static struct d3dx_parameter *get_parameter_element_by_name(struct d3dx9_base_ef return NULL; } -static struct d3dx_parameter *get_annotation_by_name(struct d3dx9_base_effect *base, - unsigned int count, struct d3dx_parameter *annotations, const char *name) +static struct d3dx_parameter *get_annotation_by_name(struct d3dx_effect *effect, unsigned int count, + struct d3dx_parameter *annotations, const char *name) { + struct d3dx9_base_effect *base = &effect->base_effect; UINT i, length; struct d3dx_parameter *temp_parameter; const char *part; @@ -2255,7 +2256,7 @@ static D3DXHANDLE WINAPI d3dx_effect_GetAnnotationByName(ID3DXEffect *iface, D3D annotation_count = get_annotation_from_object(effect, object, &annotations); - annotation = get_annotation_by_name(&effect->base_effect, annotation_count, annotations, name); + annotation = get_annotation_by_name(effect, annotation_count, annotations, name); if (annotation) { TRACE("Returning parameter %p\n", annotation); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index b991cbb5089..26ac628eb93 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: 62a26e1ad0e18b8de8ac8154cbce6c6f66f2249b} +tags: {wine: 7738fec56b8d55f006babf4d9fb7a1b79cf363af}
3 years, 10 months
1
0
0
0
[reactos] 77/218: [WINESYNC] d3dx9: Pass a struct d3dx_effect to add_param_to_tree().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6ff343ea9aa41fa765bae…
commit 6ff343ea9aa41fa765bae843b5c3c26ad9b417f8 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 add_param_to_tree(). 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 62a26e1ad0e18b8de8ac8154cbce6c6f66f2249b by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 12 ++++++------ sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 786f9f9304c..961353e2ac1 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -5076,7 +5076,7 @@ static int param_rb_compare(const void *key, const struct wine_rb_entry *entry) return strcmp(name, param->full_name); } -static void add_param_to_tree(struct d3dx9_base_effect *base, struct d3dx_parameter *param, +static void add_param_to_tree(struct d3dx_effect *effect, struct d3dx_parameter *param, struct d3dx_parameter *parent, char separator, unsigned int element) { const char *parent_name = parent ? parent->full_name : NULL; @@ -5131,18 +5131,18 @@ static void add_param_to_tree(struct d3dx9_base_effect *base, struct d3dx_parame memcpy(param->full_name, param->name, len); } TRACE("Full name is %s.\n", param->full_name); - wine_rb_put(&base->param_tree, param->full_name, ¶m->rb_entry); + wine_rb_put(&effect->base_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) - add_param_to_tree(base, ¶m->top_level_param->annotations[i], param, '@', 0); + add_param_to_tree(effect, ¶m->top_level_param->annotations[i], param, '@', 0); if (param->element_count) for (i = 0; i < param->element_count; ++i) - add_param_to_tree(base, ¶m->members[i], param, '[', i); + add_param_to_tree(effect, ¶m->members[i], param, '[', i); else for (i = 0; i < param->member_count; ++i) - add_param_to_tree(base, ¶m->members[i], param, '.', 0); + add_param_to_tree(effect, ¶m->members[i], param, '.', 0); } static HRESULT d3dx_parse_effect_typedef(struct d3dx_effect *effect, struct d3dx_parameter *param, @@ -6017,7 +6017,7 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U } walk_parameter_tree(&base->parameters[i].param, param_set_top_level_param, &base->parameters[i]); - add_param_to_tree(base, &base->parameters[i].param, NULL, 0, 0); + add_param_to_tree(effect, &base->parameters[i].param, NULL, 0, 0); } } diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 849738ee26c..b991cbb5089 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: f9351bae3e22ac500c237ab5a0b0556561e913d6} +tags: {wine: 62a26e1ad0e18b8de8ac8154cbce6c6f66f2249b}
3 years, 10 months
1
0
0
0
[reactos] 76/218: [WINESYNC] d3dx9: Pass a struct d3dx_effect to the version helpers.
by winesync
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}
3 years, 10 months
1
0
0
0
[reactos] 75/218: [WINESYNC] d3dx9: Pass a struct d3dx_effect to get_valid_pass().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ce95dc581346331054c76…
commit ce95dc581346331054c76b35498c1fa708f97313 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 get_valid_pass(). 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 956b30dbf3899e3cd0ccccc17d99f01047caf634 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 8 ++++---- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index c8d638d425f..4cf181b5598 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -487,8 +487,9 @@ static struct d3dx_technique *get_valid_technique(struct d3dx_effect *effect, D3 return get_technique_by_name(effect, technique); } -static struct d3dx_pass *get_valid_pass(struct d3dx9_base_effect *base, D3DXHANDLE pass) +static struct d3dx_pass *get_valid_pass(struct d3dx_effect *effect, D3DXHANDLE pass) { + struct d3dx9_base_effect *base = &effect->base_effect; unsigned int i, k; for (i = 0; i < base->technique_count; ++i) @@ -1091,9 +1092,8 @@ static HRESULT d3dx9_get_param_value_ptr(struct d3dx_pass *pass, struct d3dx_sta static unsigned int get_annotation_from_object(struct d3dx_effect *effect, D3DXHANDLE object, struct d3dx_parameter **annotations) { - struct d3dx9_base_effect *base = &effect->base_effect; struct d3dx_parameter *param = get_valid_parameter(effect, object); - struct d3dx_pass *pass = get_valid_pass(base, object); + struct d3dx_pass *pass = get_valid_pass(effect, object); struct d3dx_technique *technique = get_valid_technique(effect, object); if (pass) @@ -1922,7 +1922,7 @@ static HRESULT WINAPI d3dx_effect_GetTechniqueDesc(ID3DXEffect *iface, D3DXHANDL static HRESULT WINAPI d3dx_effect_GetPassDesc(ID3DXEffect *iface, D3DXHANDLE pass_handle, D3DXPASS_DESC *desc) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_pass *pass = get_valid_pass(&effect->base_effect, pass_handle); + struct d3dx_pass *pass = get_valid_pass(effect, pass_handle); unsigned int i; TRACE("iface %p, pass %p, desc %p.\n", iface, pass, desc); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index bdfef6e6269..702d64801fc 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: 6ecc2c51b3849d313ad670a4b0ff14ca50aeb26a} +tags: {wine: 956b30dbf3899e3cd0ccccc17d99f01047caf634}
3 years, 10 months
1
0
0
0
[reactos] 74/218: [WINESYNC] d3dx9: Pass a struct d3dx_effect to get_valid_parameter().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0c4e3081dab3e43595535…
commit 0c4e3081dab3e4359553528f43e55f2ffd7b6045 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 get_valid_parameter(). 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 6ecc2c51b3849d313ad670a4b0ff14ca50aeb26a by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 91 +++++++++++++++++++------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 47 insertions(+), 46 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 3b6a81dfd51..c8d638d425f 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -505,7 +505,7 @@ static struct d3dx_pass *get_valid_pass(struct d3dx9_base_effect *base, D3DXHAND return NULL; } -static struct d3dx_parameter *get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter) +static struct d3dx_parameter *get_valid_parameter(struct d3dx_effect *effect, D3DXHANDLE parameter) { struct d3dx_parameter *handle_param = (struct d3dx_parameter *)parameter; @@ -513,7 +513,8 @@ static struct d3dx_parameter *get_valid_parameter(struct d3dx9_base_effect *base sizeof(parameter_magic_string))) return handle_param; - return base->flags & D3DXFX_LARGEADDRESSAWARE ? NULL : get_parameter_by_name(base, NULL, parameter); + return effect->base_effect.flags & D3DXFX_LARGEADDRESSAWARE + ? NULL : get_parameter_by_name(&effect->base_effect, NULL, parameter); } static void free_state(struct d3dx_state *state) @@ -1091,7 +1092,7 @@ static unsigned int get_annotation_from_object(struct d3dx_effect *effect, D3DXH struct d3dx_parameter **annotations) { struct d3dx9_base_effect *base = &effect->base_effect; - struct d3dx_parameter *param = get_valid_parameter(base, object); + struct d3dx_parameter *param = get_valid_parameter(effect, object); struct d3dx_pass *pass = get_valid_pass(base, object); struct d3dx_technique *technique = get_valid_technique(effect, object); @@ -1871,7 +1872,7 @@ 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); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, desc %p.\n", iface, parameter, desc); @@ -1980,7 +1981,7 @@ static HRESULT WINAPI d3dx_effect_GetFunctionDesc(ID3DXEffect *iface, D3DXHANDLE static D3DXHANDLE WINAPI d3dx_effect_GetParameter(ID3DXEffect *iface, D3DXHANDLE parameter, UINT index) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, index %u.\n", iface, parameter, index); @@ -2010,7 +2011,7 @@ static D3DXHANDLE WINAPI d3dx_effect_GetParameterByName(ID3DXEffect *iface, D3DX const char *name) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); D3DXHANDLE handle; TRACE("iface %p, parameter %p, name %s.\n", iface, parameter, debugstr_a(name)); @@ -2032,7 +2033,7 @@ static D3DXHANDLE WINAPI d3dx_effect_GetParameterBySemantic(ID3DXEffect *iface, const char *semantic) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); struct d3dx_parameter *temp_param; unsigned int i; @@ -2093,7 +2094,7 @@ static D3DXHANDLE WINAPI d3dx_effect_GetParameterBySemantic(ID3DXEffect *iface, static D3DXHANDLE WINAPI d3dx_effect_GetParameterElement(ID3DXEffect *iface, D3DXHANDLE parameter, UINT index) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, index %u.\n", iface, parameter, index); @@ -2270,7 +2271,7 @@ static HRESULT WINAPI d3dx_effect_SetValue(ID3DXEffect *iface, D3DXHANDLE parame const void *data, UINT bytes) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); unsigned int i; TRACE("iface %p, parameter %p, data %p, bytes %u.\n", iface, parameter, data, bytes); @@ -2345,7 +2346,7 @@ static HRESULT WINAPI d3dx_effect_SetValue(ID3DXEffect *iface, D3DXHANDLE parame static HRESULT WINAPI d3dx_effect_GetValue(ID3DXEffect *iface, D3DXHANDLE parameter, void *data, UINT bytes) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, data %p, bytes %u.\n", iface, parameter, data, bytes); @@ -2410,7 +2411,7 @@ static HRESULT WINAPI d3dx_effect_GetValue(ID3DXEffect *iface, D3DXHANDLE parame static HRESULT WINAPI d3dx_effect_SetBool(ID3DXEffect *iface, D3DXHANDLE parameter, BOOL b) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, b %#x.\n", iface, parameter, b); @@ -2429,7 +2430,7 @@ static HRESULT WINAPI d3dx_effect_SetBool(ID3DXEffect *iface, D3DXHANDLE paramet static HRESULT WINAPI d3dx_effect_GetBool(ID3DXEffect *iface, D3DXHANDLE parameter, BOOL *b) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, b %p.\n", iface, parameter, b); @@ -2448,7 +2449,7 @@ static HRESULT WINAPI d3dx_effect_GetBool(ID3DXEffect *iface, D3DXHANDLE paramet static HRESULT WINAPI d3dx_effect_SetBoolArray(ID3DXEffect *iface, D3DXHANDLE parameter, const BOOL *b, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, b %p, count %u.\n", iface, parameter, b, count); @@ -2489,7 +2490,7 @@ static HRESULT WINAPI d3dx_effect_SetBoolArray(ID3DXEffect *iface, D3DXHANDLE pa static HRESULT WINAPI d3dx_effect_GetBoolArray(ID3DXEffect *iface, D3DXHANDLE parameter, BOOL *b, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, b %p, count %u.\n", iface, parameter, b, count); @@ -2515,7 +2516,7 @@ static HRESULT WINAPI d3dx_effect_GetBoolArray(ID3DXEffect *iface, D3DXHANDLE pa static HRESULT WINAPI d3dx_effect_SetInt(ID3DXEffect *iface, D3DXHANDLE parameter, INT n) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, n %d.\n", iface, parameter, n); @@ -2557,7 +2558,7 @@ static HRESULT WINAPI d3dx_effect_SetInt(ID3DXEffect *iface, D3DXHANDLE paramete static HRESULT WINAPI d3dx_effect_GetInt(ID3DXEffect *iface, D3DXHANDLE parameter, INT *n) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, n %p.\n", iface, parameter, n); @@ -2595,7 +2596,7 @@ static HRESULT WINAPI d3dx_effect_GetInt(ID3DXEffect *iface, D3DXHANDLE paramete static HRESULT WINAPI d3dx_effect_SetIntArray(ID3DXEffect *iface, D3DXHANDLE parameter, const INT *n, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, n %p, count %u.\n", iface, parameter, n, count); @@ -2633,7 +2634,7 @@ static HRESULT WINAPI d3dx_effect_SetIntArray(ID3DXEffect *iface, D3DXHANDLE par static HRESULT WINAPI d3dx_effect_GetIntArray(ID3DXEffect *iface, D3DXHANDLE parameter, INT *n, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, n %p, count %u.\n", iface, parameter, n, count); @@ -2657,7 +2658,7 @@ static HRESULT WINAPI d3dx_effect_GetIntArray(ID3DXEffect *iface, D3DXHANDLE par static HRESULT WINAPI d3dx_effect_SetFloat(ID3DXEffect *iface, D3DXHANDLE parameter, float f) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, f %.8e.\n", iface, parameter, f); @@ -2680,7 +2681,7 @@ static HRESULT WINAPI d3dx_effect_SetFloat(ID3DXEffect *iface, D3DXHANDLE parame static HRESULT WINAPI d3dx_effect_GetFloat(ID3DXEffect *iface, D3DXHANDLE parameter, float *f) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, f %p.\n", iface, parameter, f); @@ -2700,7 +2701,7 @@ static HRESULT WINAPI d3dx_effect_SetFloatArray(ID3DXEffect *iface, D3DXHANDLE p const float *f, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, f %p, count %u.\n", iface, parameter, f, count); @@ -2738,7 +2739,7 @@ static HRESULT WINAPI d3dx_effect_SetFloatArray(ID3DXEffect *iface, D3DXHANDLE p static HRESULT WINAPI d3dx_effect_GetFloatArray(ID3DXEffect *iface, D3DXHANDLE parameter, float *f, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, f %p, count %u.\n", iface, parameter, f, count); @@ -2762,7 +2763,7 @@ static HRESULT WINAPI d3dx_effect_GetFloatArray(ID3DXEffect *iface, D3DXHANDLE p static HRESULT WINAPI d3dx_effect_SetVector(ID3DXEffect *iface, D3DXHANDLE parameter, const D3DXVECTOR4 *vector) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, vector %p.\n", iface, parameter, vector); @@ -2816,7 +2817,7 @@ static HRESULT WINAPI d3dx_effect_SetVector(ID3DXEffect *iface, D3DXHANDLE param static HRESULT WINAPI d3dx_effect_GetVector(ID3DXEffect *iface, D3DXHANDLE parameter, D3DXVECTOR4 *vector) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, vector %p.\n", iface, parameter, vector); @@ -2860,7 +2861,7 @@ static HRESULT WINAPI d3dx_effect_SetVectorArray(ID3DXEffect *iface, D3DXHANDLE const D3DXVECTOR4 *vector, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, vector %p, count %u.\n", iface, parameter, vector, count); @@ -2910,7 +2911,7 @@ static HRESULT WINAPI d3dx_effect_GetVectorArray(ID3DXEffect *iface, D3DXHANDLE D3DXVECTOR4 *vector, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, vector %p, count %u.\n", iface, parameter, vector, count); @@ -2950,7 +2951,7 @@ static HRESULT WINAPI d3dx_effect_GetVectorArray(ID3DXEffect *iface, D3DXHANDLE static HRESULT WINAPI d3dx_effect_SetMatrix(ID3DXEffect *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, matrix %p.\n", iface, parameter, matrix); @@ -2985,7 +2986,7 @@ static HRESULT WINAPI d3dx_effect_SetMatrix(ID3DXEffect *iface, D3DXHANDLE param static HRESULT WINAPI d3dx_effect_GetMatrix(ID3DXEffect *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, matrix %p.\n", iface, parameter, matrix); @@ -3020,7 +3021,7 @@ static HRESULT WINAPI d3dx_effect_SetMatrixArray(ID3DXEffect *iface, D3DXHANDLE const D3DXMATRIX *matrix, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); @@ -3059,7 +3060,7 @@ static HRESULT WINAPI d3dx_effect_GetMatrixArray(ID3DXEffect *iface, D3DXHANDLE D3DXMATRIX *matrix, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); @@ -3100,7 +3101,7 @@ static HRESULT WINAPI d3dx_effect_SetMatrixPointerArray(ID3DXEffect *iface, D3DX const D3DXMATRIX **matrix, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); @@ -3136,7 +3137,7 @@ static HRESULT WINAPI d3dx_effect_GetMatrixPointerArray(ID3DXEffect *iface, D3DX D3DXMATRIX **matrix, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); @@ -3176,7 +3177,7 @@ static HRESULT WINAPI d3dx_effect_SetMatrixTranspose(ID3DXEffect *iface, D3DXHAN const D3DXMATRIX *matrix) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, matrix %p.\n", iface, parameter, matrix); @@ -3212,7 +3213,7 @@ static HRESULT WINAPI d3dx_effect_GetMatrixTranspose(ID3DXEffect *iface, D3DXHAN D3DXMATRIX *matrix) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, matrix %p.\n", iface, parameter, matrix); @@ -3250,7 +3251,7 @@ static HRESULT WINAPI d3dx_effect_SetMatrixTransposeArray(ID3DXEffect *iface, D3 const D3DXMATRIX *matrix, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); @@ -3289,7 +3290,7 @@ static HRESULT WINAPI d3dx_effect_GetMatrixTransposeArray(ID3DXEffect *iface, D3 D3DXMATRIX *matrix, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); @@ -3330,7 +3331,7 @@ static HRESULT WINAPI d3dx_effect_SetMatrixTransposePointerArray(ID3DXEffect *if const D3DXMATRIX **matrix, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); @@ -3366,7 +3367,7 @@ static HRESULT WINAPI d3dx_effect_GetMatrixTransposePointerArray(ID3DXEffect *if D3DXMATRIX **matrix, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); @@ -3405,7 +3406,7 @@ static HRESULT WINAPI d3dx_effect_GetMatrixTransposePointerArray(ID3DXEffect *if static HRESULT WINAPI d3dx_effect_SetString(ID3DXEffect *iface, D3DXHANDLE parameter, const char *string) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, string %s.\n", iface, parameter, debugstr_a(string)); @@ -3423,7 +3424,7 @@ static HRESULT WINAPI d3dx_effect_SetString(ID3DXEffect *iface, D3DXHANDLE param static HRESULT WINAPI d3dx_effect_GetString(ID3DXEffect *iface, D3DXHANDLE parameter, const char **string) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, string %p.\n", iface, parameter, string); @@ -3443,7 +3444,7 @@ static HRESULT WINAPI d3dx_effect_SetTexture(ID3DXEffect *iface, D3DXHANDLE para IDirect3DBaseTexture9 *texture) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, texture %p.\n", iface, parameter, texture); @@ -3477,7 +3478,7 @@ static HRESULT WINAPI d3dx_effect_GetTexture(ID3DXEffect *iface, D3DXHANDLE para IDirect3DBaseTexture9 **texture) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, texture %p.\n", iface, parameter, texture); @@ -3502,7 +3503,7 @@ static HRESULT WINAPI d3dx_effect_GetPixelShader(ID3DXEffect *iface, D3DXHANDLE IDirect3DPixelShader9 **shader) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, shader %p.\n", iface, parameter, shader); @@ -3523,7 +3524,7 @@ static HRESULT WINAPI d3dx_effect_GetVertexShader(ID3DXEffect *iface, D3DXHANDLE IDirect3DVertexShader9 **shader) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); TRACE("iface %p, parameter %p, shader %p.\n", iface, parameter, shader); @@ -3801,7 +3802,7 @@ static BOOL is_parameter_used(struct d3dx_parameter *param, struct d3dx_techniqu static BOOL WINAPI d3dx_effect_IsParameterUsed(ID3DXEffect *iface, D3DXHANDLE parameter, D3DXHANDLE technique) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + struct d3dx_parameter *param = get_valid_parameter(effect, parameter); struct d3dx_technique *tech = get_valid_technique(effect, technique); BOOL ret; diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 62cb636ff53..bdfef6e6269 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: 73a05456bf6eb1102c5e3cc361f906e65f62cfcf} +tags: {wine: 6ecc2c51b3849d313ad670a4b0ff14ca50aeb26a}
3 years, 10 months
1
0
0
0
[reactos] 73/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetVertexShader() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d14c6a9493c95d2e31ef2…
commit d14c6a9493c95d2e31ef2981dbd0117e5feed603 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: Merge the d3dx_effect_GetVertexShader() 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 73a05456bf6eb1102c5e3cc361f906e65f62cfcf by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 35 ++++++++++++++--------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 254515f1a73..3b6a81dfd51 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1181,24 +1181,6 @@ static HRESULT set_string(char **param_data, const char *string) return D3D_OK; } -static HRESULT d3dx9_base_effect_get_vertex_shader(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (shader && param && !param->element_count && param->type == D3DXPT_VERTEXSHADER) - { - if ((*shader = *(struct IDirect3DVertexShader9 **)param->data)) - IDirect3DVertexShader9_AddRef(*shader); - TRACE("Returning %p.\n", *shader); - return D3D_OK; - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static void d3dx9_set_light_parameter(enum LIGHT_TYPE op, D3DLIGHT9 *light, void *value) { static const struct @@ -3537,14 +3519,25 @@ static HRESULT WINAPI d3dx_effect_GetPixelShader(ID3DXEffect *iface, D3DXHANDLE return D3DERR_INVALIDCALL; } -static HRESULT WINAPI d3dx_effect_GetVertexShader(struct ID3DXEffect *iface, D3DXHANDLE parameter, - struct IDirect3DVertexShader9 **shader) +static HRESULT WINAPI d3dx_effect_GetVertexShader(ID3DXEffect *iface, D3DXHANDLE parameter, + IDirect3DVertexShader9 **shader) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, shader %p.\n", iface, parameter, shader); - return d3dx9_base_effect_get_vertex_shader(&effect->base_effect, parameter, shader); + if (shader && param && !param->element_count && param->type == D3DXPT_VERTEXSHADER) + { + if ((*shader = *(IDirect3DVertexShader9 **)param->data)) + IDirect3DVertexShader9_AddRef(*shader); + TRACE("Returning %p.\n", *shader); + return D3D_OK; + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_SetArrayRange(ID3DXEffect *iface, D3DXHANDLE parameter, UINT start, UINT end) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 122569c423d..62cb636ff53 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: a4ea70af146850d690e0de64436253aef098a86d} +tags: {wine: 73a05456bf6eb1102c5e3cc361f906e65f62cfcf}
3 years, 10 months
1
0
0
0
[reactos] 72/218: [WINESYNC] d3dx9: Merge the d3dx_effect_SetVectorArray() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=50aa6ee7ea3a730daf13b…
commit 50aa6ee7ea3a730daf13b8284b76191f44c04a66 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: Merge the d3dx_effect_SetVectorArray() 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 a4ea70af146850d690e0de64436253aef098a86d by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 91 +++++++++++++++++--------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 42 insertions(+), 51 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index bd809637d08..254515f1a73 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1181,55 +1181,6 @@ static HRESULT set_string(char **param_data, const char *string) return D3D_OK; } -static HRESULT d3dx9_base_effect_set_vector_array(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (param && param->element_count && param->element_count >= count) - { - UINT i; - - TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); - - switch (param->class) - { - case D3DXPC_VECTOR: - set_dirty(param); - if (param->type == D3DXPT_FLOAT) - { - if (param->columns == 4) - memcpy(param->data, vector, count * 4 * sizeof(float)); - else - for (i = 0; i < count; ++i) - memcpy((float *)param->data + param->columns * i, vector + i, - param->columns * sizeof(float)); - return D3D_OK; - } - - for (i = 0; i < count; ++i) - { - set_vector(¶m->members[i], &vector[i]); - } - return D3D_OK; - - case D3DXPC_SCALAR: - case D3DXPC_MATRIX_ROWS: - case D3DXPC_OBJECT: - case D3DXPC_STRUCT: - break; - - default: - FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); - break; - } - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_get_vertex_shader(struct d3dx9_base_effect *base, D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) { @@ -2927,10 +2878,50 @@ static HRESULT WINAPI d3dx_effect_SetVectorArray(ID3DXEffect *iface, D3DXHANDLE const D3DXVECTOR4 *vector, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, vector %p, count %u.\n", iface, parameter, vector, count); - return d3dx9_base_effect_set_vector_array(&effect->base_effect, parameter, vector, count); + if (param && param->element_count && param->element_count >= count) + { + unsigned int i; + + TRACE("Class %s.\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_VECTOR: + set_dirty(param); + if (param->type == D3DXPT_FLOAT) + { + if (param->columns == 4) + memcpy(param->data, vector, count * 4 * sizeof(float)); + else + for (i = 0; i < count; ++i) + memcpy((float *)param->data + param->columns * i, vector + i, + param->columns * sizeof(float)); + return D3D_OK; + } + + for (i = 0; i < count; ++i) + set_vector(¶m->members[i], &vector[i]); + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_MATRIX_ROWS: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s.\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_GetVectorArray(ID3DXEffect *iface, D3DXHANDLE parameter, diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 64fa8a9ef45..122569c423d 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: 6eb69d2cf6a9049a3fedc3ec71146b3745f17e2b} +tags: {wine: a4ea70af146850d690e0de64436253aef098a86d}
3 years, 10 months
1
0
0
0
[reactos] 71/218: [WINESYNC] d3dx9: Merge the d3dx_effect_SetVector() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=492a1837b711b9ed03940…
commit 492a1837b711b9ed039407a8deb72e8026b0bb68 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:03 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_SetVector() 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 6eb69d2cf6a9049a3fedc3ec71146b3745f17e2b by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 99 ++++++++++++++++++-------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 47 insertions(+), 54 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index b041181bbe2..bd809637d08 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1181,58 +1181,6 @@ static HRESULT set_string(char **param_data, const char *string) return D3D_OK; } -static HRESULT d3dx9_base_effect_set_vector(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, const D3DXVECTOR4 *vector) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (param && !param->element_count) - { - TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); - - switch (param->class) - { - case D3DXPC_SCALAR: - case D3DXPC_VECTOR: - set_dirty(param); - if (param->type == D3DXPT_INT && param->bytes == 4) - { - DWORD tmp; - - TRACE("INT fixup\n"); - tmp = (DWORD)(max(min(vector->z, 1.0f), 0.0f) * INT_FLOAT_MULTI); - tmp += ((DWORD)(max(min(vector->y, 1.0f), 0.0f) * INT_FLOAT_MULTI)) << 8; - tmp += ((DWORD)(max(min(vector->x, 1.0f), 0.0f) * INT_FLOAT_MULTI)) << 16; - tmp += ((DWORD)(max(min(vector->w, 1.0f), 0.0f) * INT_FLOAT_MULTI)) << 24; - - *(INT *)param->data = tmp; - return D3D_OK; - } - if (param->type == D3DXPT_FLOAT) - { - memcpy(param->data, vector, param->columns * sizeof(float)); - return D3D_OK; - } - - set_vector(param, vector); - return D3D_OK; - - case D3DXPC_MATRIX_ROWS: - case D3DXPC_OBJECT: - case D3DXPC_STRUCT: - break; - - default: - FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); - break; - } - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_vector_array(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) { @@ -2881,10 +2829,55 @@ static HRESULT WINAPI d3dx_effect_GetFloatArray(ID3DXEffect *iface, D3DXHANDLE p static HRESULT WINAPI d3dx_effect_SetVector(ID3DXEffect *iface, D3DXHANDLE parameter, const D3DXVECTOR4 *vector) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, vector %p.\n", iface, parameter, vector); - return d3dx9_base_effect_set_vector(&effect->base_effect, parameter, vector); + if (param && !param->element_count) + { + TRACE("Class %s.\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + set_dirty(param); + if (param->type == D3DXPT_INT && param->bytes == 4) + { + DWORD tmp; + + TRACE("INT fixup.\n"); + tmp = max(min(vector->z, 1.0f), 0.0f) * INT_FLOAT_MULTI; + tmp += ((DWORD)(max(min(vector->y, 1.0f), 0.0f) * INT_FLOAT_MULTI)) << 8; + tmp += ((DWORD)(max(min(vector->x, 1.0f), 0.0f) * INT_FLOAT_MULTI)) << 16; + tmp += ((DWORD)(max(min(vector->w, 1.0f), 0.0f) * INT_FLOAT_MULTI)) << 24; + + *(int *)param->data = tmp; + return D3D_OK; + } + if (param->type == D3DXPT_FLOAT) + { + memcpy(param->data, vector, param->columns * sizeof(float)); + return D3D_OK; + } + + set_vector(param, vector); + return D3D_OK; + + case D3DXPC_MATRIX_ROWS: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s.\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_GetVector(ID3DXEffect *iface, D3DXHANDLE parameter, D3DXVECTOR4 *vector) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 8123432039d..64fa8a9ef45 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: 4d978ec0812cd18960337d5709853d93d98a1f2e} +tags: {wine: 6eb69d2cf6a9049a3fedc3ec71146b3745f17e2b}
3 years, 10 months
1
0
0
0
[reactos] 70/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetVectorArray() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=329ee4ce8094e9e353531…
commit 329ee4ce8094e9e3535316772258b9a41be69452 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:03 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_GetVectorArray() 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 4d978ec0812cd18960337d5709853d93d98a1f2e by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 72 +++++++++++++++++--------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 33 insertions(+), 41 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 7e0a195ec31..b041181bbe2 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1282,45 +1282,6 @@ static HRESULT d3dx9_base_effect_set_vector_array(struct d3dx9_base_effect *base return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_get_vector_array(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, D3DXVECTOR4 *vector, UINT count) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (!count) return D3D_OK; - - if (vector && param && count <= param->element_count) - { - UINT i; - - TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); - - switch (param->class) - { - case D3DXPC_VECTOR: - for (i = 0; i < count; ++i) - { - get_vector(¶m->members[i], &vector[i]); - } - return D3D_OK; - - case D3DXPC_SCALAR: - case D3DXPC_MATRIX_ROWS: - case D3DXPC_OBJECT: - case D3DXPC_STRUCT: - break; - - default: - FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); - break; - } - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_get_vertex_shader(struct d3dx9_base_effect *base, D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) { @@ -2983,10 +2944,41 @@ static HRESULT WINAPI d3dx_effect_GetVectorArray(ID3DXEffect *iface, D3DXHANDLE D3DXVECTOR4 *vector, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, vector %p, count %u.\n", iface, parameter, vector, count); - return d3dx9_base_effect_get_vector_array(&effect->base_effect, parameter, vector, count); + if (!count) + return D3D_OK; + + if (vector && param && count <= param->element_count) + { + unsigned int i; + + TRACE("Class %s.\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_VECTOR: + for (i = 0; i < count; ++i) + get_vector(¶m->members[i], &vector[i]); + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_MATRIX_ROWS: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s.\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_SetMatrix(ID3DXEffect *iface, D3DXHANDLE parameter, const D3DXMATRIX *matrix) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 622efe37f26..8123432039d 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: 3754ba683f2d3ccb16354a75b530c317382929d8} +tags: {wine: 4d978ec0812cd18960337d5709853d93d98a1f2e}
3 years, 10 months
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
44
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Results per page:
10
25
50
100
200