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] 49/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetMatrix() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2bbbe62494b5bf6b57cb2…
commit 2bbbe62494b5bf6b57cb2be1751c4eeb31c4371e 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_GetMatrix() 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 636a2b5a39f81699bddd289b04de9644611b8987 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 59 +++++++++++++++++--------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 27 insertions(+), 34 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 71cae411ef3..35751b4cf8c 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1563,38 +1563,6 @@ static HRESULT d3dx9_base_effect_set_matrix(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_get_matrix(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, D3DXMATRIX *matrix) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (matrix && param && !param->element_count) - { - TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); - - switch (param->class) - { - case D3DXPC_MATRIX_ROWS: - get_matrix(param, matrix, FALSE); - return D3D_OK; - - case D3DXPC_SCALAR: - case D3DXPC_VECTOR: - case D3DXPC_OBJECT: - case D3DXPC_STRUCT: - break; - - default: - FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); - break; - } - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_matrix_array(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) { @@ -3568,10 +3536,35 @@ static HRESULT WINAPI d3dx_effect_SetMatrix(ID3DXEffect *iface, D3DXHANDLE param static HRESULT WINAPI d3dx_effect_GetMatrix(ID3DXEffect *iface, D3DXHANDLE parameter, D3DXMATRIX *matrix) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, matrix %p.\n", iface, parameter, matrix); - return d3dx9_base_effect_get_matrix(&effect->base_effect, parameter, matrix); + if (matrix && param && !param->element_count) + { + TRACE("Class %s.\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_MATRIX_ROWS: + get_matrix(param, matrix, FALSE); + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s.\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_SetMatrixArray(ID3DXEffect *iface, D3DXHANDLE parameter, diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index b84955269ff..3a445d39150 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: 8ea0f9d4dd3e4d74af51df0a2dc2723f2be0da8c} +tags: {wine: 636a2b5a39f81699bddd289b04de9644611b8987}
3 years, 10 months
1
0
0
0
[reactos] 48/218: [WINESYNC] d3dx9: Merge the d3dx_effect_SetIntArray() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=122fe3ff587825b645037…
commit 122fe3ff587825b645037e06066a70dca657612e 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_SetIntArray() 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 8ea0f9d4dd3e4d74af51df0a2dc2723f2be0da8c by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 69 +++++++++++++++++--------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 31 insertions(+), 40 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 4f5bde7008d..71cae411ef3 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1349,44 +1349,6 @@ static HRESULT d3dx9_base_effect_get_value(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_set_int_array(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, const INT *n, UINT count) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (param) - { - UINT i, size = min(count, param->bytes / sizeof(DWORD)); - - TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); - - switch (param->class) - { - case D3DXPC_SCALAR: - case D3DXPC_VECTOR: - case D3DXPC_MATRIX_ROWS: - for (i = 0; i < size; ++i) - { - set_number((DWORD *)param->data + i, param->type, &n[i], D3DXPT_INT); - } - set_dirty(param); - return D3D_OK; - - case D3DXPC_OBJECT: - case D3DXPC_STRUCT: - break; - - default: - FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); - break; - } - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_vector(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXVECTOR4 *vector) { @@ -3392,10 +3354,39 @@ static HRESULT WINAPI d3dx_effect_GetInt(ID3DXEffect *iface, D3DXHANDLE paramete static HRESULT WINAPI d3dx_effect_SetIntArray(ID3DXEffect *iface, D3DXHANDLE parameter, const INT *n, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, n %p, count %u.\n", iface, parameter, n, count); - return d3dx9_base_effect_set_int_array(&effect->base_effect, parameter, n, count); + if (param) + { + unsigned int i, size = min(count, param->bytes / sizeof(DWORD)); + + TRACE("Class %s.\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < size; ++i) + set_number((DWORD *)param->data + i, param->type, &n[i], D3DXPT_INT); + set_dirty(param); + return D3D_OK; + + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s.\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_GetIntArray(ID3DXEffect *iface, D3DXHANDLE parameter, INT *n, UINT count) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 1928a01d280..b84955269ff 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: 2e771d77761a78b1b597144edfd69ae05b31561e} +tags: {wine: 8ea0f9d4dd3e4d74af51df0a2dc2723f2be0da8c}
3 years, 10 months
1
0
0
0
[reactos] 47/218: [WINESYNC] d3dx9: Merge the d3dx_effect_SetInt() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6c31253e62acfd15aa62b…
commit 6c31253e62acfd15aa62b4cd7bc3ae461e2ffc9a 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_SetInt() 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 2e771d77761a78b1b597144edfd69ae05b31561e by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 78 +++++++++++++++++--------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 35 insertions(+), 45 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 61a7a3620c9..4f5bde7008d 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1349,49 +1349,6 @@ static HRESULT d3dx9_base_effect_get_value(struct d3dx9_base_effect *base, 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); - - if (param && !param->element_count) - { - if (param->rows == 1 && param->columns == 1) - { - DWORD value; - - set_number(&value, param->type, &n, D3DXPT_INT); - if (value != *(DWORD *)param->data) - set_dirty(param); - *(DWORD *)param->data = value; - return D3D_OK; - } - - /* - * Split the value, if parameter is a vector with dimension 3 or 4. - */ - if (param->type == D3DXPT_FLOAT && - ((param->class == D3DXPC_VECTOR && param->columns != 2) || - (param->class == D3DXPC_MATRIX_ROWS && param->rows != 2 && param->columns == 1))) - { - TRACE("Vector fixup\n"); - - *(FLOAT *)param->data = ((n & 0xff0000) >> 16) * INT_FLOAT_MULTI_INVERSE; - ((FLOAT *)param->data)[1] = ((n & 0xff00) >> 8) * INT_FLOAT_MULTI_INVERSE; - ((FLOAT *)param->data)[2] = (n & 0xff) * INT_FLOAT_MULTI_INVERSE; - if (param->rows * param->columns > 3) - { - ((FLOAT *)param->data)[3] = ((n & 0xff000000) >> 24) * INT_FLOAT_MULTI_INVERSE; - } - set_dirty(param); - return D3D_OK; - } - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_int_array(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const INT *n, UINT count) { @@ -3355,10 +3312,43 @@ static HRESULT WINAPI d3dx_effect_GetBoolArray(ID3DXEffect *iface, D3DXHANDLE pa static HRESULT WINAPI d3dx_effect_SetInt(ID3DXEffect *iface, D3DXHANDLE parameter, INT n) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, n %d.\n", iface, parameter, n); - return d3dx9_base_effect_set_int(&effect->base_effect, parameter, n); + if (param && !param->element_count) + { + if (param->rows == 1 && param->columns == 1) + { + DWORD value; + + set_number(&value, param->type, &n, D3DXPT_INT); + if (value != *(DWORD *)param->data) + set_dirty(param); + *(DWORD *)param->data = value; + return D3D_OK; + } + + /* Split the value if parameter is a vector with dimension 3 or 4. */ + if (param->type == D3DXPT_FLOAT + && ((param->class == D3DXPC_VECTOR && param->columns != 2) + || (param->class == D3DXPC_MATRIX_ROWS && param->rows != 2 && param->columns == 1))) + { + TRACE("Vector fixup.\n"); + + *(float *)param->data = ((n & 0xff0000) >> 16) * INT_FLOAT_MULTI_INVERSE; + ((float *)param->data)[1] = ((n & 0xff00) >> 8) * INT_FLOAT_MULTI_INVERSE; + ((float *)param->data)[2] = (n & 0xff) * INT_FLOAT_MULTI_INVERSE; + if (param->rows * param->columns > 3) + ((float *)param->data)[3] = ((n & 0xff000000) >> 24) * INT_FLOAT_MULTI_INVERSE; + set_dirty(param); + return D3D_OK; + } + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_GetInt(ID3DXEffect *iface, D3DXHANDLE parameter, INT *n) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 73097766d95..1928a01d280 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: 570ae3b2aa2e7da3f14fbd59979a39e8f21763be} +tags: {wine: 2e771d77761a78b1b597144edfd69ae05b31561e}
3 years, 10 months
1
0
0
0
[reactos] 46/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetIntArray() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cdc0089c1caca3a7af18a…
commit cdc0089c1caca3a7af18ab1592ad234d6ccfe7ea 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_GetIntArray() 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 570ae3b2aa2e7da3f14fbd59979a39e8f21763be by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 41 +++++++++++++++----------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 3f95dcc00be..61a7a3620c9 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1430,30 +1430,6 @@ static HRESULT d3dx9_base_effect_set_int_array(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_get_int_array(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, INT *n, UINT count) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (n && 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(&n[i], D3DXPT_INT, (DWORD *)param->data + i, param->type); - } - return D3D_OK; - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_vector(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXVECTOR4 *vector) { @@ -3435,10 +3411,25 @@ static HRESULT WINAPI d3dx_effect_SetIntArray(ID3DXEffect *iface, D3DXHANDLE par static HRESULT WINAPI d3dx_effect_GetIntArray(ID3DXEffect *iface, D3DXHANDLE parameter, INT *n, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, n %p, count %u.\n", iface, parameter, n, count); - return d3dx9_base_effect_get_int_array(&effect->base_effect, parameter, n, count); + if (n && 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(&n[i], D3DXPT_INT, (DWORD *)param->data + i, param->type); + return D3D_OK; + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_SetFloat(ID3DXEffect *iface, D3DXHANDLE parameter, float f) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index d5bc7239345..73097766d95 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: 5015e2a7cf5fa3779fd651817058e03c94807088} +tags: {wine: 570ae3b2aa2e7da3f14fbd59979a39e8f21763be}
3 years, 10 months
1
0
0
0
[reactos] 45/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetInt() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=218bc69a383b333001967…
commit 218bc69a383b333001967e6cf283acf7e77d3a55 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_GetInt() 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 5015e2a7cf5fa3779fd651817058e03c94807088 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 69 +++++++++++++++++--------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 31 insertions(+), 40 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 9e059dae34b..3f95dcc00be 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1392,44 +1392,6 @@ static HRESULT d3dx9_base_effect_set_int(struct d3dx9_base_effect *base, D3DXHAN return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_get_int(struct d3dx9_base_effect *base, D3DXHANDLE parameter, INT *n) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (n && param && !param->element_count) - { - if (param->columns == 1 && param->rows == 1) - { - set_number(n, D3DXPT_INT, param->data, param->type); - TRACE("Returning %i\n", *n); - return D3D_OK; - } - - if (param->type == D3DXPT_FLOAT && - ((param->class == D3DXPC_VECTOR && param->columns != 2) - || (param->class == D3DXPC_MATRIX_ROWS && param->rows != 2 && param->columns == 1))) - { - TRACE("Vector fixup\n"); - - /* all components (3,4) are clamped (0,255) and put in the INT */ - *n = (INT)(min(max(0.0f, *((FLOAT *)param->data + 2)), 1.0f) * INT_FLOAT_MULTI); - *n += ((INT)(min(max(0.0f, *((FLOAT *)param->data + 1)), 1.0f) * INT_FLOAT_MULTI)) << 8; - *n += ((INT)(min(max(0.0f, *((FLOAT *)param->data + 0)), 1.0f) * INT_FLOAT_MULTI)) << 16; - if (param->columns * param->rows > 3) - { - *n += ((INT)(min(max(0.0f, *((FLOAT *)param->data + 3)), 1.0f) * INT_FLOAT_MULTI)) << 24; - } - - TRACE("Returning %i\n", *n); - return D3D_OK; - } - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_int_array(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const INT *n, UINT count) { @@ -3426,10 +3388,39 @@ static HRESULT WINAPI d3dx_effect_SetInt(ID3DXEffect *iface, D3DXHANDLE paramete static HRESULT WINAPI d3dx_effect_GetInt(ID3DXEffect *iface, D3DXHANDLE parameter, INT *n) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, n %p.\n", iface, parameter, n); - return d3dx9_base_effect_get_int(&effect->base_effect, parameter, n); + if (n && param && !param->element_count) + { + if (param->columns == 1 && param->rows == 1) + { + set_number(n, D3DXPT_INT, param->data, param->type); + TRACE("Returning %d.\n", *n); + return D3D_OK; + } + + if (param->type == D3DXPT_FLOAT && + ((param->class == D3DXPC_VECTOR && param->columns != 2) + || (param->class == D3DXPC_MATRIX_ROWS && param->rows != 2 && param->columns == 1))) + { + TRACE("Vector fixup.\n"); + + *n = min(max(0.0f, *((float *)param->data + 2)), 1.0f) * INT_FLOAT_MULTI; + *n += ((int)(min(max(0.0f, *((float *)param->data + 1)), 1.0f) * INT_FLOAT_MULTI)) << 8; + *n += ((int)(min(max(0.0f, *((float *)param->data + 0)), 1.0f) * INT_FLOAT_MULTI)) << 16; + if (param->columns * param->rows > 3) + *n += ((int)(min(max(0.0f, *((float *)param->data + 3)), 1.0f) * INT_FLOAT_MULTI)) << 24; + + TRACE("Returning %d.\n", *n); + return D3D_OK; + } + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_SetIntArray(ID3DXEffect *iface, D3DXHANDLE parameter, const INT *n, UINT count) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index b764b546473..d5bc7239345 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: 86dff681fc6c36a77b84ec7ded4dfc3f889e2882} +tags: {wine: 5015e2a7cf5fa3779fd651817058e03c94807088}
3 years, 10 months
1
0
0
0
[reactos] 44/218: [WINESYNC] d3dx9: Merge the d3dx_effect_SetFloatArray() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b1ee53bf49ca41d13f2bf…
commit b1ee53bf49ca41d13f2bf50f70cd17e108ff8585 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_SetFloatArray() 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 86dff681fc6c36a77b84ec7ded4dfc3f889e2882 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 69 +++++++++++++++++--------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 31 insertions(+), 40 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 1b4698281b6..9e059dae34b 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1492,44 +1492,6 @@ static HRESULT d3dx9_base_effect_get_int_array(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_set_float_array(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, const float *f, UINT count) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (param) - { - UINT i, size = min(count, param->bytes / sizeof(DWORD)); - - TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); - - switch (param->class) - { - case D3DXPC_SCALAR: - case D3DXPC_VECTOR: - case D3DXPC_MATRIX_ROWS: - for (i = 0; i < size; ++i) - { - set_number((DWORD *)param->data + i, param->type, &f[i], D3DXPT_FLOAT); - } - set_dirty(param); - return D3D_OK; - - case D3DXPC_OBJECT: - case D3DXPC_STRUCT: - break; - - default: - FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); - break; - } - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_vector(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXVECTOR4 *vector) { @@ -3534,10 +3496,39 @@ static HRESULT WINAPI d3dx_effect_SetFloatArray(ID3DXEffect *iface, D3DXHANDLE p const float *f, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, f %p, count %u.\n", iface, parameter, f, count); - return d3dx9_base_effect_set_float_array(&effect->base_effect, parameter, f, count); + if (param) + { + unsigned int i, size = min(count, param->bytes / sizeof(DWORD)); + + TRACE("Class %s.\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < size; ++i) + set_number((DWORD *)param->data + i, param->type, &f[i], D3DXPT_FLOAT); + set_dirty(param); + return D3D_OK; + + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s.\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_GetFloatArray(ID3DXEffect *iface, D3DXHANDLE parameter, float *f, UINT count) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index dc3af1b9a09..b764b546473 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: 2543e78b828f842813066827b5b2fb4565a51f7e} +tags: {wine: 86dff681fc6c36a77b84ec7ded4dfc3f889e2882}
3 years, 10 months
1
0
0
0
[reactos] 43/218: [WINESYNC] d3dx9: Merge the d3dx_effect_SetFloat() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b6b435e16c6188b012737…
commit b6b435e16c6188b012737519efe6a37104d4333e 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_SetFloat() 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 2543e78b828f842813066827b5b2fb4565a51f7e by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 36 +++++++++++++++--------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 8b55c0f5ea5..1b4698281b6 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1492,26 +1492,6 @@ static HRESULT d3dx9_base_effect_get_int_array(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_set_float(struct d3dx9_base_effect *base, D3DXHANDLE parameter, float f) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (param && !param->element_count && param->rows == 1 && param->columns == 1) - { - DWORD value; - - set_number(&value, param->type, &f, D3DXPT_FLOAT); - if (value != *(DWORD *)param->data) - set_dirty(param); - *(DWORD *)param->data = value; - return D3D_OK; - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_float_array(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const float *f, UINT count) { @@ -3511,10 +3491,24 @@ static HRESULT WINAPI d3dx_effect_GetIntArray(ID3DXEffect *iface, D3DXHANDLE par static HRESULT WINAPI d3dx_effect_SetFloat(ID3DXEffect *iface, D3DXHANDLE parameter, float f) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, f %.8e.\n", iface, parameter, f); - return d3dx9_base_effect_set_float(&effect->base_effect, parameter, f); + if (param && !param->element_count && param->rows == 1 && param->columns == 1) + { + DWORD value; + + set_number(&value, param->type, &f, D3DXPT_FLOAT); + if (value != *(DWORD *)param->data) + set_dirty(param); + *(DWORD *)param->data = value; + return D3D_OK; + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_GetFloat(ID3DXEffect *iface, D3DXHANDLE parameter, float *f) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index ce93efbcc4e..dc3af1b9a09 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: cf4c22bd712594f3589070c493fc550770ebc899} +tags: {wine: 2543e78b828f842813066827b5b2fb4565a51f7e}
3 years, 10 months
1
0
0
0
[reactos] 42/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetFloatArray() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0e01a120344dfc3b7559a…
commit 0e01a120344dfc3b7559aee5f7f74ce47443e1da 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_GetFloatArray() 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 cf4c22bd712594f3589070c493fc550770ebc899 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 41 +++++++++++++++----------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index e2ba9bd5aef..8b55c0f5ea5 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1550,30 +1550,6 @@ static HRESULT d3dx9_base_effect_set_float_array(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_get_float_array(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, float *f, UINT count) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (f && 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(&f[i], D3DXPT_FLOAT, (DWORD *)param->data + i, param->type); - } - return D3D_OK; - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_vector(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXVECTOR4 *vector) { @@ -3573,10 +3549,25 @@ static HRESULT WINAPI d3dx_effect_SetFloatArray(ID3DXEffect *iface, D3DXHANDLE p static HRESULT WINAPI d3dx_effect_GetFloatArray(ID3DXEffect *iface, D3DXHANDLE parameter, float *f, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, f %p, count %u.\n", iface, parameter, f, count); - return d3dx9_base_effect_get_float_array(&effect->base_effect, parameter, f, count); + if (f && 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(&f[i], D3DXPT_FLOAT, (DWORD *)param->data + i, param->type); + return D3D_OK; + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_SetVector(ID3DXEffect *iface, D3DXHANDLE parameter, const D3DXVECTOR4 *vector) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 62c730723f7..ce93efbcc4e 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: 460fd21ccc6785172167553e6dd124fdec020d11} +tags: {wine: cf4c22bd712594f3589070c493fc550770ebc899}
3 years, 10 months
1
0
0
0
[reactos] 41/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetFloat() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6450fd6db321529ca06db…
commit 6450fd6db321529ca06db476e0997dcc1baf0dff 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_GetFloat() 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 460fd21ccc6785172167553e6dd124fdec020d11 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 3c75ba8f4ed..e2ba9bd5aef 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1512,22 +1512,6 @@ static HRESULT d3dx9_base_effect_set_float(struct d3dx9_base_effect *base, D3DXH return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_get_float(struct d3dx9_base_effect *base, D3DXHANDLE parameter, float *f) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (f && param && !param->element_count && param->columns == 1 && param->rows == 1) - { - set_number(f, D3DXPT_FLOAT, (DWORD *)param->data, param->type); - TRACE("Returning %f\n", *f); - return D3D_OK; - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_float_array(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const float *f, UINT count) { @@ -3560,10 +3544,20 @@ static HRESULT WINAPI d3dx_effect_SetFloat(ID3DXEffect *iface, D3DXHANDLE parame static HRESULT WINAPI d3dx_effect_GetFloat(ID3DXEffect *iface, D3DXHANDLE parameter, float *f) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, f %p.\n", iface, parameter, f); - return d3dx9_base_effect_get_float(&effect->base_effect, parameter, f); + if (f && param && !param->element_count && param->columns == 1 && param->rows == 1) + { + set_number(f, D3DXPT_FLOAT, (DWORD *)param->data, param->type); + TRACE("Returning %f.\n", *f); + return D3D_OK; + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_SetFloatArray(ID3DXEffect *iface, D3DXHANDLE parameter, diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 0ee4910590b..62c730723f7 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: e435a1442d6499f358168d8a0ca974b43ccd9140} +tags: {wine: 460fd21ccc6785172167553e6dd124fdec020d11}
3 years, 10 months
1
0
0
0
[reactos] 40/218: [WINESYNC] d3dx9: Merge the d3dx_effect_SetBoolArray() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ab91d0f28e2a7c066ca2b…
commit ab91d0f28e2a7c066ca2b80deba49d8ab8d25079 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_SetBoolArray() 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 e435a1442d6499f358168d8a0ca974b43ccd9140 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 73 +++++++++++++++++--------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 34 insertions(+), 41 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index a131e3d3269..3c75ba8f4ed 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1349,45 +1349,6 @@ static HRESULT d3dx9_base_effect_get_value(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_set_bool_array(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, const BOOL *b, UINT count) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (param) - { - UINT i, size = min(count, param->bytes / sizeof(DWORD)); - - TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); - - switch (param->class) - { - case D3DXPC_SCALAR: - case D3DXPC_VECTOR: - case D3DXPC_MATRIX_ROWS: - for (i = 0; i < size; ++i) - { - /* don't crop the input, use D3DXPT_INT instead of D3DXPT_BOOL */ - set_number((DWORD *)param->data + i, param->type, &b[i], D3DXPT_INT); - } - set_dirty(param); - return D3D_OK; - - case D3DXPC_OBJECT: - case D3DXPC_STRUCT: - break; - - default: - FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); - break; - } - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_int(struct d3dx9_base_effect *base, D3DXHANDLE parameter, INT n) { struct d3dx_parameter *param = get_valid_parameter(base, parameter); @@ -3487,10 +3448,42 @@ static HRESULT WINAPI d3dx_effect_GetBool(ID3DXEffect *iface, D3DXHANDLE paramet static HRESULT WINAPI d3dx_effect_SetBoolArray(ID3DXEffect *iface, D3DXHANDLE parameter, const BOOL *b, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, b %p, count %u.\n", iface, parameter, b, count); - return d3dx9_base_effect_set_bool_array(&effect->base_effect, parameter, b, count); + if (param) + { + unsigned int i, size = min(count, param->bytes / sizeof(DWORD)); + + TRACE("Class %s.\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < size; ++i) + { + /* don't crop the input, use D3DXPT_INT instead of D3DXPT_BOOL */ + set_number((DWORD *)param->data + i, param->type, &b[i], D3DXPT_INT); + } + set_dirty(param); + return D3D_OK; + + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s.\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_GetBoolArray(ID3DXEffect *iface, D3DXHANDLE parameter, BOOL *b, UINT count) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 32e79554d16..0ee4910590b 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: b4bc9ea7b711c03b93d15bb2ba04dfbbb9d70f72} +tags: {wine: e435a1442d6499f358168d8a0ca974b43ccd9140}
3 years, 10 months
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
...
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