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] 39/218: [WINESYNC] d3dx9: Merge the d3dx_effect_SetBool() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=022ce2f70b2febf11e245…
commit 022ce2f70b2febf11e2455f47a06998e3d252890 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:27 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_SetBool() 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 b4bc9ea7b711c03b93d15bb2ba04dfbbb9d70f72 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 28 +++++++++++----------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index f0a1bbfc4bf..a131e3d3269 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1349,22 +1349,6 @@ static HRESULT d3dx9_base_effect_get_value(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_set_bool(struct d3dx9_base_effect *base, D3DXHANDLE parameter, BOOL b) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (param && !param->element_count && param->rows == 1 && param->columns == 1) - { - set_number(param->data, param->type, &b, D3DXPT_BOOL); - set_dirty(param); - return D3D_OK; - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_bool_array(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const BOOL *b, UINT count) { @@ -3465,10 +3449,20 @@ 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); TRACE("iface %p, parameter %p, b %#x.\n", iface, parameter, b); - return d3dx9_base_effect_set_bool(&effect->base_effect, parameter, b); + if (param && !param->element_count && param->rows == 1 && param->columns == 1) + { + set_number(param->data, param->type, &b, D3DXPT_BOOL); + set_dirty(param); + return D3D_OK; + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_GetBool(ID3DXEffect *iface, D3DXHANDLE parameter, BOOL *b) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index a2da305b7fc..32e79554d16 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: ab7756619c1b16c761618a68d1b6a06ad437cbe8} +tags: {wine: b4bc9ea7b711c03b93d15bb2ba04dfbbb9d70f72}
3 years, 10 months
1
0
0
0
[reactos] 38/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetBoolArray() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3c490400306e3344edee2…
commit 3c490400306e3344edee263bb5c33b4dcbc067d4 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:26 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_GetBoolArray() 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 ab7756619c1b16c761618a68d1b6a06ad437cbe8 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 43 ++++++++++++++++---------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 19 insertions(+), 26 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 9ff76097072..f0a1bbfc4bf 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1404,30 +1404,6 @@ static HRESULT d3dx9_base_effect_set_bool_array(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_get_bool_array(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, BOOL *b, UINT count) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (b && param && (param->class == D3DXPC_SCALAR - || param->class == D3DXPC_VECTOR - || param->class == D3DXPC_MATRIX_ROWS - || param->class == D3DXPC_MATRIX_COLUMNS)) - { - UINT i, size = min(count, param->bytes / sizeof(DWORD)); - - for (i = 0; i < size; ++i) - { - set_number(&b[i], D3DXPT_BOOL, (DWORD *)param->data + i, param->type); - } - return D3D_OK; - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_int(struct d3dx9_base_effect *base, D3DXHANDLE parameter, INT n) { struct d3dx_parameter *param = get_valid_parameter(base, parameter); @@ -3526,10 +3502,27 @@ 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); TRACE("iface %p, parameter %p, b %p, count %u.\n", iface, parameter, b, count); - return d3dx9_base_effect_get_bool_array(&effect->base_effect, parameter, b, count); + if (b && param && (param->class == D3DXPC_SCALAR + || param->class == D3DXPC_VECTOR + || param->class == D3DXPC_MATRIX_ROWS + || param->class == D3DXPC_MATRIX_COLUMNS)) + { + unsigned int i, size = min(count, param->bytes / sizeof(DWORD)); + + for (i = 0; i < size; ++i) + { + set_number(&b[i], D3DXPT_BOOL, (DWORD *)param->data + i, param->type); + } + return D3D_OK; + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_SetInt(ID3DXEffect *iface, D3DXHANDLE parameter, INT n) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 0048c27ab3e..a2da305b7fc 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: cca43ca090ccb27c5e3d3564dbe69a424f0c9872} +tags: {wine: ab7756619c1b16c761618a68d1b6a06ad437cbe8}
3 years, 10 months
1
0
0
0
[reactos] 37/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetBool() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=706fd8dde366a4e1f0223…
commit 706fd8dde366a4e1f0223412b9f48a2acd4f6e7c Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:26 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_GetBool() 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 cca43ca090ccb27c5e3d3564dbe69a424f0c9872 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 28 +++++++++++----------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 88a5c7aca01..9ff76097072 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1365,22 +1365,6 @@ static HRESULT d3dx9_base_effect_set_bool(struct d3dx9_base_effect *base, D3DXHA return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_get_bool(struct d3dx9_base_effect *base, D3DXHANDLE parameter, BOOL *b) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (b && param && !param->element_count && param->rows == 1 && param->columns == 1) - { - set_number(b, D3DXPT_BOOL, param->data, param->type); - TRACE("Returning %s\n", *b ? "TRUE" : "FALSE"); - return D3D_OK; - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_bool_array(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const BOOL *b, UINT count) { @@ -3514,10 +3498,20 @@ 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); TRACE("iface %p, parameter %p, b %p.\n", iface, parameter, b); - return d3dx9_base_effect_get_bool(&effect->base_effect, parameter, b); + if (b && param && !param->element_count && param->rows == 1 && param->columns == 1) + { + set_number(b, D3DXPT_BOOL, param->data, param->type); + TRACE("Returning %s\n", *b ? "TRUE" : "FALSE"); + return D3D_OK; + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_SetBoolArray(ID3DXEffect *iface, D3DXHANDLE parameter, const BOOL *b, UINT count) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index b4b66e5ae06..0048c27ab3e 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: f0d7dd0761fc0b6a45b3d3ae136339d3c3bf8075} +tags: {wine: cca43ca090ccb27c5e3d3564dbe69a424f0c9872}
3 years, 10 months
1
0
0
0
[reactos] 36/218: [WINESYNC] d3dx9: Move objects out of struct d3dx9_base_effect.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9a5e0c591c2ac2bf591b4…
commit 9a5e0c591c2ac2bf591b46c6b4e5e0c3c3d0ab85 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:26 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Move objects 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 f0d7dd0761fc0b6a45b3d3ae136339d3c3bf8075 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 46 +++++++++++++++++++------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 7f5c69364f9..88a5c7aca01 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -160,7 +160,6 @@ struct d3dx9_base_effect struct d3dx_top_level_parameter *parameters; struct d3dx_technique *techniques; - struct d3dx_object *objects; struct d3dx_effect_pool *pool; DWORD flags; @@ -180,6 +179,7 @@ struct d3dx_effect struct d3dx9_base_effect base_effect; unsigned int parameter_count; unsigned int object_count; + struct d3dx_object *objects; struct ID3DXEffectStateManager *manager; struct IDirect3DDevice9 *device; @@ -709,14 +709,14 @@ static void d3dx9_base_effect_cleanup(struct d3dx9_base_effect *base) base->techniques = NULL; } - if (base->objects) + if (base->effect->objects) { for (i = 0; i < base->effect->object_count; ++i) { - free_object(&base->objects[i]); + free_object(&base->effect->objects[i]); } - HeapFree(GetProcessHeap(), 0, base->objects); - base->objects = NULL; + HeapFree(GetProcessHeap(), 0, base->effect->objects); + base->effect->objects = NULL; } } @@ -3175,7 +3175,7 @@ static HRESULT WINAPI d3dx_effect_GetPassDesc(ID3DXEffect *iface, D3DXHANDLE pas FALSE, ¶m_dirty))) return hr; - data = param->object_id ? effect->base_effect.objects[param->object_id].data : NULL; + data = param->object_id ? effect->objects[param->object_id].data : NULL; if (state_table[state->operation].class == SC_VERTEXSHADER) desc->pVertexShaderFunction = data; else @@ -3888,7 +3888,6 @@ static D3DXHANDLE WINAPI d3dx_effect_GetCurrentTechnique(ID3DXEffect *iface) static HRESULT WINAPI d3dx_effect_ValidateTechnique(ID3DXEffect *iface, D3DXHANDLE technique) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx9_base_effect *base = &effect->base_effect; struct d3dx_technique *tech = get_valid_technique(effect, technique); HRESULT ret = D3D_OK; unsigned int i, j; @@ -3920,7 +3919,7 @@ static HRESULT WINAPI d3dx_effect_ValidateTechnique(ID3DXEffect *iface, D3DXHAND FALSE, ¶m_dirty))) return hr; - if (param->object_id && base->objects[param->object_id].creation_failed) + if (param->object_id && effect->objects[param->object_id].creation_failed) { ret = E_FAIL; goto done; @@ -5314,7 +5313,7 @@ static HRESULT d3dx9_parse_name(char **name, const char *ptr) static HRESULT d3dx9_copy_data(struct d3dx_effect *effect, unsigned int object_id, const char **ptr) { - struct d3dx_object *object = &effect->base_effect.objects[object_id]; + struct d3dx_object *object = &effect->objects[object_id]; if (object->size || object->data) { @@ -6011,7 +6010,7 @@ static HRESULT d3dx_parse_array_selector(struct d3dx_effect *effect, struct d3dx struct d3dx9_base_effect *base = &effect->base_effect; DWORD string_size; struct d3dx_parameter *param = &state->parameter; - struct d3dx_object *object = &base->objects[param->object_id]; + struct d3dx_object *object = &effect->objects[param->object_id]; char *ptr = object->data; HRESULT ret; @@ -6052,7 +6051,7 @@ static HRESULT d3dx_parse_array_selector(struct d3dx_effect *effect, struct d3dx if (!param->members[i].param_eval) { TRACE("Creating preshader for object %u.\n", param->members[i].object_id); - object = &base->objects[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), skip_constants, skip_constants_count))) @@ -6153,7 +6152,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data, TRACE("State operation %#x (%s).\n", state->operation, state_table[state->operation].name); param = &state->parameter; TRACE("Using object id %u.\n", param->object_id); - object = &base->objects[param->object_id]; + object = &effect->objects[param->object_id]; TRACE("Usage %u: class %s, type %s.\n", usage, debug_d3dxparameter_class(param->class), debug_d3dxparameter_type(param->type)); @@ -6211,7 +6210,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data, TRACE("Mapping to parameter %p, having object id %u.\n", refpar, refpar->object_id); if (refpar->type == D3DXPT_VERTEXSHADER || refpar->type == D3DXPT_PIXELSHADER) { - struct d3dx_object *refobj = &base->objects[refpar->object_id]; + struct d3dx_object *refobj = &effect->objects[refpar->object_id]; if (!refpar->param_eval) { @@ -6270,8 +6269,9 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U read_dword(&ptr, &effect->object_count); TRACE("Object count: %u.\n", effect->object_count); - base->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*base->objects) * effect->object_count); - if (!base->objects) + effect->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof(*effect->objects) * effect->object_count); + if (!effect->objects) { ERR("Out of memory.\n"); hr = E_OUTOFMEMORY; @@ -6293,7 +6293,7 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U for (i = 0; i < effect->parameter_count; ++i) { param_set_magic_number(&base->parameters[i].param); - hr = d3dx_parse_effect_parameter(effect, &base->parameters[i], data, &ptr, base->objects); + hr = d3dx_parse_effect_parameter(effect, &base->parameters[i], data, &ptr, effect->objects); if (hr != D3D_OK) { WARN("Failed to parse parameter %u.\n", i); @@ -6319,7 +6319,7 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U for (i = 0; i < base->technique_count; ++i) { TRACE("Parsing technique %u.\n", i); - hr = d3dx_parse_effect_technique(effect, &base->techniques[i], data, &ptr, base->objects); + hr = d3dx_parse_effect_technique(effect, &base->techniques[i], data, &ptr, effect->objects); if (hr != D3D_OK) { WARN("Failed to parse technique %u.\n", i); @@ -6344,9 +6344,9 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U if (FAILED(hr = d3dx9_copy_data(effect, id, &ptr))) goto err_out; - if (base->objects[id].data) + if (effect->objects[id].data) { - if (FAILED(hr = d3dx9_create_object(base, &base->objects[id]))) + if (FAILED(hr = d3dx9_create_object(base, &effect->objects[id]))) goto err_out; } } @@ -6394,14 +6394,14 @@ err_out: base->parameters = NULL; } - if (base->objects) + if (effect->objects) { for (i = 0; i < effect->object_count; ++i) { - free_object(&base->objects[i]); + free_object(&effect->objects[i]); } - HeapFree(GetProcessHeap(), 0, base->objects); - base->objects = NULL; + HeapFree(GetProcessHeap(), 0, effect->objects); + effect->objects = NULL; } return hr; diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 8944dd0b7da..b4b66e5ae06 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: 52c2092fa92cd06ea2c1074072be4cadd872f083} +tags: {wine: f0d7dd0761fc0b6a45b3d3ae136339d3c3bf8075}
3 years, 10 months
1
0
0
0
[reactos] 35/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetPassDesc() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bd5f74314cc3e15eb8776…
commit bd5f74314cc3e15eb87764ba3c7d2f1c24eedbb3 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:26 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_GetPassDesc() 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 52c2092fa92cd06ea2c1074072be4cadd872f083 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 95 ++++++++++++++++++-------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 45 insertions(+), 52 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 2a16ecd680b..7f5c69364f9 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1114,55 +1114,6 @@ static HRESULT d3dx9_get_param_value_ptr(struct d3dx_pass *pass, struct d3dx_sta return E_NOTIMPL; } -static HRESULT d3dx9_base_effect_get_pass_desc(struct d3dx9_base_effect *base, - D3DXHANDLE pass_handle, D3DXPASS_DESC *desc) -{ - struct d3dx_pass *pass = get_valid_pass(base, pass_handle); - unsigned int i; - - if (!desc || !pass) - { - WARN("Invalid argument specified.\n"); - return D3DERR_INVALIDCALL; - } - - desc->Name = pass->name; - desc->Annotations = pass->annotation_count; - - desc->pVertexShaderFunction = NULL; - desc->pPixelShaderFunction = NULL; - - if (base->flags & D3DXFX_NOT_CLONEABLE) - return D3D_OK; - - for (i = 0; i < pass->state_count; ++i) - { - struct d3dx_state *state = &pass->states[i]; - - if (state_table[state->operation].class == SC_VERTEXSHADER - || state_table[state->operation].class == SC_PIXELSHADER) - { - struct d3dx_parameter *param; - void *param_value; - BOOL param_dirty; - HRESULT hr; - void *data; - - if (FAILED(hr = d3dx9_get_param_value_ptr(pass, &pass->states[i], ¶m_value, ¶m, - FALSE, ¶m_dirty))) - return hr; - - data = param->object_id ? base->objects[param->object_id].data : NULL; - if (state_table[state->operation].class == SC_VERTEXSHADER) - desc->pVertexShaderFunction = data; - else - desc->pPixelShaderFunction = data; - } - } - - return D3D_OK; -} - static unsigned int get_annotation_from_object(struct d3dx_effect *effect, D3DXHANDLE object, struct d3dx_parameter **annotations) { @@ -3184,13 +3135,55 @@ static HRESULT WINAPI d3dx_effect_GetTechniqueDesc(ID3DXEffect *iface, D3DXHANDL return D3D_OK; } -static HRESULT WINAPI d3dx_effect_GetPassDesc(ID3DXEffect *iface, D3DXHANDLE pass, D3DXPASS_DESC *desc) +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); + unsigned int i; TRACE("iface %p, pass %p, desc %p.\n", iface, pass, desc); - return d3dx9_base_effect_get_pass_desc(&effect->base_effect, pass, desc); + if (!desc || !pass) + { + WARN("Invalid argument specified.\n"); + return D3DERR_INVALIDCALL; + } + + desc->Name = pass->name; + desc->Annotations = pass->annotation_count; + + desc->pVertexShaderFunction = NULL; + desc->pPixelShaderFunction = NULL; + + if (effect->base_effect.flags & D3DXFX_NOT_CLONEABLE) + return D3D_OK; + + for (i = 0; i < pass->state_count; ++i) + { + struct d3dx_state *state = &pass->states[i]; + + if (state_table[state->operation].class == SC_VERTEXSHADER + || state_table[state->operation].class == SC_PIXELSHADER) + { + struct d3dx_parameter *param; + void *param_value; + BOOL param_dirty; + HRESULT hr; + void *data; + + if (FAILED(hr = d3dx9_get_param_value_ptr(pass, &pass->states[i], ¶m_value, ¶m, + FALSE, ¶m_dirty))) + return hr; + + data = param->object_id ? effect->base_effect.objects[param->object_id].data : NULL; + if (state_table[state->operation].class == SC_VERTEXSHADER) + desc->pVertexShaderFunction = data; + else + desc->pPixelShaderFunction = data; + } + } + + return D3D_OK; } static HRESULT WINAPI d3dx_effect_GetFunctionDesc(ID3DXEffect *iface, D3DXHANDLE shader, diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index f249ca06f78..8944dd0b7da 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: 26b9b04e7f40c7a2011684f01ff07be91047b492} +tags: {wine: 52c2092fa92cd06ea2c1074072be4cadd872f083}
3 years, 10 months
1
0
0
0
[reactos] 34/218: [WINESYNC] d3dx9: Pass a struct d3dx_effect to d3dx9_copy_data().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2b9f231acf22cc2ebfb00…
commit 2b9f231acf22cc2ebfb00877677293cdf092519f Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:26 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Pass a struct d3dx_effect to d3dx9_copy_data(). 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 26b9b04e7f40c7a2011684f01ff07be91047b492 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 14 +++++++------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 9e773481114..2a16ecd680b 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -5319,9 +5319,9 @@ static HRESULT d3dx9_parse_name(char **name, const char *ptr) return D3D_OK; } -static HRESULT d3dx9_copy_data(struct d3dx9_base_effect *base, unsigned int object_id, const char **ptr) +static HRESULT d3dx9_copy_data(struct d3dx_effect *effect, unsigned int object_id, const char **ptr) { - struct d3dx_object *object = &base->objects[object_id]; + struct d3dx_object *object = &effect->base_effect.objects[object_id]; if (object->size || object->data) { @@ -6172,7 +6172,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data, case D3DXPT_VERTEXSHADER: case D3DXPT_PIXELSHADER: state->type = ST_CONSTANT; - if (FAILED(hr = d3dx9_copy_data(base, param->object_id, ptr))) + if (FAILED(hr = d3dx9_copy_data(effect, param->object_id, ptr))) return hr; if (object->data) @@ -6191,7 +6191,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data, case D3DXPT_FLOAT: case D3DXPT_STRING: state->type = ST_FXLC; - if (FAILED(hr = d3dx9_copy_data(base, param->object_id, ptr))) + 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))) @@ -6206,7 +6206,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data, case 1: state->type = ST_PARAMETER; - if (FAILED(hr = d3dx9_copy_data(base, param->object_id, ptr))) + if (FAILED(hr = d3dx9_copy_data(effect, param->object_id, ptr))) return hr; TRACE("Looking for parameter %s.\n", debugstr_a(object->data)); @@ -6238,7 +6238,7 @@ static HRESULT d3dx_parse_resource(struct d3dx_effect *effect, const char *data, case 2: state->type = ST_ARRAY_SELECTOR; - if (FAILED(hr = d3dx9_copy_data(base, param->object_id, ptr))) + if (FAILED(hr = d3dx9_copy_data(effect, param->object_id, ptr))) return hr; hr = d3dx_parse_array_selector(effect, state, skip_constants, skip_constants_count); break; @@ -6348,7 +6348,7 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U read_dword(&ptr, &id); TRACE("id: %u.\n", id); - if (FAILED(hr = d3dx9_copy_data(base, id, &ptr))) + if (FAILED(hr = d3dx9_copy_data(effect, id, &ptr))) goto err_out; if (base->objects[id].data) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index afcb40214df..f249ca06f78 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: 54bdc66acf4abe1f1fa38238ed824c2372e1ff91} +tags: {wine: 26b9b04e7f40c7a2011684f01ff07be91047b492}
3 years, 10 months
1
0
0
0
[reactos] 33/218: [WINESYNC] d3dx9: Move object_count out of struct d3dx9_base_effect.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=44ec74a6a4c1d75a115c0…
commit 44ec74a6a4c1d75a115c047419cf06f72bcb5c4f Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:26 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Move object_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 54bdc66acf4abe1f1fa38238ed824c2372e1ff91 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 c32b1a57563..9e773481114 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -157,7 +157,6 @@ struct d3dx9_base_effect struct d3dx_effect *effect; UINT technique_count; - UINT object_count; struct d3dx_top_level_parameter *parameters; struct d3dx_technique *techniques; @@ -180,6 +179,7 @@ struct d3dx_effect struct d3dx9_base_effect base_effect; unsigned int parameter_count; + unsigned int object_count; struct ID3DXEffectStateManager *manager; struct IDirect3DDevice9 *device; @@ -711,7 +711,7 @@ static void d3dx9_base_effect_cleanup(struct d3dx9_base_effect *base) if (base->objects) { - for (i = 0; i < base->object_count; ++i) + for (i = 0; i < base->effect->object_count; ++i) { free_object(&base->objects[i]); } @@ -6274,10 +6274,10 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U skip_dword_unknown(&ptr, 1); - read_dword(&ptr, &base->object_count); - TRACE("Object count: %u.\n", base->object_count); + read_dword(&ptr, &effect->object_count); + TRACE("Object count: %u.\n", effect->object_count); - base->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*base->objects) * base->object_count); + base->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*base->objects) * effect->object_count); if (!base->objects) { ERR("Out of memory.\n"); @@ -6403,7 +6403,7 @@ err_out: if (base->objects) { - for (i = 0; i < base->object_count; ++i) + for (i = 0; i < effect->object_count; ++i) { free_object(&base->objects[i]); } diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 89c19b44d97..afcb40214df 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: 42839d15e3ec829f939fe1f99ac6b025f64b18de} +tags: {wine: 54bdc66acf4abe1f1fa38238ed824c2372e1ff91}
3 years, 10 months
1
0
0
0
[reactos] 32/218: [WINESYNC] d3dx9: Pass a struct d3dx_effect to the get technique helpers.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=823786711613a1ef7a50e…
commit 823786711613a1ef7a50ee739460b31c83100371 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:26 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Pass a struct d3dx_effect to the get technique 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 42839d15e3ec829f939fe1f99ac6b025f64b18de by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 35 ++++++++++++++++++----------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index fe12d21e5d5..c32b1a57563 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -457,9 +457,10 @@ static inline D3DXHANDLE get_pass_handle(struct d3dx_pass *pass) return (D3DXHANDLE)pass; } -static struct d3dx_technique *get_technique_by_name(struct d3dx9_base_effect *base, const char *name) +static struct d3dx_technique *get_technique_by_name(struct d3dx_effect *effect, const char *name) { - UINT i; + struct d3dx9_base_effect *base = &effect->base_effect; + unsigned int i; if (!name) return NULL; @@ -472,8 +473,9 @@ static struct d3dx_technique *get_technique_by_name(struct d3dx9_base_effect *ba return NULL; } -static struct d3dx_technique *get_valid_technique(struct d3dx9_base_effect *base, D3DXHANDLE technique) +static struct d3dx_technique *get_valid_technique(struct d3dx_effect *effect, D3DXHANDLE technique) { + struct d3dx9_base_effect *base = &effect->base_effect; unsigned int i; for (i = 0; i < base->technique_count; ++i) @@ -482,7 +484,7 @@ static struct d3dx_technique *get_valid_technique(struct d3dx9_base_effect *base return &base->techniques[i]; } - return get_technique_by_name(base, technique); + return get_technique_by_name(effect, technique); } static struct d3dx_pass *get_valid_pass(struct d3dx9_base_effect *base, D3DXHANDLE pass) @@ -1167,7 +1169,7 @@ static unsigned int get_annotation_from_object(struct d3dx_effect *effect, D3DXH struct d3dx9_base_effect *base = &effect->base_effect; struct d3dx_parameter *param = get_valid_parameter(base, object); struct d3dx_pass *pass = get_valid_pass(base, object); - struct d3dx_technique *technique = get_valid_technique(base, object); + struct d3dx_technique *technique = get_valid_technique(effect, object); if (pass) { @@ -3165,7 +3167,7 @@ static HRESULT WINAPI d3dx_effect_GetTechniqueDesc(ID3DXEffect *iface, D3DXHANDL D3DXTECHNIQUE_DESC *desc) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_technique *tech = technique ? get_valid_technique(&effect->base_effect, technique) : &effect->base_effect.techniques[0]; + struct d3dx_technique *tech = technique ? get_valid_technique(effect, technique) : &effect->base_effect.techniques[0]; TRACE("iface %p, technique %p, desc %p.\n", iface, technique, desc); @@ -3361,7 +3363,7 @@ static D3DXHANDLE WINAPI d3dx_effect_GetTechnique(ID3DXEffect *iface, UINT index static D3DXHANDLE WINAPI d3dx_effect_GetTechniqueByName(ID3DXEffect *iface, const char *name) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_technique *tech = get_technique_by_name(&effect->base_effect, name); + struct d3dx_technique *tech = get_technique_by_name(effect, name); TRACE("iface %p, name %s.\n", iface, debugstr_a(name)); @@ -3380,7 +3382,7 @@ static D3DXHANDLE WINAPI d3dx_effect_GetTechniqueByName(ID3DXEffect *iface, cons static D3DXHANDLE WINAPI d3dx_effect_GetPass(ID3DXEffect *iface, D3DXHANDLE technique, UINT index) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_technique *tech = get_valid_technique(&effect->base_effect, technique); + struct d3dx_technique *tech = get_valid_technique(effect, technique); TRACE("iface %p, technique %p, index %u.\n", iface, technique, index); @@ -3398,7 +3400,7 @@ static D3DXHANDLE WINAPI d3dx_effect_GetPass(ID3DXEffect *iface, D3DXHANDLE tech static D3DXHANDLE WINAPI d3dx_effect_GetPassByName(ID3DXEffect *iface, D3DXHANDLE technique, const char *name) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); - struct d3dx_technique *tech = get_valid_technique(&effect->base_effect, technique); + struct d3dx_technique *tech = get_valid_technique(effect, technique); TRACE("iface %p, technique %p, name %s.\n", iface, technique, debugstr_a(name)); @@ -3864,15 +3866,14 @@ static HRESULT WINAPI d3dx_effect_GetPool(ID3DXEffect *iface, ID3DXEffectPool ** static HRESULT WINAPI d3dx_effect_SetTechnique(ID3DXEffect *iface, D3DXHANDLE technique) { - struct d3dx_effect *This = impl_from_ID3DXEffect(iface); - struct d3dx9_base_effect *base = &This->base_effect; - struct d3dx_technique *tech = get_valid_technique(base, technique); + struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_technique *tech = get_valid_technique(effect, technique); - TRACE("iface %p, technique %p\n", This, technique); + TRACE("iface %p, technique %p\n", iface, technique); if (tech) { - This->active_technique = tech; + effect->active_technique = tech; TRACE("Technique %p\n", tech); return D3D_OK; } @@ -3895,7 +3896,7 @@ static HRESULT WINAPI d3dx_effect_ValidateTechnique(ID3DXEffect *iface, D3DXHAND { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); struct d3dx9_base_effect *base = &effect->base_effect; - struct d3dx_technique *tech = get_valid_technique(base, technique); + struct d3dx_technique *tech = get_valid_technique(effect, technique); HRESULT ret = D3D_OK; unsigned int i, j; @@ -3951,7 +3952,7 @@ static HRESULT WINAPI d3dx_effect_FindNextValidTechnique(ID3DXEffect *iface, D3D if (technique) { - if (!(prev_tech = get_valid_technique(base, technique))) + if (!(prev_tech = get_valid_technique(effect, technique))) return D3DERR_INVALIDCALL; for (i = 0; i < base->technique_count; ++i) @@ -4094,7 +4095,7 @@ static BOOL WINAPI d3dx_effect_IsParameterUsed(ID3DXEffect *iface, D3DXHANDLE pa { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); - struct d3dx_technique *tech = get_valid_technique(&effect->base_effect, technique); + struct d3dx_technique *tech = get_valid_technique(effect, technique); BOOL ret; TRACE("iface %p, parameter %p, technique %p.\n", iface, parameter, technique); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 3aa09dd319e..89c19b44d97 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: a33b20a0604e29c4b502a0d77e8828e926b09a62} +tags: {wine: 42839d15e3ec829f939fe1f99ac6b025f64b18de}
3 years, 10 months
1
0
0
0
[reactos] 31/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetTechnique() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f23b53d642561bedd8840…
commit f23b53d642561bedd8840d5913d1f99eed550fd4 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:26 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_GetTechnique() 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 a33b20a0604e29c4b502a0d77e8828e926b09a62 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 23 +++++++++-------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 11fda776c6a..fe12d21e5d5 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1161,19 +1161,6 @@ static HRESULT d3dx9_base_effect_get_pass_desc(struct d3dx9_base_effect *base, return D3D_OK; } -static D3DXHANDLE d3dx9_base_effect_get_technique(struct d3dx9_base_effect *base, UINT index) -{ - if (index >= base->technique_count) - { - WARN("Invalid argument specified.\n"); - return NULL; - } - - TRACE("Returning technique %p.\n", &base->techniques[index]); - - return get_technique_handle(&base->techniques[index]); -} - static unsigned int get_annotation_from_object(struct d3dx_effect *effect, D3DXHANDLE object, struct d3dx_parameter **annotations) { @@ -3360,7 +3347,15 @@ static D3DXHANDLE WINAPI d3dx_effect_GetTechnique(ID3DXEffect *iface, UINT index TRACE("iface %p, index %u.\n", iface, index); - return d3dx9_base_effect_get_technique(&effect->base_effect, index); + if (index >= effect->base_effect.technique_count) + { + WARN("Invalid argument specified.\n"); + return NULL; + } + + TRACE("Returning technique %p.\n", &effect->base_effect.techniques[index]); + + return get_technique_handle(&effect->base_effect.techniques[index]); } static D3DXHANDLE WINAPI d3dx_effect_GetTechniqueByName(ID3DXEffect *iface, const char *name) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index e0f4567a1c5..3aa09dd319e 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: a2e0046fc52c4e08a64cbe76c78f184e7d5b27d2} +tags: {wine: a33b20a0604e29c4b502a0d77e8828e926b09a62}
3 years, 10 months
1
0
0
0
[reactos] 30/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetTechniqueByName() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=570dd1c48a20f2618a673…
commit 570dd1c48a20f2618a67354719ada1fe43248339 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:26 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_GetTechniqueByName() 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 a2e0046fc52c4e08a64cbe76c78f184e7d5b27d2 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 28 +++++++++++----------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 0a0052d920c..11fda776c6a 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1174,22 +1174,6 @@ static D3DXHANDLE d3dx9_base_effect_get_technique(struct d3dx9_base_effect *base return get_technique_handle(&base->techniques[index]); } -static D3DXHANDLE d3dx9_base_effect_get_technique_by_name(struct d3dx9_base_effect *base, const char *name) -{ - struct d3dx_technique *tech = get_technique_by_name(base, name); - - if (tech) - { - D3DXHANDLE t = get_technique_handle(tech); - TRACE("Returning technique %p\n", t); - return t; - } - - WARN("Technique not found.\n"); - - return NULL; -} - static unsigned int get_annotation_from_object(struct d3dx_effect *effect, D3DXHANDLE object, struct d3dx_parameter **annotations) { @@ -3382,10 +3366,20 @@ static D3DXHANDLE WINAPI d3dx_effect_GetTechnique(ID3DXEffect *iface, UINT index static D3DXHANDLE WINAPI d3dx_effect_GetTechniqueByName(ID3DXEffect *iface, const char *name) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_technique *tech = get_technique_by_name(&effect->base_effect, name); TRACE("iface %p, name %s.\n", iface, debugstr_a(name)); - return d3dx9_base_effect_get_technique_by_name(&effect->base_effect, name); + if (tech) + { + D3DXHANDLE t = get_technique_handle(tech); + TRACE("Returning technique %p\n", t); + return t; + } + + WARN("Technique not found.\n"); + + return NULL; } static D3DXHANDLE WINAPI d3dx_effect_GetPass(ID3DXEffect *iface, D3DXHANDLE technique, UINT index) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 68b6e7182db..e0f4567a1c5 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: 10aa0819138f4aaf0f872de74eaf953326afe997} +tags: {wine: a2e0046fc52c4e08a64cbe76c78f184e7d5b27d2}
3 years, 10 months
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
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