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] 69/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetVector() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=17776bdd0f23b3a70f160…
commit 17776bdd0f23b3a70f160a7050af6d6b7b4cecdd Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:28 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:03 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_GetVector() 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 3754ba683f2d3ccb16354a75b530c317382929d8 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 77 +++++++++++++++++--------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 36 insertions(+), 43 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 0ed8a066bef..7e0a195ec31 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1233,47 +1233,6 @@ static HRESULT d3dx9_base_effect_set_vector(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_get_vector(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, D3DXVECTOR4 *vector) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (vector && param && !param->element_count) - { - TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); - - switch (param->class) - { - case D3DXPC_SCALAR: - case D3DXPC_VECTOR: - if (param->type == D3DXPT_INT && param->bytes == 4) - { - TRACE("INT fixup\n"); - vector->x = (((*(INT *)param->data) & 0xff0000) >> 16) * INT_FLOAT_MULTI_INVERSE; - vector->y = (((*(INT *)param->data) & 0xff00) >> 8) * INT_FLOAT_MULTI_INVERSE; - vector->z = ((*(INT *)param->data) & 0xff) * INT_FLOAT_MULTI_INVERSE; - vector->w = (((*(INT *)param->data) & 0xff000000) >> 24) * INT_FLOAT_MULTI_INVERSE; - return D3D_OK; - } - get_vector(param, vector); - return D3D_OK; - - case D3DXPC_MATRIX_ROWS: - case D3DXPC_OBJECT: - case D3DXPC_STRUCT: - break; - - default: - FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); - break; - } - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_vector_array(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) { @@ -2970,10 +2929,44 @@ static HRESULT WINAPI d3dx_effect_SetVector(ID3DXEffect *iface, D3DXHANDLE param static HRESULT WINAPI d3dx_effect_GetVector(ID3DXEffect *iface, D3DXHANDLE parameter, D3DXVECTOR4 *vector) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, vector %p.\n", iface, parameter, vector); - return d3dx9_base_effect_get_vector(&effect->base_effect, parameter, vector); + if (vector && param && !param->element_count) + { + TRACE("Class %s.\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + if (param->type == D3DXPT_INT && param->bytes == 4) + { + TRACE("INT fixup.\n"); + vector->x = (((*(int *)param->data) & 0xff0000) >> 16) * INT_FLOAT_MULTI_INVERSE; + vector->y = (((*(int *)param->data) & 0xff00) >> 8) * INT_FLOAT_MULTI_INVERSE; + vector->z = ((*(int *)param->data) & 0xff) * INT_FLOAT_MULTI_INVERSE; + vector->w = (((*(int *)param->data) & 0xff000000) >> 24) * INT_FLOAT_MULTI_INVERSE; + return D3D_OK; + } + get_vector(param, vector); + return D3D_OK; + + case D3DXPC_MATRIX_ROWS: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s.\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_SetVectorArray(ID3DXEffect *iface, D3DXHANDLE parameter, diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index aa8a2c36cbd..622efe37f26 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: bd731f6dd12d1e61daf3d6abefb3e01be35f5104} +tags: {wine: 3754ba683f2d3ccb16354a75b530c317382929d8}
3 years, 10 months
1
0
0
0
[reactos] 68/218: [WINESYNC] d3dx9: Merge the d3dx_effect_SetValue() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a64947697d62c2fd43ada…
commit a64947697d62c2fd43ada1f2aa55d01dab9446ad Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:28 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_SetValue() 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 bd731f6dd12d1e61daf3d6abefb3e01be35f5104 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 145 +++++++++++++++++-------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 68 insertions(+), 79 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 2bae2567624..0ed8a066bef 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1181,83 +1181,6 @@ static HRESULT set_string(char **param_data, const char *string) return D3D_OK; } -static HRESULT d3dx9_base_effect_set_value(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, const void *data, UINT bytes) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - unsigned int i; - - if (!param) - { - WARN("Invalid parameter %p specified\n", parameter); - return D3DERR_INVALIDCALL; - } - - /* samplers don't touch data */ - if (param->class == D3DXPC_OBJECT && is_param_type_sampler(param->type)) - { - TRACE("Sampler: returning E_FAIL\n"); - return E_FAIL; - } - - if (data && param->bytes <= bytes) - { - switch (param->type) - { - case D3DXPT_TEXTURE: - case D3DXPT_TEXTURE1D: - case D3DXPT_TEXTURE2D: - case D3DXPT_TEXTURE3D: - case D3DXPT_TEXTURECUBE: - for (i = 0; i < (param->element_count ? param->element_count : 1); ++i) - { - IUnknown *old_texture = ((IUnknown **)param->data)[i]; - IUnknown *new_texture = ((IUnknown **)data)[i]; - - if (new_texture == old_texture) - continue; - - if (new_texture) - IUnknown_AddRef(new_texture); - if (old_texture) - IUnknown_Release(old_texture); - } - /* fallthrough */ - case D3DXPT_VOID: - case D3DXPT_BOOL: - case D3DXPT_INT: - case D3DXPT_FLOAT: - TRACE("Copy %u bytes.\n", param->bytes); - memcpy(param->data, data, param->bytes); - set_dirty(param); - break; - - case D3DXPT_STRING: - { - HRESULT hr; - - set_dirty(param); - for (i = 0; i < (param->element_count ? param->element_count : 1); ++i) - { - if (FAILED(hr = set_string(&((char **)param->data)[i], ((const char **)data)[i]))) - return hr; - } - break; - } - - default: - FIXME("Unhandled type %s.\n", debug_d3dxparameter_type(param->type)); - break; - } - - return D3D_OK; - } - - WARN("Invalid argument specified\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_vector(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const D3DXVECTOR4 *vector) { @@ -2546,10 +2469,76 @@ static HRESULT WINAPI d3dx_effect_SetValue(ID3DXEffect *iface, D3DXHANDLE parame const void *data, UINT bytes) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); + unsigned int i; TRACE("iface %p, parameter %p, data %p, bytes %u.\n", iface, parameter, data, bytes); - return d3dx9_base_effect_set_value(&effect->base_effect, parameter, data, bytes); + if (!param) + { + WARN("Invalid parameter %p specified.\n", parameter); + return D3DERR_INVALIDCALL; + } + if (param->class == D3DXPC_OBJECT && is_param_type_sampler(param->type)) + { + WARN("Parameter is a sampler, returning E_FAIL.\n"); + return E_FAIL; + } + + if (data && param->bytes <= bytes) + { + switch (param->type) + { + case D3DXPT_TEXTURE: + case D3DXPT_TEXTURE1D: + case D3DXPT_TEXTURE2D: + case D3DXPT_TEXTURE3D: + case D3DXPT_TEXTURECUBE: + for (i = 0; i < (param->element_count ? param->element_count : 1); ++i) + { + IUnknown *old_texture = ((IUnknown **)param->data)[i]; + IUnknown *new_texture = ((IUnknown **)data)[i]; + + if (new_texture == old_texture) + continue; + + if (new_texture) + IUnknown_AddRef(new_texture); + if (old_texture) + IUnknown_Release(old_texture); + } + /* fallthrough */ + case D3DXPT_VOID: + case D3DXPT_BOOL: + case D3DXPT_INT: + case D3DXPT_FLOAT: + TRACE("Copy %u bytes.\n", param->bytes); + memcpy(param->data, data, param->bytes); + set_dirty(param); + break; + + case D3DXPT_STRING: + { + HRESULT hr; + + set_dirty(param); + for (i = 0; i < (param->element_count ? param->element_count : 1); ++i) + if (FAILED(hr = set_string(&((char **)param->data)[i], ((const char **)data)[i]))) + return hr; + break; + } + + default: + FIXME("Unhandled type %s.\n", debug_d3dxparameter_type(param->type)); + break; + } + + return D3D_OK; + } + + WARN("Invalid argument specified.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_GetValue(ID3DXEffect *iface, D3DXHANDLE parameter, void *data, UINT bytes) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index a0dd3358da4..aa8a2c36cbd 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: d4e39ee1d8a263d91bc291cacfe8938f81d447fc} +tags: {wine: bd731f6dd12d1e61daf3d6abefb3e01be35f5104}
3 years, 10 months
1
0
0
0
[reactos] 67/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetValue() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fce46567f7727d9f16a75…
commit fce46567f7727d9f16a7567eeebb0107ff821f97 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:28 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_GetValue() 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 d4e39ee1d8a263d91bc291cacfe8938f81d447fc by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 122 +++++++++++++++++-------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 58 insertions(+), 66 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 659ee6d897d..2bae2567624 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1258,70 +1258,6 @@ static HRESULT d3dx9_base_effect_set_value(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_get_value(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, void *data, UINT bytes) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (!param) - { - WARN("Invalid parameter %p specified\n", parameter); - return D3DERR_INVALIDCALL; - } - - /* samplers don't touch data */ - if (param->class == D3DXPC_OBJECT && is_param_type_sampler(param->type)) - { - TRACE("Sampler: returning E_FAIL\n"); - return E_FAIL; - } - - if (data && param->bytes <= bytes) - { - TRACE("Type %s\n", debug_d3dxparameter_type(param->type)); - - switch (param->type) - { - case D3DXPT_VOID: - case D3DXPT_BOOL: - case D3DXPT_INT: - case D3DXPT_FLOAT: - case D3DXPT_STRING: - break; - - case D3DXPT_VERTEXSHADER: - case D3DXPT_PIXELSHADER: - case D3DXPT_TEXTURE: - case D3DXPT_TEXTURE1D: - case D3DXPT_TEXTURE2D: - case D3DXPT_TEXTURE3D: - case D3DXPT_TEXTURECUBE: - { - UINT i; - - for (i = 0; i < (param->element_count ? param->element_count : 1); ++i) - { - IUnknown *unk = ((IUnknown **)param->data)[i]; - if (unk) IUnknown_AddRef(unk); - } - break; - } - - default: - FIXME("Unhandled type %s\n", debug_d3dxparameter_type(param->type)); - break; - } - - TRACE("Copy %u bytes\n", param->bytes); - memcpy(data, param->data, param->bytes); - 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) { @@ -2619,10 +2555,66 @@ static HRESULT WINAPI d3dx_effect_SetValue(ID3DXEffect *iface, D3DXHANDLE parame static HRESULT WINAPI d3dx_effect_GetValue(ID3DXEffect *iface, D3DXHANDLE parameter, void *data, UINT bytes) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, data %p, bytes %u.\n", iface, parameter, data, bytes); - return d3dx9_base_effect_get_value(&effect->base_effect, parameter, data, bytes); + if (!param) + { + WARN("Invalid parameter %p specified.\n", parameter); + return D3DERR_INVALIDCALL; + } + if (param->class == D3DXPC_OBJECT && is_param_type_sampler(param->type)) + { + WARN("Parameter is a sampler, returning E_FAIL.\n"); + return E_FAIL; + } + + if (data && param->bytes <= bytes) + { + TRACE("Type %s.\n", debug_d3dxparameter_type(param->type)); + + switch (param->type) + { + case D3DXPT_VOID: + case D3DXPT_BOOL: + case D3DXPT_INT: + case D3DXPT_FLOAT: + case D3DXPT_STRING: + break; + + case D3DXPT_VERTEXSHADER: + case D3DXPT_PIXELSHADER: + case D3DXPT_TEXTURE: + case D3DXPT_TEXTURE1D: + case D3DXPT_TEXTURE2D: + case D3DXPT_TEXTURE3D: + case D3DXPT_TEXTURECUBE: + { + unsigned int i; + + for (i = 0; i < (param->element_count ? param->element_count : 1); ++i) + { + IUnknown *unk = ((IUnknown **)param->data)[i]; + if (unk) + IUnknown_AddRef(unk); + } + break; + } + + default: + FIXME("Unhandled type %s.\n", debug_d3dxparameter_type(param->type)); + break; + } + + TRACE("Copy %u bytes.\n", param->bytes); + memcpy(data, param->data, param->bytes); + return D3D_OK; + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_SetBool(ID3DXEffect *iface, D3DXHANDLE parameter, BOOL b) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 44914e67fbf..a0dd3358da4 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: 918c13f48cab2fe9391148ae4281015c0e169378} +tags: {wine: d4e39ee1d8a263d91bc291cacfe8938f81d447fc}
3 years, 10 months
1
0
0
0
[reactos] 66/218: [WINESYNC] d3dx9: Merge the d3dx_effect_SetTexture() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e8b87e379902b934ace48…
commit e8b87e379902b934ace48c66fed37d9492bd770f Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:28 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_SetTexture() 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 918c13f48cab2fe9391148ae4281015c0e169378 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 59 +++++++++++++++++--------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 28 insertions(+), 33 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index ed7fedffb0c..659ee6d897d 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1503,35 +1503,6 @@ static HRESULT d3dx9_base_effect_get_vector_array(struct d3dx9_base_effect *base return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_set_texture(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (param && !param->element_count && - (param->type == D3DXPT_TEXTURE || param->type == D3DXPT_TEXTURE1D - || param->type == D3DXPT_TEXTURE2D || param->type == D3DXPT_TEXTURE3D - || param->type == D3DXPT_TEXTURECUBE)) - { - struct IDirect3DBaseTexture9 *oltexture = *(struct IDirect3DBaseTexture9 **)param->data; - - if (texture == oltexture) - return D3D_OK; - - if (texture) IDirect3DBaseTexture9_AddRef(texture); - if (oltexture) IDirect3DBaseTexture9_Release(oltexture); - - *(struct IDirect3DBaseTexture9 **)param->data = texture; - set_dirty(param); - - return D3D_OK; - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_get_vertex_shader(struct d3dx9_base_effect *base, D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) { @@ -3536,14 +3507,38 @@ static HRESULT WINAPI d3dx_effect_GetString(ID3DXEffect *iface, D3DXHANDLE param return D3DERR_INVALIDCALL; } -static HRESULT WINAPI d3dx_effect_SetTexture(struct ID3DXEffect *iface, D3DXHANDLE parameter, - struct IDirect3DBaseTexture9 *texture) +static HRESULT WINAPI d3dx_effect_SetTexture(ID3DXEffect *iface, D3DXHANDLE parameter, + IDirect3DBaseTexture9 *texture) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, texture %p.\n", iface, parameter, texture); - return d3dx9_base_effect_set_texture(&effect->base_effect, parameter, texture); + if (param && !param->element_count + && (param->type == D3DXPT_TEXTURE || param->type == D3DXPT_TEXTURE1D + || param->type == D3DXPT_TEXTURE2D || param->type == D3DXPT_TEXTURE3D + || param->type == D3DXPT_TEXTURECUBE)) + { + IDirect3DBaseTexture9 *old_texture = *(IDirect3DBaseTexture9 **)param->data; + + if (texture == old_texture) + return D3D_OK; + + if (texture) + IDirect3DBaseTexture9_AddRef(texture); + if (old_texture) + IDirect3DBaseTexture9_Release(old_texture); + + *(IDirect3DBaseTexture9 **)param->data = texture; + set_dirty(param); + + return D3D_OK; + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_GetTexture(ID3DXEffect *iface, D3DXHANDLE parameter, diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 8127b808afc..44914e67fbf 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: f06d6ab0858db398576e36bf295be581952d6209} +tags: {wine: 918c13f48cab2fe9391148ae4281015c0e169378}
3 years, 10 months
1
0
0
0
[reactos] 65/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetTexture() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=13e4a0575408e928de667…
commit 13e4a0575408e928de6673f39a9a79fb248f6968 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:28 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_GetTexture() 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 f06d6ab0858db398576e36bf295be581952d6209 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 42 ++++++++++++++++---------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index e6363cef6b8..ed7fedffb0c 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1532,27 +1532,6 @@ static HRESULT d3dx9_base_effect_set_texture(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_get_texture(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (texture && param && !param->element_count && - (param->type == D3DXPT_TEXTURE || param->type == D3DXPT_TEXTURE1D - || param->type == D3DXPT_TEXTURE2D || param->type == D3DXPT_TEXTURE3D - || param->type == D3DXPT_TEXTURECUBE)) - { - *texture = *(struct IDirect3DBaseTexture9 **)param->data; - if (*texture) IDirect3DBaseTexture9_AddRef(*texture); - TRACE("Returning %p\n", *texture); - return D3D_OK; - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_get_vertex_shader(struct d3dx9_base_effect *base, D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) { @@ -3567,14 +3546,29 @@ static HRESULT WINAPI d3dx_effect_SetTexture(struct ID3DXEffect *iface, D3DXHAND return d3dx9_base_effect_set_texture(&effect->base_effect, parameter, texture); } -static HRESULT WINAPI d3dx_effect_GetTexture(struct ID3DXEffect *iface, D3DXHANDLE parameter, - struct IDirect3DBaseTexture9 **texture) +static HRESULT WINAPI d3dx_effect_GetTexture(ID3DXEffect *iface, D3DXHANDLE parameter, + IDirect3DBaseTexture9 **texture) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, texture %p.\n", iface, parameter, texture); - return d3dx9_base_effect_get_texture(&effect->base_effect, parameter, texture); + if (texture && param && !param->element_count + && (param->type == D3DXPT_TEXTURE || param->type == D3DXPT_TEXTURE1D + || param->type == D3DXPT_TEXTURE2D || param->type == D3DXPT_TEXTURE3D + || param->type == D3DXPT_TEXTURECUBE)) + { + *texture = *(IDirect3DBaseTexture9 **)param->data; + if (*texture) + IDirect3DBaseTexture9_AddRef(*texture); + TRACE("Returning %p.\n", *texture); + return D3D_OK; + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_GetPixelShader(ID3DXEffect *iface, D3DXHANDLE parameter, diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 1e65387fae8..8127b808afc 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: e288158dec12f4f55aea01fb1e2879c6e9a18028} +tags: {wine: f06d6ab0858db398576e36bf295be581952d6209}
3 years, 10 months
1
0
0
0
[reactos] 64/218: [WINESYNC] d3dx9: Merge the d3dx_effect_SetString() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=598c2e03b21b2b7bd313c…
commit 598c2e03b21b2b7bd313cde5456fa081d7ba507b Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:28 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_SetString() 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 e288158dec12f4f55aea01fb1e2879c6e9a18028 by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 27 ++++++++++----------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 4b826495e3e..e6363cef6b8 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1503,22 +1503,6 @@ static HRESULT d3dx9_base_effect_get_vector_array(struct d3dx9_base_effect *base return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_set_string(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, const char *string) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (param && param->type == D3DXPT_STRING) - { - set_dirty(param); - return set_string(param->data, string); - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_texture(struct d3dx9_base_effect *base, D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) { @@ -3539,10 +3523,19 @@ static HRESULT WINAPI d3dx_effect_GetMatrixTransposePointerArray(ID3DXEffect *if static HRESULT WINAPI d3dx_effect_SetString(ID3DXEffect *iface, D3DXHANDLE parameter, const char *string) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, string %s.\n", iface, parameter, debugstr_a(string)); - return d3dx9_base_effect_set_string(&effect->base_effect, parameter, string); + if (param && param->type == D3DXPT_STRING) + { + set_dirty(param); + return set_string(param->data, string); + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_GetString(ID3DXEffect *iface, D3DXHANDLE parameter, const char **string) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 303f2124531..1e65387fae8 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: ea45ed1751860905daa33af5e45d38cbbeadd0ad} +tags: {wine: e288158dec12f4f55aea01fb1e2879c6e9a18028}
3 years, 10 months
1
0
0
0
[reactos] 63/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetString() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=da7f239a06c9ad71d5e0c…
commit da7f239a06c9ad71d5e0c39028da69bf72667f85 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:28 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_GetString() 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 ea45ed1751860905daa33af5e45d38cbbeadd0ad by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 29 +++++++++++------------------ sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index dedb9a867b8..4b826495e3e 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1519,23 +1519,6 @@ static HRESULT d3dx9_base_effect_set_string(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_get_string(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, const char **string) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (string && param && !param->element_count && param->type == D3DXPT_STRING) - { - *string = *(const char **)param->data; - TRACE("Returning %s.\n", debugstr_a(*string)); - return D3D_OK; - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_set_texture(struct d3dx9_base_effect *base, D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) { @@ -3565,10 +3548,20 @@ static HRESULT WINAPI d3dx_effect_SetString(ID3DXEffect *iface, D3DXHANDLE param static HRESULT WINAPI d3dx_effect_GetString(ID3DXEffect *iface, D3DXHANDLE parameter, const char **string) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, string %p.\n", iface, parameter, string); - return d3dx9_base_effect_get_string(&effect->base_effect, parameter, string); + if (string && param && !param->element_count && param->type == D3DXPT_STRING) + { + *string = *(const char **)param->data; + TRACE("Returning %s.\n", debugstr_a(*string)); + return D3D_OK; + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_SetTexture(struct ID3DXEffect *iface, D3DXHANDLE parameter, diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 4f4bd100d09..303f2124531 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: 7ce336969ca4f7adba33c45f5f746a8f656348cc} +tags: {wine: ea45ed1751860905daa33af5e45d38cbbeadd0ad}
3 years, 10 months
1
0
0
0
[reactos] 62/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetPixelShader() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6dec26184713cfa927a38…
commit 6dec26184713cfa927a381398f7b2d6fdcb0075b Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:28 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_GetPixelShader() 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 7ce336969ca4f7adba33c45f5f746a8f656348cc by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 33 +++++++++++++-------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index b307c827721..dedb9a867b8 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1586,24 +1586,6 @@ static HRESULT d3dx9_base_effect_get_texture(struct d3dx9_base_effect *base, return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_get_pixel_shader(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (shader && param && !param->element_count && param->type == D3DXPT_PIXELSHADER) - { - if ((*shader = *(struct IDirect3DPixelShader9 **)param->data)) - IDirect3DPixelShader9_AddRef(*shader); - TRACE("Returning %p.\n", *shader); - return D3D_OK; - } - - WARN("Parameter not found.\n"); - - return D3DERR_INVALIDCALL; -} - static HRESULT d3dx9_base_effect_get_vertex_shader(struct d3dx9_base_effect *base, D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) { @@ -3610,13 +3592,24 @@ static HRESULT WINAPI d3dx_effect_GetTexture(struct ID3DXEffect *iface, D3DXHAND } static HRESULT WINAPI d3dx_effect_GetPixelShader(ID3DXEffect *iface, D3DXHANDLE parameter, - struct IDirect3DPixelShader9 **shader) + IDirect3DPixelShader9 **shader) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, shader %p.\n", iface, parameter, shader); - return d3dx9_base_effect_get_pixel_shader(&effect->base_effect, parameter, shader); + if (shader && param && !param->element_count && param->type == D3DXPT_PIXELSHADER) + { + if ((*shader = *(IDirect3DPixelShader9 **)param->data)) + IDirect3DPixelShader9_AddRef(*shader); + TRACE("Returning %p.\n", *shader); + return D3D_OK; + } + + WARN("Parameter not found.\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI d3dx_effect_GetVertexShader(struct ID3DXEffect *iface, D3DXHANDLE parameter, diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 90c9dafb656..4f4bd100d09 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: 262238d46752700c2041cb9548724c66bd017eca} +tags: {wine: 7ce336969ca4f7adba33c45f5f746a8f656348cc}
3 years, 10 months
1
0
0
0
[reactos] 61/218: [WINESYNC] d3dx9: Merge the d3dx_effect_GetParameterDesc() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2a0486d85408f7eccf03e…
commit 2a0486d85408f7eccf03ea004474d812b6de186e Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:28 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_GetParameterDesc() 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 262238d46752700c2041cb9548724c66bd017eca by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 49 ++++++++++++++++---------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 22 insertions(+), 29 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 0237be20e1e..b307c827721 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -993,33 +993,6 @@ static inline DWORD d3dx9_effect_version(DWORD major, DWORD minor) return (0xfeff0000 | ((major) << 8) | (minor)); } -static HRESULT d3dx9_base_effect_get_parameter_desc(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, D3DXPARAMETER_DESC *desc) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (!desc || !param) - { - WARN("Invalid argument specified.\n"); - return D3DERR_INVALIDCALL; - } - - desc->Name = param->name; - desc->Semantic = param->semantic; - desc->Class = param->class; - desc->Type = param->type; - desc->Rows = param->rows; - desc->Columns = param->columns; - desc->Elements = param->element_count; - desc->Annotations = is_top_level_parameter(param) - ? top_level_parameter_from_parameter(param)->annotation_count : 0; - desc->StructMembers = param->member_count; - desc->Flags = param->flags; - desc->Bytes = param->bytes; - - return D3D_OK; -} - static HRESULT d3dx9_get_param_value_ptr(struct d3dx_pass *pass, struct d3dx_state *state, void **param_value, struct d3dx_parameter **out_param, BOOL update_all, BOOL *param_dirty) @@ -2339,10 +2312,30 @@ static HRESULT WINAPI d3dx_effect_GetParameterDesc(ID3DXEffect *iface, D3DXHANDL D3DXPARAMETER_DESC *desc) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, desc %p.\n", iface, parameter, desc); - return d3dx9_base_effect_get_parameter_desc(&effect->base_effect, parameter, desc); + if (!desc || !param) + { + WARN("Invalid argument specified.\n"); + return D3DERR_INVALIDCALL; + } + + desc->Name = param->name; + desc->Semantic = param->semantic; + desc->Class = param->class; + desc->Type = param->type; + desc->Rows = param->rows; + desc->Columns = param->columns; + desc->Elements = param->element_count; + desc->Annotations = is_top_level_parameter(param) + ? top_level_parameter_from_parameter(param)->annotation_count : 0; + desc->StructMembers = param->member_count; + desc->Flags = param->flags; + desc->Bytes = param->bytes; + + return D3D_OK; } static HRESULT WINAPI d3dx_effect_GetTechniqueDesc(ID3DXEffect *iface, D3DXHANDLE technique, diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index f0797fa61fd..90c9dafb656 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: f34f13825fd060fda40f0a5b02dc1b420e3a8e1e} +tags: {wine: 262238d46752700c2041cb9548724c66bd017eca}
3 years, 10 months
1
0
0
0
[reactos] 60/218: [WINESYNC] d3dx9: Merge the d3dx_effect_SetMatrixTransposePointerArray() helper.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6d27669ad39e92eee3e38…
commit 6d27669ad39e92eee3e38cf7e9d5672a951b5d89 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:40:28 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:02 2021 +0100 [WINESYNC] d3dx9: Merge the d3dx_effect_SetMatrixTransposePointerArray() 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 f34f13825fd060fda40f0a5b02dc1b420e3a8e1e by Michael Stefaniuc <mstefani(a)winehq.org> --- dll/directx/wine/d3dx9_36/effect.c | 63 ++++++++++++++++---------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 28 insertions(+), 37 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 9433882623f..0237be20e1e 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -1530,41 +1530,6 @@ static HRESULT d3dx9_base_effect_get_vector_array(struct d3dx9_base_effect *base return D3DERR_INVALIDCALL; } -static HRESULT d3dx9_base_effect_set_matrix_transpose_pointer_array(struct d3dx9_base_effect *base, - D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) -{ - struct d3dx_parameter *param = get_valid_parameter(base, parameter); - - if (param && count <= param->element_count) - { - UINT i; - - switch (param->class) - { - case D3DXPC_MATRIX_ROWS: - set_dirty(param); - for (i = 0; i < count; ++i) - { - set_matrix_transpose(¶m->members[i], matrix[i]); - } - return D3D_OK; - - case D3DXPC_SCALAR: - case D3DXPC_VECTOR: - case D3DXPC_OBJECT: - 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_string(struct d3dx9_base_effect *base, D3DXHANDLE parameter, const char *string) { @@ -3541,10 +3506,36 @@ static HRESULT WINAPI d3dx_effect_SetMatrixTransposePointerArray(ID3DXEffect *if const D3DXMATRIX **matrix, UINT count) { struct d3dx_effect *effect = impl_from_ID3DXEffect(iface); + struct d3dx_parameter *param = get_valid_parameter(&effect->base_effect, parameter); TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); - return d3dx9_base_effect_set_matrix_transpose_pointer_array(&effect->base_effect, parameter, matrix, count); + if (param && count <= param->element_count) + { + unsigned int i; + + switch (param->class) + { + case D3DXPC_MATRIX_ROWS: + set_dirty(param); + for (i = 0; i < count; ++i) + set_matrix_transpose(¶m->members[i], matrix[i]); + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_OBJECT: + 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_GetMatrixTransposePointerArray(ID3DXEffect *iface, D3DXHANDLE parameter, diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 4ae1f71b287..f0797fa61fd 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: 9f1ed4fcdd053647f7e2a7626ab95d0a1e8914eb} +tags: {wine: f34f13825fd060fda40f0a5b02dc1b420e3a8e1e}
3 years, 10 months
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
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