winehq.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
2025
February
January
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2020
----- 2025 -----
February 2025
January 2025
----- 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
692 discussions
Start a n
N
ew thread
Francois Gouget : combase: Fix the trailing linefeed of a TRACE().
by Alexandre Julliard
10 Aug '20
10 Aug '20
Module: wine Branch: master Commit: dc597eb88df35b9a8d963331f08d040f03fb954e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dc597eb88df35b9a8d963331…
Author: Francois Gouget <fgouget(a)free.fr> Date: Mon Aug 10 17:06:36 2020 +0200 combase: Fix the trailing linefeed of a TRACE(). Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/combase/usrmarshal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/combase/usrmarshal.c b/dlls/combase/usrmarshal.c index 8bea32cdd5..48a6c2de4b 100644 --- a/dlls/combase/usrmarshal.c +++ b/dlls/combase/usrmarshal.c @@ -163,7 +163,7 @@ IMPL_WIREM_HANDLE(HWND) */ ULONG __RPC_USER CLIPFORMAT_UserSize(ULONG *pFlags, ULONG size, CLIPFORMAT *pCF) { - TRACE("%s, %u, %p.n", debugstr_user_flags(pFlags), size, pCF); + TRACE("%s, %u, %p\n", debugstr_user_flags(pFlags), size, pCF); ALIGN_LENGTH(size, 3);
1
0
0
0
Paul Gofman : d3dcompiler/tests: Test bound resources' reflection for sm5.1.
by Alexandre Julliard
10 Aug '20
10 Aug '20
Module: wine Branch: master Commit: 2acdde92e8879d1ff0b0fa660d69135151721502 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2acdde92e8879d1ff0b0fa66…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Sat Aug 8 02:19:50 2020 +0300 d3dcompiler/tests: Test bound resources' reflection for sm5.1. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/tests/reflection.c | 123 +++++++++++++++++++++++++++++---- 1 file changed, 109 insertions(+), 14 deletions(-) diff --git a/dlls/d3dcompiler_43/tests/reflection.c b/dlls/d3dcompiler_43/tests/reflection.c index aa691ff762..617003a97b 100644 --- a/dlls/d3dcompiler_43/tests/reflection.c +++ b/dlls/d3dcompiler_43/tests/reflection.c @@ -1064,7 +1064,8 @@ float4 PS(float2 uv : TEXCOORD0) : sv_target return q; } #endif -static DWORD test_reflection_bound_resources_blob[] = { +static const DWORD test_reflection_bound_resources_blob[] = +{ 0x43425844, 0xe4af0279, 0x690268fc, 0x76bf6a72, 0xe5aff43b, 0x00000001, 0x000003f4, 0x00000005, 0x00000034, 0x000001e8, 0x0000021c, 0x00000250, 0x00000378, 0x46454452, 0x000001ac, 0x00000002, 0x000000ac, 0x00000004, 0x0000001c, 0xffff0400, 0x00000100, 0x0000017a, 0x0000009c, 0x00000003, @@ -1107,19 +1108,26 @@ static const D3D11_SHADER_INPUT_BIND_DESC test_reflection_bound_resources_result {"c2", D3D_SIT_CBUFFER, 1, 1, 0, 0, D3D_SRV_DIMENSION_UNKNOWN, 0}, }; -static void test_reflection_bound_resources(void) +static void test_reflection_bound_resources(const DWORD *blob, const D3D11_SHADER_INPUT_BIND_DESC *result, + unsigned int result_count, unsigned int target_version) { - HRESULT hr; - ULONG count; - ID3D11ShaderReflection *ref11; - D3D11_SHADER_INPUT_BIND_DESC desc; const D3D11_SHADER_INPUT_BIND_DESC *pdesc; + D3D11_SHADER_INPUT_BIND_DESC desc; + ID3D11ShaderReflection *ref11; + HRESULT hr, expected_hr; unsigned int i; UINT expected; + ULONG count; - hr = call_reflect(test_reflection_bound_resources_blob, test_reflection_bound_resources_blob[6], - &IID_ID3D11ShaderReflection, (void **)&ref11); - ok(hr == S_OK, "D3DReflect failed %x\n", hr); + hr = call_reflect(blob, blob[6], &IID_ID3D11ShaderReflection, (void **)&ref11); + + expected_hr = D3D_COMPILER_VERSION < 47 && target_version >= 0x501 ? E_INVALIDARG : S_OK; + + /* Older d3dcompiler_47 does not support sm5.1. */ + ok(hr == expected_hr || broken(hr == E_INVALIDARG && target_version >= 0x501), "Got unexpected hr %x.\n", hr); + + if (hr == E_INVALIDARG) + return; /* check invalid cases */ hr = ref11->lpVtbl->GetResourceBindingDesc(ref11, 0, NULL); @@ -1143,9 +1151,9 @@ static void test_reflection_bound_resources(void) #endif /* GetResourceBindingDesc */ - for (i = 0; i < ARRAY_SIZE(test_reflection_bound_resources_result); ++i) + for (i = 0; i < result_count; ++i) { - pdesc = &test_reflection_bound_resources_result[i]; + pdesc = &result[i]; hr = ref11->lpVtbl->GetResourceBindingDesc(ref11, i, &desc); ok(hr == S_OK, "GetResourceBindingDesc(%u) failed, got %x, expected %x\n", i, hr, S_OK); @@ -1176,9 +1184,9 @@ static void test_reflection_bound_resources(void) #if D3D_COMPILER_VERSION /* GetResourceBindingDescByName */ - for (i = 0; i < ARRAY_SIZE(test_reflection_bound_resources_result); ++i) + for (i = 0; i < result_count; ++i) { - pdesc = &test_reflection_bound_resources_result[i]; + pdesc = &result[i]; hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, pdesc->Name, &desc); ok(hr == S_OK, "GetResourceBindingDescByName(%u) failed, got %x, expected %x\n", i, hr, S_OK); @@ -1742,6 +1750,89 @@ static void test_reflection_constant_buffer(void) ok(count == 0, "Release failed %u\n", count); } +/* + * fxc.exe /E PS /Tps_5_1 /Fo + */ +#if 0 +Texture2D tex1 : register(t1, space1); +SamplerState sam +{ + Filter = MIN_MAG_MIP_LINEAR; + AddressU = Wrap; + AddressV = Wrap; +}; +cbuffer c1 : register(b0, space0) +{ + float x; + float y[2]; + int z; +}; +cbuffer c2 : register(b0, space1) +{ + float t; +}; + +float4 PS(float2 uv : TEXCOORD0) : sv_target +{ + float4 q = tex1.Sample(sam, uv); + q.x = q.x + x; + q.w = q.w + y[0] + y[1] + t; + return q; +} +#endif +static const DWORD test_reflection_bound_resources_sm51_blob[] = +{ + 0x43425844, 0x01b901c9, 0xaa053e53, 0x0b6ee9ab, 0x66bcfb8c, 0x00000001, 0x0000051c, 0x00000005, + 0x00000034, 0x000002a4, 0x000002d8, 0x0000030c, 0x00000480, 0x46454452, 0x00000268, 0x00000002, + 0x000000ec, 0x00000004, 0x0000003c, 0xffff0501, 0x00000500, 0x0000023e, 0x25441313, 0x0000003c, + 0x00000018, 0x00000028, 0x00000028, 0x00000024, 0x0000000c, 0x00000000, 0x000000dc, 0x00000003, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, + 0x000000e0, 0x00000002, 0x00000005, 0x00000004, 0xffffffff, 0x00000001, 0x00000001, 0x0000000c, + 0x00000001, 0x00000000, 0x000000e5, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000001, 0x00000000, 0x00000000, 0x000000e8, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x006d6173, 0x31786574, + 0x00316300, 0xab003263, 0x000000e5, 0x00000003, 0x0000011c, 0x00000030, 0x00000000, 0x00000000, + 0x000000e8, 0x00000001, 0x00000214, 0x00000010, 0x00000000, 0x00000000, 0x00000194, 0x00000000, + 0x00000004, 0x00000002, 0x0000019c, 0x00000000, 0xffffffff, 0x00000000, 0xffffffff, 0x00000000, + 0x000001c0, 0x00000010, 0x00000014, 0x00000002, 0x000001c4, 0x00000000, 0xffffffff, 0x00000000, + 0xffffffff, 0x00000000, 0x000001e8, 0x00000024, 0x00000004, 0x00000000, 0x000001f0, 0x00000000, + 0xffffffff, 0x00000000, 0xffffffff, 0x00000000, 0x6c660078, 0x0074616f, 0x00030000, 0x00010001, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000196, 0xabab0079, + 0x00030000, 0x00010001, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000196, 0x6e69007a, 0xabab0074, 0x00020000, 0x00010001, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x000001ea, 0x0000023c, 0x00000000, 0x00000004, 0x00000002, + 0x0000019c, 0x00000000, 0xffffffff, 0x00000000, 0xffffffff, 0x00000000, 0x694d0074, 0x736f7263, + 0x2074666f, 0x20295228, 0x4c534c48, 0x61685320, 0x20726564, 0x706d6f43, 0x72656c69, 0x2e303120, + 0xabab0031, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, + 0x00000003, 0x00000000, 0x00000303, 0x43584554, 0x44524f4f, 0xababab00, 0x4e47534f, 0x0000002c, + 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x0000000f, + 0x745f7673, 0x65677261, 0xabab0074, 0x58454853, 0x0000016c, 0x00000051, 0x0000005b, 0x0100086a, + 0x07000059, 0x00308e46, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x07000059, + 0x00308e46, 0x00000001, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x0600005a, 0x00306e46, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07001858, 0x00307e46, 0x00000000, 0x00000001, + 0x00000001, 0x00005555, 0x00000001, 0x03001062, 0x00101032, 0x00000000, 0x03000065, 0x001020f2, + 0x00000000, 0x02000068, 0x00000001, 0x0b000045, 0x001000f2, 0x00000000, 0x00101046, 0x00000000, + 0x00207e46, 0x00000000, 0x00000001, 0x00206000, 0x00000000, 0x00000000, 0x09000000, 0x00102012, + 0x00000000, 0x0010000a, 0x00000000, 0x0030800a, 0x00000000, 0x00000000, 0x00000000, 0x09000000, + 0x00100012, 0x00000000, 0x0010003a, 0x00000000, 0x0030800a, 0x00000000, 0x00000000, 0x00000001, + 0x09000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0030800a, 0x00000000, 0x00000000, + 0x00000002, 0x09000000, 0x00102082, 0x00000000, 0x0010000a, 0x00000000, 0x0030800a, 0x00000001, + 0x00000000, 0x00000000, 0x05000036, 0x00102062, 0x00000000, 0x00100656, 0x00000000, 0x0100003e, + 0x54415453, 0x00000094, 0x00000007, 0x00000001, 0x00000000, 0x00000002, 0x00000004, 0x00000000, + 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +}; + +static const D3D11_SHADER_INPUT_BIND_DESC test_reflection_bound_resources_sm51_result[] = +{ + {"sam", D3D_SIT_SAMPLER, 0, 1, 0, 0, D3D_SRV_DIMENSION_UNKNOWN, 0}, + {"tex1", D3D_SIT_TEXTURE, 1, 1, 12, D3D_RETURN_TYPE_FLOAT, D3D_SRV_DIMENSION_TEXTURE2D, 0xffffffff}, + {"c1", D3D_SIT_CBUFFER, 0, 1, D3D_SIF_USERPACKED, 0, D3D_SRV_DIMENSION_UNKNOWN, 0}, + {"c2", D3D_SIT_CBUFFER, 0, 1, D3D_SIF_USERPACKED, 0, D3D_SRV_DIMENSION_UNKNOWN, 0}, +}; + static BOOL load_d3dreflect(void) { #if D3D_COMPILER_VERSION == 47 @@ -1774,6 +1865,10 @@ START_TEST(reflection) test_reflection_desc_vs(); test_reflection_desc_ps(); test_reflection_desc_ps_output(); - test_reflection_bound_resources(); + test_reflection_bound_resources(test_reflection_bound_resources_blob, test_reflection_bound_resources_result, + ARRAY_SIZE(test_reflection_bound_resources_result), 0x400); + test_reflection_bound_resources(test_reflection_bound_resources_sm51_blob, + test_reflection_bound_resources_sm51_result, + ARRAY_SIZE(test_reflection_bound_resources_sm51_result), 0x501); test_reflection_constant_buffer(); }
1
0
0
0
Paul Gofman : d3dcompiler: Fail parsing reflection data for sm51 in versions below 47.
by Alexandre Julliard
10 Aug '20
10 Aug '20
Module: wine Branch: master Commit: d95920e8d695c195e8f44545a9ed1762394e8b0f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d95920e8d695c195e8f44545…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Sat Aug 8 02:19:49 2020 +0300 d3dcompiler: Fail parsing reflection data for sm51 in versions below 47. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/reflection.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 4d3d988b2a..729501dbdd 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -1441,6 +1441,14 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c target_version = r->target & D3DCOMPILER_SHADER_TARGET_VERSION_MASK; +#if D3D_COMPILER_VERSION < 47 + if (target_version >= 0x501) + { + WARN("Target version %#x is not supported in d3dcompiler %u.\n", target_version, D3D_COMPILER_VERSION); + return E_INVALIDARG; + } +#endif + read_dword(&ptr, &r->flags); TRACE("Flags: %u\n", r->flags);
1
0
0
0
Paul Gofman : d3dcompiler: Parse register space and range id for sm51 in d3dcompiler_parse_rdef().
by Alexandre Julliard
10 Aug '20
10 Aug '20
Module: wine Branch: master Commit: 85e0a09ccebd53a19d853b665036ce8b7ae14ac4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=85e0a09ccebd53a19d853b66…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Sat Aug 8 02:19:48 2020 +0300 d3dcompiler: Parse register space and range id for sm51 in d3dcompiler_parse_rdef(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/reflection.c | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 7a8af39b07..4d3d988b2a 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -138,7 +138,7 @@ struct d3dcompiler_shader_reflection struct d3dcompiler_shader_signature *osgn; struct d3dcompiler_shader_signature *pcsg; char *resource_string; - D3D11_SHADER_INPUT_BIND_DESC *bound_resources; + D3D12_SHADER_INPUT_BIND_DESC *bound_resources; struct d3dcompiler_shader_reflection_constant_buffer *constant_buffers; struct wine_rb_tree types; }; @@ -476,17 +476,17 @@ static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompil static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindingDesc( ID3D11ShaderReflection *iface, UINT index, D3D11_SHADER_INPUT_BIND_DESC *desc) { - struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D11ShaderReflection(iface); TRACE("iface %p, index %u, desc %p\n", iface, index, desc); - if (!desc || index >= This->bound_resource_count) + if (!desc || index >= reflection->bound_resource_count) { WARN("Invalid argument specified\n"); return E_INVALIDARG; } - *desc = This->bound_resources[index]; + memcpy(desc, &reflection->bound_resources[index], sizeof(*desc)); return S_OK; } @@ -596,12 +596,12 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindin for (i = 0; i < This->bound_resource_count; ++i) { - D3D11_SHADER_INPUT_BIND_DESC *d = &This->bound_resources[i]; + D3D12_SHADER_INPUT_BIND_DESC *d = &This->bound_resources[i]; if (!strcmp(d->Name, name)) { TRACE("Returning D3D11_SHADER_INPUT_BIND_DESC %p.\n", d); - *desc = *d; + memcpy(desc, d, sizeof(*desc)); return S_OK; } } @@ -1412,13 +1412,14 @@ err_out: static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, const char *data, DWORD data_size) { - const char *ptr = data; - DWORD size = data_size >> 2; + struct d3dcompiler_shader_reflection_constant_buffer *constant_buffers = NULL; DWORD offset, cbuffer_offset, resource_offset, creator_offset; unsigned int i, string_data_offset, string_data_size; + D3D12_SHADER_INPUT_BIND_DESC *bound_resources = NULL; char *string_data = NULL, *creator = NULL; - D3D11_SHADER_INPUT_BIND_DESC *bound_resources = NULL; - struct d3dcompiler_shader_reflection_constant_buffer *constant_buffers = NULL; + DWORD size = data_size >> 2; + const char *ptr = data; + DWORD target_version; HRESULT hr; TRACE("Size %u\n", size); @@ -1438,6 +1439,8 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c read_dword(&ptr, &r->target); TRACE("Target: %#x\n", r->target); + target_version = r->target & D3DCOMPILER_SHADER_TARGET_VERSION_MASK; + read_dword(&ptr, &r->flags); TRACE("Flags: %u\n", r->flags); @@ -1452,7 +1455,7 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c TRACE("Creator: %s.\n", debugstr_a(creator)); /* todo: Parse RD11 */ - if ((r->target & D3DCOMPILER_SHADER_TARGET_VERSION_MASK) >= 0x500) + if (target_version >= 0x500) { skip_dword_unknown(&ptr, 8); } @@ -1483,7 +1486,7 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c ptr = data + resource_offset; for (i = 0; i < r->bound_resource_count; i++) { - D3D11_SHADER_INPUT_BIND_DESC *desc = &bound_resources[i]; + D3D12_SHADER_INPUT_BIND_DESC *desc = &bound_resources[i]; read_dword(&ptr, &offset); desc->Name = string_data + (offset - string_data_offset); @@ -1509,6 +1512,19 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c read_dword(&ptr, &desc->uFlags); TRACE("Input bind uFlags: %u\n", desc->uFlags); + + if (target_version >= 0x501) + { + read_dword(&ptr, &desc->Space); + TRACE("Input bind Space %u.\n", desc->Space); + read_dword(&ptr, &desc->uID); + TRACE("Input bind uID %u.\n", desc->uID); + } + else + { + desc->Space = 0; + desc->uID = 0; + } } }
1
0
0
0
Vladimir Panteleev : kernel32/tests: Add more GetEnvironmentVariableA/W tests.
by Alexandre Julliard
10 Aug '20
10 Aug '20
Module: wine Branch: master Commit: 7943a9c8fae46df023b767f088944b5cb3e1d508 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7943a9c8fae46df023b767f0…
Author: Vladimir Panteleev <git(a)vladimir.panteleev.md> Date: Fri Aug 7 23:27:42 2020 +0200 kernel32/tests: Add more GetEnvironmentVariableA/W tests. Signed-off-by: Vladimir Panteleev <git(a)vladimir.panteleev.md> Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/environ.c | 63 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/dlls/kernel32/tests/environ.c b/dlls/kernel32/tests/environ.c index 3c1563a331..1f69594fcd 100644 --- a/dlls/kernel32/tests/environ.c +++ b/dlls/kernel32/tests/environ.c @@ -320,6 +320,68 @@ static void test_GetSetEnvironmentVariableW(void) } } +static void test_GetSetEnvironmentVariableAW(void) +{ + static const WCHAR nameW[] = {0x540D, 0x524D, 0}; + static const char name[] = "\x96\xBC\x91\x4F"; + static const WCHAR valueW[] = {0x5024, 0}; + static const char value[] = "\x92\x6C"; + WCHAR bufW[256]; + char buf[256]; + DWORD ret_size; + BOOL ret; + + if (GetACP() != 932) + { + skip("GetACP() == %d, need 932 for A/W tests\n", GetACP()); + return; + } + + /* Write W, read A */ + ret = SetEnvironmentVariableW(nameW, valueW); + ok(ret == TRUE, "SetEnvironmentVariableW failed, last error %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret_size = GetEnvironmentVariableA(name, NULL, 0); + todo_wine ok(ret_size == lstrlenA(value) + 1, "expected ret_size %d, got %d\n", lstrlenA(value) + 1, ret_size); + ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %d\n", GetLastError()); + + lstrcpyA(buf, "foo"); + SetLastError(0xdeadbeef); + ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value) + 1); + todo_wine ok(lstrcmpA(buf, value) == 0, "expected %s, got %s\n", debugstr_a(value), debugstr_a(buf)); + todo_wine ok(ret_size == lstrlenA(value), "expected ret_size %d, got %d\n", lstrlenA(value), ret_size); + ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %d\n", GetLastError()); + + /* Write A, read A/W */ + ret = SetEnvironmentVariableA(name, value); + ok(ret == TRUE, "SetEnvironmentVariableW failed, last error %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret_size = GetEnvironmentVariableA(name, NULL, 0); + todo_wine ok(ret_size == lstrlenA(value) + 1, "expected ret_size %d, got %d\n", lstrlenA(value) + 1, ret_size); + ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %d\n", GetLastError()); + + lstrcpyA(buf, "foo"); + SetLastError(0xdeadbeef); + ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value) + 1); + todo_wine ok(lstrcmpA(buf, value) == 0, "expected %s, got %s\n", debugstr_a(value), debugstr_a(buf)); + todo_wine ok(ret_size == lstrlenA(value), "expected ret_size %d, got %d\n", lstrlenA(value), ret_size); + ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret_size = GetEnvironmentVariableW(nameW, NULL, 0); + ok(ret_size == lstrlenW(valueW) + 1, "expected ret_size %d, got %d\n", lstrlenW(valueW) + 1, ret_size); + ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %d\n", GetLastError()); + + lstrcpyW(bufW, L"foo"); + SetLastError(0xdeadbeef); + ret_size = GetEnvironmentVariableW(nameW, bufW, lstrlenW(valueW) + 1); + ok(ret_size == lstrlenW(valueW), "expected ret_size %d, got %d\n", lstrlenW(valueW), ret_size); + ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %d\n", GetLastError()); + ok(lstrcmpW(bufW, valueW) == 0, "expected %s, got %s\n", debugstr_w(valueW), debugstr_w(bufW)); +} + static void test_ExpandEnvironmentStringsA(void) { const char* value="Long long value"; @@ -720,6 +782,7 @@ START_TEST(environ) test_Predefined(); test_GetSetEnvironmentVariableA(); test_GetSetEnvironmentVariableW(); + test_GetSetEnvironmentVariableAW(); test_ExpandEnvironmentStringsA(); test_GetComputerName(); test_GetComputerNameExA();
1
0
0
0
Serge Gautherie : winapi_test: Restore horizontal alignment of macro defines.
by Alexandre Julliard
10 Aug '20
10 Aug '20
Module: wine Branch: master Commit: 99c0ab2ea1f912ee699e307a77f26822dfef7b06 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=99c0ab2ea1f912ee699e307a…
Author: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Date: Sat Jul 25 21:36:25 2020 +0200 winapi_test: Restore horizontal alignment of macro defines. Signed-off-by: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/tests/generated.c | 10 +++++----- dlls/kernel32/tests/generated.c | 10 +++++----- dlls/ntdll/tests/generated.c | 10 +++++----- dlls/rpcrt4/tests/generated.c | 10 +++++----- dlls/shell32/tests/generated.c | 10 +++++----- dlls/shlwapi/tests/generated.c | 10 +++++----- dlls/urlmon/tests/generated.c | 10 +++++----- dlls/user32/tests/generated.c | 10 +++++----- dlls/wininet/tests/generated.c | 10 +++++----- dlls/winmm/tests/generated.c | 10 +++++----- tools/winapi/winapi_test | 10 +++++----- 11 files changed, 55 insertions(+), 55 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=99c0ab2ea1f912ee699e…
1
0
0
0
Serge Gautherie : winapi_test: Horizontally align TEST_TYPE_SIGNED() parameter.
by Alexandre Julliard
10 Aug '20
10 Aug '20
Module: wine Branch: master Commit: c26d7470cc5b2dabf9c8b91d2b313eb0041bebae URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c26d7470cc5b2dabf9c8b91d…
Author: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Date: Sat Jul 25 21:35:39 2020 +0200 winapi_test: Horizontally align TEST_TYPE_SIGNED() parameter. Signed-off-by: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/generated.c | 60 +++++++++++++++++++++--------------------- dlls/shell32/tests/generated.c | 4 +-- dlls/wininet/tests/generated.c | 4 +-- tools/winapi/winapi_test | 2 +- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/dlls/ntdll/tests/generated.c b/dlls/ntdll/tests/generated.c index d277e02073..e51ce274ef 100644 --- a/dlls/ntdll/tests/generated.c +++ b/dlls/ntdll/tests/generated.c @@ -101,7 +101,7 @@ static void test_pack_HALF_PTR(void) /* HALF_PTR */ TEST_TYPE_SIZE (HALF_PTR, 4) TEST_TYPE_ALIGN (HALF_PTR, 4) - TEST_TYPE_SIGNED(HALF_PTR) + TEST_TYPE_SIGNED (HALF_PTR) } static void test_pack_INT16(void) @@ -109,7 +109,7 @@ static void test_pack_INT16(void) /* INT16 */ TEST_TYPE_SIZE (INT16, 2) TEST_TYPE_ALIGN (INT16, 2) - TEST_TYPE_SIGNED(INT16) + TEST_TYPE_SIGNED (INT16) } static void test_pack_INT32(void) @@ -117,7 +117,7 @@ static void test_pack_INT32(void) /* INT32 */ TEST_TYPE_SIZE (INT32, 4) TEST_TYPE_ALIGN (INT32, 4) - TEST_TYPE_SIGNED(INT32) + TEST_TYPE_SIGNED (INT32) } static void test_pack_INT64(void) @@ -125,7 +125,7 @@ static void test_pack_INT64(void) /* INT64 */ TEST_TYPE_SIZE (INT64, 8) TEST_TYPE_ALIGN (INT64, 8) - TEST_TYPE_SIGNED(INT64) + TEST_TYPE_SIGNED (INT64) } static void test_pack_INT8(void) @@ -133,7 +133,7 @@ static void test_pack_INT8(void) /* INT8 */ TEST_TYPE_SIZE (INT8, 1) TEST_TYPE_ALIGN (INT8, 1) - TEST_TYPE_SIGNED(INT8) + TEST_TYPE_SIGNED (INT8) } static void test_pack_INT_PTR(void) @@ -141,7 +141,7 @@ static void test_pack_INT_PTR(void) /* INT_PTR */ TEST_TYPE_SIZE (INT_PTR, 8) TEST_TYPE_ALIGN (INT_PTR, 8) - TEST_TYPE_SIGNED(INT_PTR) + TEST_TYPE_SIGNED (INT_PTR) } static void test_pack_LONG32(void) @@ -149,7 +149,7 @@ static void test_pack_LONG32(void) /* LONG32 */ TEST_TYPE_SIZE (LONG32, 4) TEST_TYPE_ALIGN (LONG32, 4) - TEST_TYPE_SIGNED(LONG32) + TEST_TYPE_SIGNED (LONG32) } static void test_pack_LONG64(void) @@ -157,7 +157,7 @@ static void test_pack_LONG64(void) /* LONG64 */ TEST_TYPE_SIZE (LONG64, 8) TEST_TYPE_ALIGN (LONG64, 8) - TEST_TYPE_SIGNED(LONG64) + TEST_TYPE_SIGNED (LONG64) } static void test_pack_LONG_PTR(void) @@ -165,7 +165,7 @@ static void test_pack_LONG_PTR(void) /* LONG_PTR */ TEST_TYPE_SIZE (LONG_PTR, 8) TEST_TYPE_ALIGN (LONG_PTR, 8) - TEST_TYPE_SIGNED(LONG_PTR) + TEST_TYPE_SIGNED (LONG_PTR) } static void test_pack_SIZE_T(void) @@ -1738,7 +1738,7 @@ static void test_pack_LONG(void) /* LONG */ TEST_TYPE_SIZE (LONG, 4) TEST_TYPE_ALIGN (LONG, 4) - TEST_TYPE_SIGNED(LONG) + TEST_TYPE_SIGNED (LONG) } static void test_pack_LONGLONG(void) @@ -1746,7 +1746,7 @@ static void test_pack_LONGLONG(void) /* LONGLONG */ TEST_TYPE_SIZE (LONGLONG, 8) TEST_TYPE_ALIGN (LONGLONG, 8) - TEST_TYPE_SIGNED(LONGLONG) + TEST_TYPE_SIGNED (LONGLONG) } static void test_pack_LUID(void) @@ -2896,7 +2896,7 @@ static void test_pack_SHORT(void) /* SHORT */ TEST_TYPE_SIZE (SHORT, 2) TEST_TYPE_ALIGN (SHORT, 2) - TEST_TYPE_SIGNED(SHORT) + TEST_TYPE_SIGNED (SHORT) } static void test_pack_SID(void) @@ -3117,7 +3117,7 @@ static void test_pack_BOOL(void) /* BOOL */ TEST_TYPE_SIZE (BOOL, 4) TEST_TYPE_ALIGN (BOOL, 4) - TEST_TYPE_SIGNED(BOOL) + TEST_TYPE_SIGNED (BOOL) } static void test_pack_BYTE(void) @@ -3177,7 +3177,7 @@ static void test_pack_HFILE(void) /* HFILE */ TEST_TYPE_SIZE (HFILE, 4) TEST_TYPE_ALIGN (HFILE, 4) - TEST_TYPE_SIGNED(HFILE) + TEST_TYPE_SIGNED (HFILE) } static void test_pack_HGDIOBJ(void) @@ -3213,7 +3213,7 @@ static void test_pack_INT(void) /* INT */ TEST_TYPE_SIZE (INT, 4) TEST_TYPE_ALIGN (INT, 4) - TEST_TYPE_SIGNED(INT) + TEST_TYPE_SIGNED (INT) } static void test_pack_LOCALHANDLE(void) @@ -3518,7 +3518,7 @@ static void test_pack_HALF_PTR(void) /* HALF_PTR */ TEST_TYPE_SIZE (HALF_PTR, 2) TEST_TYPE_ALIGN (HALF_PTR, 2) - TEST_TYPE_SIGNED(HALF_PTR) + TEST_TYPE_SIGNED (HALF_PTR) } static void test_pack_INT16(void) @@ -3526,7 +3526,7 @@ static void test_pack_INT16(void) /* INT16 */ TEST_TYPE_SIZE (INT16, 2) TEST_TYPE_ALIGN (INT16, 2) - TEST_TYPE_SIGNED(INT16) + TEST_TYPE_SIGNED (INT16) } static void test_pack_INT32(void) @@ -3534,7 +3534,7 @@ static void test_pack_INT32(void) /* INT32 */ TEST_TYPE_SIZE (INT32, 4) TEST_TYPE_ALIGN (INT32, 4) - TEST_TYPE_SIGNED(INT32) + TEST_TYPE_SIGNED (INT32) } static void test_pack_INT64(void) @@ -3542,7 +3542,7 @@ static void test_pack_INT64(void) /* INT64 */ TEST_TYPE_SIZE (INT64, 8) TEST_TYPE_ALIGN (INT64, 8) - TEST_TYPE_SIGNED(INT64) + TEST_TYPE_SIGNED (INT64) } static void test_pack_INT8(void) @@ -3550,7 +3550,7 @@ static void test_pack_INT8(void) /* INT8 */ TEST_TYPE_SIZE (INT8, 1) TEST_TYPE_ALIGN (INT8, 1) - TEST_TYPE_SIGNED(INT8) + TEST_TYPE_SIGNED (INT8) } static void test_pack_INT_PTR(void) @@ -3558,7 +3558,7 @@ static void test_pack_INT_PTR(void) /* INT_PTR */ TEST_TYPE_SIZE (INT_PTR, 4) TEST_TYPE_ALIGN (INT_PTR, 4) - TEST_TYPE_SIGNED(INT_PTR) + TEST_TYPE_SIGNED (INT_PTR) } static void test_pack_LONG32(void) @@ -3566,7 +3566,7 @@ static void test_pack_LONG32(void) /* LONG32 */ TEST_TYPE_SIZE (LONG32, 4) TEST_TYPE_ALIGN (LONG32, 4) - TEST_TYPE_SIGNED(LONG32) + TEST_TYPE_SIGNED (LONG32) } static void test_pack_LONG64(void) @@ -3574,7 +3574,7 @@ static void test_pack_LONG64(void) /* LONG64 */ TEST_TYPE_SIZE (LONG64, 8) TEST_TYPE_ALIGN (LONG64, 8) - TEST_TYPE_SIGNED(LONG64) + TEST_TYPE_SIGNED (LONG64) } static void test_pack_LONG_PTR(void) @@ -3582,7 +3582,7 @@ static void test_pack_LONG_PTR(void) /* LONG_PTR */ TEST_TYPE_SIZE (LONG_PTR, 4) TEST_TYPE_ALIGN (LONG_PTR, 4) - TEST_TYPE_SIGNED(LONG_PTR) + TEST_TYPE_SIGNED (LONG_PTR) } static void test_pack_SIZE_T(void) @@ -5155,7 +5155,7 @@ static void test_pack_LONG(void) /* LONG */ TEST_TYPE_SIZE (LONG, 4) TEST_TYPE_ALIGN (LONG, 4) - TEST_TYPE_SIGNED(LONG) + TEST_TYPE_SIGNED (LONG) } static void test_pack_LONGLONG(void) @@ -5163,7 +5163,7 @@ static void test_pack_LONGLONG(void) /* LONGLONG */ TEST_TYPE_SIZE (LONGLONG, 8) TEST_TYPE_ALIGN (LONGLONG, 8) - TEST_TYPE_SIGNED(LONGLONG) + TEST_TYPE_SIGNED (LONGLONG) } static void test_pack_LUID(void) @@ -6313,7 +6313,7 @@ static void test_pack_SHORT(void) /* SHORT */ TEST_TYPE_SIZE (SHORT, 2) TEST_TYPE_ALIGN (SHORT, 2) - TEST_TYPE_SIGNED(SHORT) + TEST_TYPE_SIGNED (SHORT) } static void test_pack_SID(void) @@ -6534,7 +6534,7 @@ static void test_pack_BOOL(void) /* BOOL */ TEST_TYPE_SIZE (BOOL, 4) TEST_TYPE_ALIGN (BOOL, 4) - TEST_TYPE_SIGNED(BOOL) + TEST_TYPE_SIGNED (BOOL) } static void test_pack_BYTE(void) @@ -6594,7 +6594,7 @@ static void test_pack_HFILE(void) /* HFILE */ TEST_TYPE_SIZE (HFILE, 4) TEST_TYPE_ALIGN (HFILE, 4) - TEST_TYPE_SIGNED(HFILE) + TEST_TYPE_SIGNED (HFILE) } static void test_pack_HGDIOBJ(void) @@ -6630,7 +6630,7 @@ static void test_pack_INT(void) /* INT */ TEST_TYPE_SIZE (INT, 4) TEST_TYPE_ALIGN (INT, 4) - TEST_TYPE_SIGNED(INT) + TEST_TYPE_SIGNED (INT) } static void test_pack_LOCALHANDLE(void) diff --git a/dlls/shell32/tests/generated.c b/dlls/shell32/tests/generated.c index 55f4eab894..4a1a5b999c 100644 --- a/dlls/shell32/tests/generated.c +++ b/dlls/shell32/tests/generated.c @@ -485,7 +485,7 @@ static void test_pack_VARIANT_BOOL(void) /* VARIANT_BOOL */ TEST_TYPE_SIZE (VARIANT_BOOL, 2) TEST_TYPE_ALIGN (VARIANT_BOOL, 2) - TEST_TYPE_SIGNED(VARIANT_BOOL) + TEST_TYPE_SIGNED (VARIANT_BOOL) } static void test_pack_VARTYPE(void) @@ -2303,7 +2303,7 @@ static void test_pack_VARIANT_BOOL(void) /* VARIANT_BOOL */ TEST_TYPE_SIZE (VARIANT_BOOL, 2) TEST_TYPE_ALIGN (VARIANT_BOOL, 2) - TEST_TYPE_SIGNED(VARIANT_BOOL) + TEST_TYPE_SIGNED (VARIANT_BOOL) } static void test_pack_VARTYPE(void) diff --git a/dlls/wininet/tests/generated.c b/dlls/wininet/tests/generated.c index f88834ab9d..aec942c93b 100644 --- a/dlls/wininet/tests/generated.c +++ b/dlls/wininet/tests/generated.c @@ -486,7 +486,7 @@ static void test_pack_GROUPID(void) /* GROUPID */ TEST_TYPE_SIZE (GROUPID, 8) TEST_TYPE_ALIGN (GROUPID, 8) - TEST_TYPE_SIGNED(GROUPID) + TEST_TYPE_SIGNED (GROUPID) } static void test_pack_HINTERNET(void) @@ -1723,7 +1723,7 @@ static void test_pack_GROUPID(void) /* GROUPID */ TEST_TYPE_SIZE (GROUPID, 8) TEST_TYPE_ALIGN (GROUPID, 8) - TEST_TYPE_SIGNED(GROUPID) + TEST_TYPE_SIGNED (GROUPID) } static void test_pack_HINTERNET(void) diff --git a/tools/winapi/winapi_test b/tools/winapi/winapi_test index 762d7afde2..652123c2a4 100755 --- a/tools/winapi/winapi_test +++ b/tools/winapi/winapi_test @@ -692,7 +692,7 @@ sub output_test_pack_type($$$$$$) { } } } elsif ($type_kind eq "signed") { - print OUT " TEST_TYPE_SIGNED($type_name)\n"; + print OUT " TEST_TYPE_SIGNED ($type_name)\n"; } elsif ($type_kind eq "unsigned") { print OUT " TEST_TYPE_UNSIGNED($type_name)\n"; }
1
0
0
0
Serge Gautherie : winapi: Use $cwd variable instead of pwd command.
by Alexandre Julliard
10 Aug '20
10 Aug '20
Module: wine Branch: master Commit: 49936b31b3155f5f0a76b6ebf941a4ac45b5015b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=49936b31b3155f5f0a76b6eb…
Author: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Date: Sat Jul 25 21:35:09 2020 +0200 winapi: Use $cwd variable instead of pwd command. Signed-off-by: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winapi/setup.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/winapi/setup.pm b/tools/winapi/setup.pm index ed0846049b..f23bba1ad1 100644 --- a/tools/winapi/setup.pm +++ b/tools/winapi/setup.pm @@ -54,7 +54,7 @@ BEGIN { if($wine_dir =~ /^\./) { $current_dir = "."; - my $pwd; chomp($pwd = `pwd`); + my $pwd; chomp($pwd = $cwd); foreach my $n (1..((length($wine_dir) + 1) / 3)) { $pwd =~ s/\/([^\/]*)$//; $current_dir = "$1/$current_dir";
1
0
0
0
Rémi Bernon : xaudio2_9: Use new FAudioCreateReverb9 interface.
by Alexandre Julliard
10 Aug '20
10 Aug '20
Module: wine Branch: master Commit: 196cb7afef48f717794828b3ac00838c7aa013c8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=196cb7afef48f717794828b3…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Aug 5 09:08:10 2020 +0200 xaudio2_9: Use new FAudioCreateReverb9 interface. XAudio 2.9 and Windows 10 introduced a new SideDelay field in the middle of the XAUDIO2FX_REVERB_PARAMETERS structure, which causes other fields to be offseted and incorrectly read from the parameter buffer. FAudio 20.08 introduces this new interface to create reverb effects that use the new parameter structure layout. This fixes audio glitches in Dragon Quest Builders 2. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 3 ++- configure.ac | 3 ++- dlls/xaudio2_7/xapo.c | 11 +++++++++++ include/config.h.in | 4 ++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/configure b/configure index c9afbc0ab8..ffe5ecca89 100755 --- a/configure +++ b/configure @@ -15531,7 +15531,8 @@ done LIBS="$LIBS $FAUDIO_LIBS" for ac_func in FAudio_CommitOperationSet \ F3DAudioInitialize8 \ - FAudioLinkedVersion + FAudioLinkedVersion \ + FAudioCreateReverb9WithCustomAllocatorEXT do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" diff --git a/configure.ac b/configure.ac index 360ef2b11f..67729e0c0a 100644 --- a/configure.ac +++ b/configure.ac @@ -1784,7 +1784,8 @@ then [WINE_CHECK_SONAME(FAudio,FAudioCreate,,,[$FAUDIO_LIBS],[[libFAudio*]])]) WINE_CHECK_LIB_FUNCS([FAudio_CommitOperationSet \ F3DAudioInitialize8 \ - FAudioLinkedVersion], [$FAUDIO_LIBS]) + FAudioLinkedVersion \ + FAudioCreateReverb9WithCustomAllocatorEXT], [$FAUDIO_LIBS]) ]) fi WINE_NOTICE_WITH(faudio,[test "x$ac_cv_lib_soname_FAudio" = "x"], diff --git a/dlls/xaudio2_7/xapo.c b/dlls/xaudio2_7/xapo.c index e64523ea19..e47442959d 100644 --- a/dlls/xaudio2_7/xapo.c +++ b/dlls/xaudio2_7/xapo.c @@ -313,6 +313,16 @@ static inline HRESULT get_fapo_from_clsid(REFCLSID clsid, FAPO **fapo) XAudio_Internal_Free, XAudio_Internal_Realloc ); +#if XAUDIO2_VER >= 9 && HAVE_FAUDIOCREATEREVERB9WITHCUSTOMALLOCATOREXT + if(IsEqualGUID(clsid, &CLSID_AudioReverb27)) + return FAudioCreateReverb9WithCustomAllocatorEXT( + fapo, + 0, + XAudio_Internal_Malloc, + XAudio_Internal_Free, + XAudio_Internal_Realloc + ); +#else if(IsEqualGUID(clsid, &CLSID_AudioReverb27)) return FAudioCreateReverbWithCustomAllocatorEXT( fapo, @@ -322,6 +332,7 @@ static inline HRESULT get_fapo_from_clsid(REFCLSID clsid, FAPO **fapo) XAudio_Internal_Realloc ); #endif +#endif #if XAUDIO2_VER >= 8 || defined XAPOFX1_VER if(IsEqualGUID(clsid, &CLSID_FXReverb) || IsEqualGUID(clsid, &CLSID_FXEQ) || diff --git a/include/config.h.in b/include/config.h.in index fc9305418c..1748a8b8d8 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -152,6 +152,10 @@ /* Define to 1 if you have the `fallocate' function. */ #undef HAVE_FALLOCATE +/* Define to 1 if you have the `FAudioCreateReverb9WithCustomAllocatorEXT' + function. */ +#undef HAVE_FAUDIOCREATEREVERB9WITHCUSTOMALLOCATOREXT + /* Define to 1 if you have the `FAudioLinkedVersion' function. */ #undef HAVE_FAUDIOLINKEDVERSION
1
0
0
0
Dmitry Kislyuk : vbscript: Implement case insensitive search in InStrRev function.
by Alexandre Julliard
10 Aug '20
10 Aug '20
Module: wine Branch: master Commit: b900567f04dce34c11065411959ad0e3c8335114 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b900567f04dce34c11065411…
Author: Dmitry Kislyuk <dimaki(a)rocketmail.com> Date: Fri Aug 7 02:41:15 2020 -0500 vbscript: Implement case insensitive search in InStrRev function. Signed-off-by: Dmitry Kislyuk <dimaki(a)rocketmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/global.c | 97 +++++++++++++++++++++++++++------------------ dlls/vbscript/tests/api.vbs | 49 ++++++++++++++++++++--- 2 files changed, 102 insertions(+), 44 deletions(-) diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c index 414ede5ed0..122f5c7b71 100644 --- a/dlls/vbscript/global.c +++ b/dlls/vbscript/global.c @@ -2398,61 +2398,80 @@ static HRESULT Global_StrReverse(BuiltinDisp *This, VARIANT *arg, unsigned args_ static HRESULT Global_InStrRev(BuiltinDisp *This, VARIANT *args, unsigned args_cnt, VARIANT *res) { - int start, ret = 0; + int start = -1, ret = -1, mode = 0; BSTR str1, str2; + size_t len1, len2; HRESULT hres; TRACE("%s %s arg_cnt=%u\n", debugstr_variant(args), debugstr_variant(args+1), args_cnt); - if(args_cnt > 3) { - FIXME("Unsupported args\n"); - return E_NOTIMPL; - } - assert(2 <= args_cnt && args_cnt <= 4); - if(V_VT(args) == VT_NULL || V_VT(args+1) == VT_NULL || (args_cnt > 2 && V_VT(args+2) == VT_NULL)) + if(V_VT(args) == VT_NULL || V_VT(args+1) == VT_NULL || (args_cnt > 2 && V_VT(args+2) == VT_NULL) + || (args_cnt == 4 && V_VT(args+3) == VT_NULL)) return MAKE_VBSERROR(VBSE_ILLEGAL_NULL_USE); - hres = to_string(args, &str1); - if(FAILED(hres)) - return hres; + if(args_cnt == 4) { + hres = to_int(args+3, &mode); + if(FAILED(hres)) + return hres; + if (mode != 0 && mode != 1) + return MAKE_VBSERROR(VBSE_ILLEGAL_FUNC_CALL); + } - hres = to_string(args+1, &str2); - if(SUCCEEDED(hres)) { - if(args_cnt > 2) { - hres = to_int(args+2, &start); - if(SUCCEEDED(hres) && start <= 0) { - FIXME("Unsupported start %d\n", start); - hres = E_NOTIMPL; - } - }else { - start = SysStringLen(str1); - } - } else { - str2 = NULL; + if(args_cnt >= 3) { + hres = to_int(args+2, &start); + if(FAILED(hres)) + return hres; + if(!start || start < -1) + return MAKE_VBSERROR(VBSE_ILLEGAL_FUNC_CALL); } - if(SUCCEEDED(hres)) { - const WCHAR *ptr; - size_t len; - - len = SysStringLen(str2); - if(start >= len && start <= SysStringLen(str1)) { - for(ptr = str1+start-SysStringLen(str2); ptr >= str1; ptr--) { - if(!memcmp(ptr, str2, len*sizeof(WCHAR))) { - ret = ptr-str1+1; - break; - } - } + if(V_VT(args) != VT_BSTR) { + hres = to_string(args, &str1); + if(FAILED(hres)) + return hres; + } + else + str1 = V_BSTR(args); + + if(V_VT(args+1) != VT_BSTR) { + hres = to_string(args+1, &str2); + if(FAILED(hres)) { + if(V_VT(args) != VT_BSTR) + SysFreeString(str1); + return hres; } } + else + str2 = V_BSTR(args+1); - SysFreeString(str1); - SysFreeString(str2); - if(FAILED(hres)) - return hres; + len1 = SysStringLen(str1); + if(!len1) { + ret = 0; + goto end; + } + + if(start == -1) + start = len1; + + len2 = SysStringLen(str2); + if(!len2) { + ret = start; + goto end; + } + + if(start >= len2 && start <= len1) { + ret = FindStringOrdinal(FIND_FROMEND, str1, start, + str2, len2, mode); + } + ret++; +end: + if(V_VT(args) != VT_BSTR) + SysFreeString(str1); + if(V_VT(args+1) != VT_BSTR) + SysFreeString(str2); return return_int(res, ret); } diff --git a/dlls/vbscript/tests/api.vbs b/dlls/vbscript/tests/api.vbs index f829afc101..6af49c849d 100644 --- a/dlls/vbscript/tests/api.vbs +++ b/dlls/vbscript/tests/api.vbs @@ -508,18 +508,57 @@ Call ok(x = 3, "InStrRev returned " & x) x = InStrRev(1234, 34) Call ok(x = 3, "InStrRev returned " & x) -Sub testInStrRevError(arg1, arg2, arg3, error_num) +x = InStrRev("abcd", "A", 1, 0) +Call ok(x = 0, "InStrRev returned " & x) + +x = InStrRev("abcd", "A", 1, 1) +Call ok(x = 1, "InStrRev returned " & x) + +x = InStrRev("abcd", "Ab", 1, 1) +Call ok(x = 0, "InStrRev returned " & x) + +x = InStrRev("abcd", "Ab", -1, 1) +Call ok(x = 1, "InStrRev returned " & x) + +x = InStrRev("abcd", "cd", 3, 1) +Call ok(x = 0, "InStrRev returned " & x) + +x = InStrRev("abcd", "cd", 4, 1) +Call ok(x = 3, "InStrRev returned " & x) + +x = InStrRev("abcd", "cd", 5, 1) +Call ok(x = 0, "InStrRev returned " & x) + +x = InStrRev("abc" & Chr(0) & "A" & Chr(0) & "BC", "c", 8, 0) +Call ok(x = 3, "InStrRev returned " & x) + +x = InStrRev("abc" & Chr(0) & "ABC", Chr(0) & "a", 6, 1) +Call ok(x = 4, "InStrRev returned " & x) + +x = InStrRev("", "hi", 1, 0) +Call ok(x = 0, "InStrRev returned " & x) + +x = InStrRev("abcd", "", 3, 1) +Call ok(x = 3, "InStrRev returned " & x) + +x = InStrRev("", "", 3, 0) +Call ok(x = 0, "InStrRev returned " & x) + +Sub testInStrRevError(arg1, arg2, arg3, arg4, error_num) on error resume next Dim x Call Err.clear() - x = InStrRev(arg1, arg2, arg3) + x = InStrRev(arg1, arg2, arg3, arg4) Call ok(Err.number = error_num, "Err.number = " & Err.number) End Sub -call testInStrRevError("abcd", null, 2, 94) -call testInStrRevError(null, "abcd", 2, 94) -call testInStrRevError("abcd", "abcd", null, 94) +call testInStrRevError("abcd", null, 2, 0, 94) +call testInStrRevError(null, "abcd", 2, 0, 94) +call testInStrRevError("abcd", "abcd", null, 0, 94) +call testInStrRevError("abcd", "abcd", 2, null, 94) +call testInStrRevError("abcd", "abcd", -20, 1, 5) +Call testInStrRevError("abcd", "abcd", 2, 10, 5) Sub TestMid(str, start, len, ex) x = Mid(str, start, len)
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
70
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Results per page:
10
25
50
100
200