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] 89/218: [WINESYNC] d3dx9: Use get_version_counter_ptr() instead of open coding it.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=433f7dc03047b04c8b983…
commit 433f7dc03047b04c8b983f1b9fc292a8f392e42b Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:50:18 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:03 2021 +0100 [WINESYNC] d3dx9: Use get_version_counter_ptr() instead of open coding it. 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 9438d031277cce1a1c21e0739e12d4c37f365467 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 4 +--- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 197fdfa4b3d..726f34b73ac 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -6081,9 +6081,7 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U { if (FAILED(hr = d3dx_pool_sync_shared_parameter(base->pool, &base->parameters[i]))) goto err_out; - base->parameters[i].version_counter = base->pool - ? &base->pool->version_counter - : &base->version_counter; + base->parameters[i].version_counter = get_version_counter_ptr(effect); set_dirty(&base->parameters[i].param); } return D3D_OK; diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 3fba5ef6fcf..a9237e77ff8 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: 074e3232ee90c94f9a8e7c55988b29b40e1e3f0f} +tags: {wine: 9438d031277cce1a1c21e0739e12d4c37f365467}
3 years, 10 months
1
0
0
0
[reactos] 88/218: [WINESYNC] d3dx9: Move technique_count out of struct d3dx9_base_effect.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9931b438e9be37514d9ba…
commit 9931b438e9be37514d9bafcd30d49c3338a1ef7f Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:50:18 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:03 2021 +0100 [WINESYNC] d3dx9: Move technique_count 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 074e3232ee90c94f9a8e7c55988b29b40e1e3f0f by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 39 +++++++++++++++++++------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index e98b717d62c..197fdfa4b3d 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -156,8 +156,6 @@ struct d3dx9_base_effect { struct d3dx_effect *effect; - UINT technique_count; - struct d3dx_top_level_parameter *parameters; struct d3dx_technique *techniques; @@ -174,6 +172,7 @@ struct d3dx_effect struct d3dx9_base_effect base_effect; unsigned int parameter_count; + unsigned int technique_count; unsigned int object_count; struct d3dx_object *objects; struct wine_rb_tree param_tree; @@ -463,7 +462,7 @@ static struct d3dx_technique *get_technique_by_name(struct d3dx_effect *effect, if (!name) return NULL; - for (i = 0; i < base->technique_count; ++i) + for (i = 0; i < effect->technique_count; ++i) { if (!strcmp(base->techniques[i].name, name)) return &base->techniques[i]; @@ -477,7 +476,7 @@ static struct d3dx_technique *get_valid_technique(struct d3dx_effect *effect, D3 struct d3dx9_base_effect *base = &effect->base_effect; unsigned int i; - for (i = 0; i < base->technique_count; ++i) + for (i = 0; i < effect->technique_count; ++i) { if (get_technique_handle(&base->techniques[i]) == technique) return &base->techniques[i]; @@ -491,7 +490,7 @@ static struct d3dx_pass *get_valid_pass(struct d3dx_effect *effect, D3DXHANDLE p struct d3dx9_base_effect *base = &effect->base_effect; unsigned int i, k; - for (i = 0; i < base->technique_count; ++i) + for (i = 0; i < effect->technique_count; ++i) { struct d3dx_technique *technique = &base->techniques[i]; @@ -705,7 +704,7 @@ static void d3dx9_base_effect_cleanup(struct d3dx_effect *effect) if (base->techniques) { - for (i = 0; i < base->technique_count; ++i) + for (i = 0; i < effect->technique_count; ++i) free_technique(&base->techniques[i]); HeapFree(GetProcessHeap(), 0, base->techniques); base->techniques = NULL; @@ -1863,7 +1862,7 @@ static HRESULT WINAPI d3dx_effect_GetDesc(ID3DXEffect *iface, D3DXEFFECT_DESC *d desc->Creator = NULL; desc->Functions = 0; desc->Parameters = effect->parameter_count; - desc->Techniques = effect->base_effect.technique_count; + desc->Techniques = effect->technique_count; return D3D_OK; } @@ -2126,7 +2125,7 @@ static D3DXHANDLE WINAPI d3dx_effect_GetTechnique(ID3DXEffect *iface, UINT index TRACE("iface %p, index %u.\n", iface, index); - if (index >= effect->base_effect.technique_count) + if (index >= effect->technique_count) { WARN("Invalid argument specified.\n"); return NULL; @@ -3663,7 +3662,7 @@ static HRESULT WINAPI d3dx_effect_FindNextValidTechnique(ID3DXEffect *iface, D3D if (!(prev_tech = get_valid_technique(effect, technique))) return D3DERR_INVALIDCALL; - for (i = 0; i < base->technique_count; ++i) + for (i = 0; i < effect->technique_count; ++i) { tech = &base->techniques[i]; if (tech == prev_tech) @@ -3678,7 +3677,7 @@ static HRESULT WINAPI d3dx_effect_FindNextValidTechnique(ID3DXEffect *iface, D3D i = 0; } - for (; i < base->technique_count; ++i) + for (; i < effect->technique_count; ++i) { tech = &base->techniques[i]; if (SUCCEEDED(d3dx_effect_ValidateTechnique(iface, get_technique_handle(tech)))) @@ -5841,9 +5840,10 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data, struct d3dx_technique *technique; struct d3dx_pass *pass; - if (technique_index >= base->technique_count) + if (technique_index >= effect->technique_count) { - FIXME("Index out of bounds: technique_index %u >= technique_count %u\n", technique_index, base->technique_count); + FIXME("Index out of bounds: technique_index %u >= technique_count %u.\n", technique_index, + effect->technique_count); return E_FAIL; } @@ -5976,8 +5976,8 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U read_dword(&ptr, &effect->parameter_count); TRACE("Parameter count: %u.\n", effect->parameter_count); - read_dword(&ptr, &base->technique_count); - TRACE("Technique count: %u.\n", base->technique_count); + read_dword(&ptr, &effect->technique_count); + TRACE("Technique count: %u.\n", effect->technique_count); skip_dword_unknown(&ptr, 1); @@ -6020,10 +6020,9 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U } } - if (base->technique_count) + if (effect->technique_count) { - base->techniques = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof(*base->techniques) * base->technique_count); + base->techniques = heap_alloc_zero(sizeof(*base->techniques) * effect->technique_count); if (!base->techniques) { ERR("Out of memory.\n"); @@ -6031,7 +6030,7 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U goto err_out; } - for (i = 0; i < base->technique_count; ++i) + for (i = 0; i < effect->technique_count; ++i) { TRACE("Parsing technique %u.\n", i); hr = d3dx_parse_effect_technique(effect, &base->techniques[i], data, &ptr, effect->objects); @@ -6093,7 +6092,7 @@ err_out: if (base->techniques) { - for (i = 0; i < base->technique_count; ++i) + for (i = 0; i < effect->technique_count; ++i) free_technique(&base->techniques[i]); HeapFree(GetProcessHeap(), 0, base->techniques); base->techniques = NULL; @@ -6296,7 +6295,7 @@ static HRESULT d3dx9_base_effect_init(struct d3dx_effect *effect, const char *da param = get_parameter_by_name(effect, NULL, skip_constants[i]); if (param) { - for (j = 0; j < base->technique_count; ++j) + for (j = 0; j < effect->technique_count; ++j) { if (is_parameter_used(param, &base->techniques[j])) { diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index f13123e57b1..3fba5ef6fcf 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: 92d2f6d99429df4b5f132eca2fa8a2c1eae4a6d0} +tags: {wine: 074e3232ee90c94f9a8e7c55988b29b40e1e3f0f}
3 years, 10 months
1
0
0
0
[reactos] 87/218: [WINESYNC] d3dx9: Pass a struct d3dx_effect to d3dx9_create_object().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=515c280579da01de38068…
commit 515c280579da01de38068cee670fbb725c7f3cd0 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:50:18 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_create_object(). 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 92d2f6d99429df4b5f132eca2fa8a2c1eae4a6d0 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 c44bb37a96b..e98b717d62c 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -5678,10 +5678,10 @@ err_out: return hr; } -static HRESULT d3dx9_create_object(struct d3dx9_base_effect *base, struct d3dx_object *object) +static HRESULT d3dx9_create_object(struct d3dx_effect *effect, struct d3dx_object *object) { struct d3dx_parameter *param = object->param; - struct IDirect3DDevice9 *device = base->effect->device; + IDirect3DDevice9 *device = effect->device; HRESULT hr; if (*(char **)param->data) @@ -5884,7 +5884,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data, if (object->data) { - if (FAILED(hr = d3dx9_create_object(base, object))) + if (FAILED(hr = d3dx9_create_object(effect, object))) return hr; if (FAILED(hr = d3dx_create_param_eval(effect, object->data, object->size, param->type, ¶m->param_eval, get_version_counter_ptr(effect), @@ -6061,7 +6061,7 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U if (effect->objects[id].data) { - if (FAILED(hr = d3dx9_create_object(base, &effect->objects[id]))) + if (FAILED(hr = d3dx9_create_object(effect, &effect->objects[id]))) goto err_out; } } diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index c198d643911..f13123e57b1 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: de59a1297111dfd0be93dccaa2db31865c61b79a} +tags: {wine: 92d2f6d99429df4b5f132eca2fa8a2c1eae4a6d0}
3 years, 10 months
1
0
0
0
[reactos] 86/218: [WINESYNC] d3dx9: Don't pass a struct d3dx9_base_effect to d3dx9_base_effect_init().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9ed5adb0c1b0ad02aec0e…
commit 9ed5adb0c1b0ad02aec0e3ff0b78063be779ea1e Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:50:18 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:03 2021 +0100 [WINESYNC] d3dx9: Don't pass a struct d3dx9_base_effect to d3dx9_base_effect_init(). 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 de59a1297111dfd0be93dccaa2db31865c61b79a by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 18 +++++++++--------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index a7341cef907..c44bb37a96b 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -6177,11 +6177,11 @@ static const char **parse_skip_constants_string(char *skip_constants_string, uns return new_alloc; } -static HRESULT d3dx9_base_effect_init(struct d3dx9_base_effect *base, - const char *data, SIZE_T data_size, const D3D_SHADER_MACRO *defines, ID3DInclude *include, - UINT eflags, ID3DBlob **errors, struct d3dx_effect *effect, struct d3dx_effect_pool *pool, - const char *skip_constants_string) +static HRESULT d3dx9_base_effect_init(struct d3dx_effect *effect, const char *data, SIZE_T data_size, + const D3D_SHADER_MACRO *defines, ID3DInclude *include, unsigned int eflags, ID3DBlob **errors, + struct d3dx_effect_pool *pool, const char *skip_constants_string) { + struct d3dx9_base_effect *base = &effect->base_effect; DWORD tag, offset; const char *ptr = data; HRESULT hr; @@ -6196,9 +6196,9 @@ static HRESULT d3dx9_base_effect_init(struct d3dx9_base_effect *base, #endif unsigned int i, j; - TRACE("base %p, data %p, data_size %lu, defines %p, include %p, eflags %#x, errors %p, " - "effect %p, pool %p, skip_constants %s.\n", - base, data, data_size, defines, include, eflags, errors, effect, pool, + TRACE("effect %p, data %p, data_size %lu, defines %p, include %p, eflags %#x, errors %p, " + "pool %p, skip_constants %s.\n", + effect, data, data_size, defines, include, eflags, errors, pool, debugstr_a(skip_constants_string)); base->effect = effect; @@ -6343,8 +6343,8 @@ static HRESULT d3dx9_effect_init(struct d3dx_effect *effect, struct IDirect3DDev IDirect3DDevice9_AddRef(device); effect->device = device; - if (FAILED(hr = d3dx9_base_effect_init(&effect->base_effect, data, data_size, defines, include, - eflags, error_messages, effect, pool_impl, skip_constants))) + if (FAILED(hr = d3dx9_base_effect_init(effect, data, data_size, defines, include, eflags, + error_messages, pool_impl, skip_constants))) { FIXME("Failed to parse effect, hr %#x.\n", hr); free_effect(effect); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index baa8c8da5e7..c198d643911 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: baf4aaa359c75715e7840b4c045fdb22adf2bc8a} +tags: {wine: de59a1297111dfd0be93dccaa2db31865c61b79a}
3 years, 10 months
1
0
0
0
[reactos] 85/218: [WINESYNC] d3dx9: Don't expose struct d3dx9_base_effect outside effect.c.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a639b63404b9857fcd8bb…
commit a639b63404b9857fcd8bbc1fac4884c192253d7a 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: Don't expose struct d3dx9_base_effect outside effect.c. 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 baf4aaa359c75715e7840b4c045fdb22adf2bc8a by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/d3dx9_private.h | 6 +++--- dll/directx/wine/d3dx9_36/effect.c | 33 ++++++++++++++----------------- dll/directx/wine/d3dx9_36/preshader.c | 18 ++++++++--------- sdk/tools/winesync/d3dx9.cfg | 2 +- 4 files changed, 28 insertions(+), 31 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/d3dx9_private.h b/dll/directx/wine/d3dx9_36/d3dx9_private.h index 1c1613024dc..5bb68b281ba 100644 --- a/dll/directx/wine/d3dx9_36/d3dx9_private.h +++ b/dll/directx/wine/d3dx9_36/d3dx9_private.h @@ -342,7 +342,7 @@ struct d3dx_shared_data ULONG64 update_version; }; -struct d3dx9_base_effect; +struct d3dx_effect; static inline BOOL is_top_level_parameter(struct d3dx_parameter *param) { @@ -375,7 +375,7 @@ static inline BOOL is_param_dirty(struct d3dx_parameter *param, ULONG64 update_v return is_top_level_param_dirty(param->top_level_param, update_version); } -struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, +struct d3dx_parameter *get_parameter_by_name(struct d3dx_effect *effect, struct d3dx_parameter *parameter, const char *name) DECLSPEC_HIDDEN; #ifdef __REACTOS__ @@ -388,7 +388,7 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, #define SET_D3D_STATE(base_effect, args...) SET_D3D_STATE_(base_effect->manager, base_effect->device, args) #endif -HRESULT d3dx_create_param_eval(struct d3dx9_base_effect *base_effect, void *byte_code, +HRESULT d3dx_create_param_eval(struct d3dx_effect *effect, void *byte_code, unsigned int byte_code_size, D3DXPARAMETER_TYPE type, struct d3dx_param_eval **peval, ULONG64 *version_counter, const char **skip_constants, unsigned int skip_constants_count) DECLSPEC_HIDDEN; diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 849dd5ca5f6..a7341cef907 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -514,7 +514,7 @@ static struct d3dx_parameter *get_valid_parameter(struct d3dx_effect *effect, D3 return handle_param; return effect->base_effect.flags & D3DXFX_LARGEADDRESSAWARE - ? NULL : get_parameter_by_name(&effect->base_effect, NULL, parameter); + ? NULL : get_parameter_by_name(effect, NULL, parameter); } static void free_state(struct d3dx_state *state) @@ -842,7 +842,7 @@ static struct d3dx_parameter *get_parameter_element_by_name(struct d3dx_effect * switch (*part++) { case '.': - return get_parameter_by_name(&effect->base_effect, temp_parameter, part); + return get_parameter_by_name(effect, temp_parameter, part); case '\0': TRACE("Returning parameter %p\n", temp_parameter); @@ -861,7 +861,6 @@ static struct d3dx_parameter *get_parameter_element_by_name(struct d3dx_effect * 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; @@ -887,7 +886,7 @@ static struct d3dx_parameter *get_annotation_by_name(struct d3dx_effect *effect, switch (*part++) { case '.': - return get_parameter_by_name(base, temp_parameter, part); + return get_parameter_by_name(effect, temp_parameter, part); case '[': return get_parameter_element_by_name(effect, temp_parameter, part); @@ -903,10 +902,9 @@ static struct d3dx_parameter *get_annotation_by_name(struct d3dx_effect *effect, return NULL; } -struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, +struct d3dx_parameter *get_parameter_by_name(struct d3dx_effect* effect, 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; @@ -915,7 +913,7 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, const char *part; char *full_name; - TRACE("base %p, parameter %p, name %s\n", base, parameter, debugstr_a(name)); + TRACE("effect %p, parameter %p, name %s.\n", effect, parameter, debugstr_a(name)); if (!name || !*name) return NULL; @@ -976,7 +974,7 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, switch (*part++) { case '.': - return get_parameter_by_name(base, temp_parameter, part); + return get_parameter_by_name(effect, temp_parameter, part); case '[': return get_parameter_element_by_name(effect, temp_parameter, part); @@ -2025,7 +2023,7 @@ static D3DXHANDLE WINAPI d3dx_effect_GetParameterByName(ID3DXEffect *iface, D3DX return handle; } - handle = get_parameter_handle(get_parameter_by_name(&effect->base_effect, param, name)); + handle = get_parameter_handle(get_parameter_by_name(effect, param, name)); TRACE("Returning parameter %p.\n", handle); return handle; @@ -5725,7 +5723,6 @@ static HRESULT d3dx9_create_object(struct d3dx9_base_effect *base, struct d3dx_o static HRESULT d3dx_parse_array_selector(struct d3dx_effect *effect, struct d3dx_state *state, const char **skip_constants, unsigned int skip_constants_count) { - struct d3dx9_base_effect *base = &effect->base_effect; DWORD string_size; struct d3dx_parameter *param = &state->parameter; struct d3dx_object *object = &effect->objects[param->object_id]; @@ -5735,7 +5732,7 @@ static HRESULT d3dx_parse_array_selector(struct d3dx_effect *effect, struct d3dx TRACE("Parsing array entry selection state for parameter %p.\n", param); string_size = *(DWORD *)ptr; - state->referenced_param = get_parameter_by_name(base, NULL, ptr + 4); + state->referenced_param = get_parameter_by_name(effect, NULL, ptr + 4); if (state->referenced_param) { TRACE("Mapping to parameter %s.\n", debugstr_a(state->referenced_param->name)); @@ -5749,7 +5746,7 @@ static HRESULT d3dx_parse_array_selector(struct d3dx_effect *effect, struct d3dx if (string_size % sizeof(DWORD)) FIXME("Unaligned string_size %u.\n", string_size); - if (FAILED(ret = d3dx_create_param_eval(base, (DWORD *)(ptr + string_size) + 1, + if (FAILED(ret = d3dx_create_param_eval(effect, (DWORD *)(ptr + string_size) + 1, object->size - (string_size + sizeof(DWORD)), D3DXPT_INT, ¶m->param_eval, get_version_counter_ptr(effect), NULL, 0))) return ret; @@ -5770,7 +5767,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, + if (FAILED(ret = d3dx_create_param_eval(effect, object->data, object->size, param->type, ¶m->members[i].param_eval, get_version_counter_ptr(effect), skip_constants, skip_constants_count))) break; @@ -5889,7 +5886,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, + if (FAILED(hr = d3dx_create_param_eval(effect, object->data, object->size, param->type, ¶m->param_eval, get_version_counter_ptr(effect), skip_constants, skip_constants_count))) return hr; @@ -5903,7 +5900,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data, state->type = ST_FXLC; 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, + if (FAILED(hr = d3dx_create_param_eval(effect, object->data, object->size, param->type, ¶m->param_eval, get_version_counter_ptr(effect), NULL, 0))) return hr; break; @@ -5920,7 +5917,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data, return hr; TRACE("Looking for parameter %s.\n", debugstr_a(object->data)); - state->referenced_param = get_parameter_by_name(base, NULL, object->data); + state->referenced_param = get_parameter_by_name(effect, NULL, object->data); if (state->referenced_param) { struct d3dx_parameter *refpar = state->referenced_param; @@ -5932,7 +5929,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, + if (FAILED(hr = d3dx_create_param_eval(effect, refobj->data, refobj->size, refpar->type, &refpar->param_eval, get_version_counter_ptr(effect), skip_constants, skip_constants_count))) return hr; @@ -6296,7 +6293,7 @@ static HRESULT d3dx9_base_effect_init(struct d3dx9_base_effect *base, for (i = 0; i < skip_constants_count; ++i) { struct d3dx_parameter *param; - param = get_parameter_by_name(base, NULL, skip_constants[i]); + param = get_parameter_by_name(effect, NULL, skip_constants[i]); if (param) { for (j = 0; j < base->technique_count; ++j) diff --git a/dll/directx/wine/d3dx9_36/preshader.c b/dll/directx/wine/d3dx9_36/preshader.c index c415397486f..fe8a1332851 100644 --- a/dll/directx/wine/d3dx9_36/preshader.c +++ b/dll/directx/wine/d3dx9_36/preshader.c @@ -865,7 +865,7 @@ static HRESULT init_set_constants_param(struct d3dx_const_tab *const_tab, ID3DXC } static HRESULT get_constants_desc(unsigned int *byte_code, struct d3dx_const_tab *out, - struct d3dx9_base_effect *base, const char **skip_constants, + struct d3dx_effect *effect, const char **skip_constants, unsigned int skip_constants_count, struct d3dx_preshader *pres) { ID3DXConstantTable *ctab; @@ -910,7 +910,7 @@ static HRESULT get_constants_desc(unsigned int *byte_code, struct d3dx_const_tab } if (FAILED(hr = get_ctab_constant_desc(ctab, hc, &cdesc[index], &constantinfo_reserved))) goto cleanup; - inputs_param[index] = get_parameter_by_name(base, NULL, cdesc[index].Name); + inputs_param[index] = get_parameter_by_name(effect, NULL, cdesc[index].Name); if (!inputs_param[index]) { WARN("Could not find parameter %s in effect.\n", cdesc[index].Name); @@ -1115,7 +1115,7 @@ static void dump_preshader(struct d3dx_preshader *pres) dump_ins(&pres->regs, &pres->ins[i]); } -static HRESULT parse_preshader(struct d3dx_preshader *pres, unsigned int *ptr, unsigned int count, struct d3dx9_base_effect *base) +static HRESULT parse_preshader(struct d3dx_preshader *pres, unsigned int *ptr, unsigned int count, struct d3dx_effect *effect) { unsigned int *p; unsigned int i, j, const_count; @@ -1182,7 +1182,7 @@ static HRESULT parse_preshader(struct d3dx_preshader *pres, unsigned int *ptr, u saved_word = *ptr; *ptr = 0xfffe0000; - hr = get_constants_desc(ptr, &pres->inputs, base, NULL, 0, NULL); + hr = get_constants_desc(ptr, &pres->inputs, effect, NULL, 0, NULL); *ptr = saved_word; if (FAILED(hr)) return hr; @@ -1235,7 +1235,7 @@ static HRESULT parse_preshader(struct d3dx_preshader *pres, unsigned int *ptr, u return D3D_OK; } -HRESULT d3dx_create_param_eval(struct d3dx9_base_effect *base_effect, void *byte_code, unsigned int byte_code_size, +HRESULT d3dx_create_param_eval(struct d3dx_effect *effect, void *byte_code, unsigned int byte_code_size, D3DXPARAMETER_TYPE type, struct d3dx_param_eval **peval_out, ULONG64 *version_counter, const char **skip_constants, unsigned int skip_constants_count) { @@ -1246,8 +1246,8 @@ HRESULT d3dx_create_param_eval(struct d3dx9_base_effect *base_effect, void *byte unsigned int count, pres_size; HRESULT ret; - TRACE("base_effect %p, byte_code %p, byte_code_size %u, type %u, peval_out %p.\n", - base_effect, byte_code, byte_code_size, type, peval_out); + TRACE("effect %p, byte_code %p, byte_code_size %u, type %u, peval_out %p.\n", + effect, byte_code, byte_code_size, type, peval_out); count = byte_code_size / sizeof(unsigned int); if (!byte_code || !count) @@ -1297,7 +1297,7 @@ HRESULT d3dx_create_param_eval(struct d3dx9_base_effect *base_effect, void *byte pres_size = count; } - if (ptr && FAILED(ret = parse_preshader(&peval->pres, ptr, pres_size, base_effect))) + if (ptr && FAILED(ret = parse_preshader(&peval->pres, ptr, pres_size, effect))) { FIXME("Failed parsing preshader, byte code for analysis follows.\n"); dump_bytecode(byte_code, byte_code_size); @@ -1306,7 +1306,7 @@ HRESULT d3dx_create_param_eval(struct d3dx9_base_effect *base_effect, void *byte if (shader) { - if (FAILED(ret = get_constants_desc(shader_ptr, &peval->shader_inputs, base_effect, + if (FAILED(ret = get_constants_desc(shader_ptr, &peval->shader_inputs, effect, skip_constants, skip_constants_count, &peval->pres))) { TRACE("Could not get shader constant table, hr %#x.\n", ret); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 8fdf9eb6d33..baa8c8da5e7 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: 09770370c0b9159d3324684146544b6f441e4889} +tags: {wine: baf4aaa359c75715e7840b4c045fdb22adf2bc8a}
3 years, 10 months
1
0
0
0
[reactos] 84/218: [WINESYNC] d3dx9: Pass a struct d3dx_effect to get_parameter_element_by_name().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=81c4bfa714dc76ce025bb…
commit 81c4bfa714dc76ce025bbbf56cf436b403edd0b1 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_parameter_element_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 09770370c0b9159d3324684146544b6f441e4889 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 91a0a1b5721..849dd5ca5f6 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -820,7 +820,7 @@ static void set_matrix_transpose(struct d3dx_parameter *param, const D3DXMATRIX } } -static struct d3dx_parameter *get_parameter_element_by_name(struct d3dx9_base_effect *base, +static struct d3dx_parameter *get_parameter_element_by_name(struct d3dx_effect *effect, struct d3dx_parameter *parameter, const char *name) { UINT element; @@ -842,7 +842,7 @@ static struct d3dx_parameter *get_parameter_element_by_name(struct d3dx9_base_ef switch (*part++) { case '.': - return get_parameter_by_name(base, temp_parameter, part); + return get_parameter_by_name(&effect->base_effect, temp_parameter, part); case '\0': TRACE("Returning parameter %p\n", temp_parameter); @@ -890,7 +890,7 @@ static struct d3dx_parameter *get_annotation_by_name(struct d3dx_effect *effect, return get_parameter_by_name(base, temp_parameter, part); case '[': - return get_parameter_element_by_name(base, temp_parameter, part); + return get_parameter_element_by_name(effect, temp_parameter, part); default: FIXME("Unhandled case \"%c\"\n", *--part); @@ -979,7 +979,7 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, return get_parameter_by_name(base, temp_parameter, part); case '[': - return get_parameter_element_by_name(base, temp_parameter, part); + return get_parameter_element_by_name(effect, temp_parameter, part); default: FIXME("Unhandled case \"%c\"\n", *--part); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 9b9ed9560eb..8fdf9eb6d33 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: 0c6345322983ed3df9100b801aaa56367b37a501} +tags: {wine: 09770370c0b9159d3324684146544b6f441e4889}
3 years, 10 months
1
0
0
0
[reactos] 83/218: [WINESYNC] d3dx9: Move full_name_tmp_size out of struct d3dx9_base_effect.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ee5b715bdefc0415205ca…
commit ee5b715bdefc0415205ca042234a3cdc48bfb304 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 full_name_tmp_size 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 0c6345322983ed3df9100b801aaa56367b37a501 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 7 +++---- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 8cea5cc9440..91a0a1b5721 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -165,8 +165,6 @@ struct d3dx9_base_effect DWORD flags; ULONG64 version_counter; - - unsigned int full_name_tmp_size; }; struct d3dx_effect @@ -180,6 +178,7 @@ struct d3dx_effect struct d3dx_object *objects; struct wine_rb_tree param_tree; char *full_name_tmp; + unsigned int full_name_tmp_size; struct ID3DXEffectStateManager *manager; struct IDirect3DDevice9 *device; @@ -932,7 +931,7 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, name_len = strlen(name); param_name_len = strlen(parameter->full_name); full_name_size = name_len + param_name_len + 2; - if (base->full_name_tmp_size < full_name_size) + if (effect->full_name_tmp_size < full_name_size) { if (!(full_name = heap_realloc(effect->full_name_tmp, full_name_size))) { @@ -940,7 +939,7 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, return NULL; } effect->full_name_tmp = full_name; - base->full_name_tmp_size = full_name_size; + effect->full_name_tmp_size = full_name_size; } else { diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index b388313b72a..9b9ed9560eb 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: 3779ff07b048bfdaf67674db89aedaa1e4b1e810} +tags: {wine: 0c6345322983ed3df9100b801aaa56367b37a501}
3 years, 10 months
1
0
0
0
[reactos] 82/218: [WINESYNC] d3dx9: Move full_name_tmp out of struct d3dx9_base_effect.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2493cdf2628cd472be383…
commit 2493cdf2628cd472be383d0f371da6a34c38510a 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 full_name_tmp 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 3779ff07b048bfdaf67674db89aedaa1e4b1e810 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 10 +++++----- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index f03e9c95377..8cea5cc9440 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; - char *full_name_tmp; unsigned int full_name_tmp_size; }; @@ -180,6 +179,7 @@ struct d3dx_effect unsigned int object_count; struct d3dx_object *objects; struct wine_rb_tree param_tree; + char *full_name_tmp; struct ID3DXEffectStateManager *manager; struct IDirect3DDevice9 *device; @@ -694,7 +694,7 @@ static void d3dx9_base_effect_cleanup(struct d3dx_effect *effect) TRACE("base %p.\n", base); - heap_free(base->full_name_tmp); + heap_free(effect->full_name_tmp); if (base->parameters) { @@ -934,17 +934,17 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, full_name_size = name_len + param_name_len + 2; if (base->full_name_tmp_size < full_name_size) { - if (!(full_name = heap_realloc(base->full_name_tmp, full_name_size))) + if (!(full_name = heap_realloc(effect->full_name_tmp, full_name_size))) { ERR("Out of memory.\n"); return NULL; } - base->full_name_tmp = full_name; + effect->full_name_tmp = full_name; base->full_name_tmp_size = full_name_size; } else { - full_name = base->full_name_tmp; + full_name = effect->full_name_tmp; } memcpy(full_name, parameter->full_name, param_name_len); full_name[param_name_len] = '.'; diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 5fef219d7b2..b388313b72a 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: adc1b5a8bc6bcce427e231485015da43d24ca5cb} +tags: {wine: 3779ff07b048bfdaf67674db89aedaa1e4b1e810}
3 years, 10 months
1
0
0
0
[reactos] 81/218: [WINESYNC] d3dx9: Move param_tree out of struct d3dx9_base_effect.
by winesync
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}
3 years, 10 months
1
0
0
0
[reactos] 80/218: [WINESYNC] d3dx9: Avoid double free on effect initialization failure.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6d0bce396f0515f86767b…
commit 6d0bce396f0515f86767b5024cc9d8afb85fcad0 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: Avoid double free on effect initialization failure. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id cffe35488dc16414c6938e0f1a0169fb59730c97 by Matteo Bruni <mbruni(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/effect.c | 1 - sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 3dacdebd23a..317425415ac 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -6307,7 +6307,6 @@ 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(effect); return D3DERR_INVALIDCALL; } } diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 61529b927f5..21d0e2cbc75 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: 2f16d2f4ca86263571797d9544a9534e8aa29c16} +tags: {wine: cffe35488dc16414c6938e0f1a0169fb59730c97}
3 years, 10 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
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