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
April 2023
----- 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
1 participants
817 discussions
Start a n
N
ew thread
Mohamad Al-Jaf : widl: Add support for inherited runtime classes.
by Alexandre Julliard
03 Apr '23
03 Apr '23
Module: wine Branch: master Commit: 781b8b0e9911bbbde7f895675ae7cd2863d076a1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/781b8b0e9911bbbde7f895675ae7cd…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Fri Mar 31 22:15:34 2023 -0400 widl: Add support for inherited runtime classes. Needed to build windows.ui.composition.idl. --- tools/widl/parser.y | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 5567d94559e..9c07536eac1 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -1009,8 +1009,9 @@ coclassdef: attributes coclass '{' class_interfaces '}' semicolon_opt runtimeclass: tRUNTIMECLASS typename { $$ = type_runtimeclass_declare($2, current_namespace); } ; -runtimeclass_def: attributes runtimeclass '{' class_interfaces '}' semicolon_opt - { $$ = type_runtimeclass_define($2, $1, $4); } +runtimeclass_def: attributes runtimeclass inherit '{' class_interfaces '}' semicolon_opt + { if ($3 && type_get_type($3) != TYPE_RUNTIMECLASS) error_loc("%s is not a runtimeclass\n", $3->name); + $$ = type_runtimeclass_define($2, $1, $5); } ; apicontract: tAPICONTRACT typename { $$ = type_apicontract_declare($2, current_namespace); }
1
0
0
0
Alex Henrie : wldap32: Allow LDAP_OPT_REFERRALS to be set from a pointer.
by Alexandre Julliard
03 Apr '23
03 Apr '23
Module: wine Branch: master Commit: 42d0fa8b1329082a2d3efc4ec0889637b97fc84f URL:
https://gitlab.winehq.org/wine/wine/-/commit/42d0fa8b1329082a2d3efc4ec08896…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun Apr 2 21:41:27 2023 -0600 wldap32: Allow LDAP_OPT_REFERRALS to be set from a pointer. --- dlls/wldap32/option.c | 23 +++++++++++++++++++++-- dlls/wldap32/tests/parse.c | 27 ++++++++++++++++++--------- dlls/wldap32/winldap_private.h | 3 +++ 3 files changed, 42 insertions(+), 11 deletions(-) diff --git a/dlls/wldap32/option.c b/dlls/wldap32/option.c index 38398c6d46c..b64b544d1ed 100644 --- a/dlls/wldap32/option.c +++ b/dlls/wldap32/option.c @@ -431,12 +431,31 @@ ULONG CDECL ldap_set_optionW( LDAP *ld, int option, void *value ) } case WLDAP32_LDAP_OPT_REFERRALS: { - if (value == WLDAP32_LDAP_OPT_OFF) value = LDAP_OPT_OFF; - else if (value != WLDAP32_LDAP_OPT_ON) + if (value == WLDAP32_LDAP_OPT_ON) + value = LDAP_OPT_ON; + else if (value == WLDAP32_LDAP_OPT_OFF) + value = LDAP_OPT_OFF; + else if (value == (void *)LDAP_CHASE_SUBORDINATE_REFERRALS || + value == (void *)LDAP_CHASE_EXTERNAL_REFERRALS || + value == (void *)(LDAP_CHASE_SUBORDINATE_REFERRALS|LDAP_CHASE_EXTERNAL_REFERRALS)) { FIXME( "upgrading referral value %p to LDAP_OPT_ON (OpenLDAP lacks sufficient granularity)\n", value ); value = LDAP_OPT_ON; } + else if (*(ULONG *)value == 1) + value = LDAP_OPT_ON; + else if (*(ULONG *)value == 0) + value = LDAP_OPT_OFF; + else if (*(ULONG *)value == LDAP_CHASE_SUBORDINATE_REFERRALS || + *(ULONG *)value == LDAP_CHASE_EXTERNAL_REFERRALS || + *(ULONG *)value == (LDAP_CHASE_SUBORDINATE_REFERRALS|LDAP_CHASE_EXTERNAL_REFERRALS)) + { + FIXME( "upgrading referral value 0x%lx to LDAP_OPT_ON (OpenLDAP lacks sufficient granularity)\n", *(ULONG *)value ); + value = LDAP_OPT_ON; + } + else + return WLDAP32_LDAP_PARAM_ERROR; + return map_error( ldap_set_option( CTX(ld), option, value ) ); } case WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT: diff --git a/dlls/wldap32/tests/parse.c b/dlls/wldap32/tests/parse.c index d29cbfdd1b8..15a24716305 100644 --- a/dlls/wldap32/tests/parse.c +++ b/dlls/wldap32/tests/parse.c @@ -116,20 +116,29 @@ static void test_ldap_search_extW( LDAP *ld ) static void test_opt_referrals( LDAP *ld ) { - ULONG ret, oldvalue; + ULONG ret, value; - ret = ldap_get_optionW( ld, LDAP_OPT_REFERRALS, &oldvalue ); - if (ret == LDAP_SERVER_DOWN || ret == LDAP_UNAVAILABLE) - { - skip("test server can't be reached\n"); - return; - } + value = 0xdeadbeef; + ret = ldap_get_optionW( ld, LDAP_OPT_REFERRALS, &value ); + ok( !ret, "ldap_get_optionW failed %#lx\n", ret ); + todo_wine ok( value == 1, "got %lu\n", value ); - ret = ldap_set_optionW( ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF ); + value = 0; + ret = ldap_set_optionW( ld, LDAP_OPT_REFERRALS, (void *)&value ); ok( !ret, "ldap_set_optionW failed %#lx\n", ret ); - ret = ldap_set_optionW( ld, LDAP_OPT_REFERRALS, (void *)&oldvalue ); + value = 0xdeadbeef; + ret = ldap_get_optionW( ld, LDAP_OPT_REFERRALS, &value ); + ok( !ret, "ldap_get_optionW failed %#lx\n", ret ); + ok( !value, "got %lu\n", value ); + + ret = ldap_set_optionW( ld, LDAP_OPT_REFERRALS, LDAP_OPT_ON ); ok( !ret, "ldap_set_optionW failed %#lx\n", ret ); + + value = 0xdeadbeef; + ret = ldap_get_optionW( ld, LDAP_OPT_REFERRALS, &value ); + ok( !ret, "ldap_get_optionW failed %#lx\n", ret ); + todo_wine ok( value == 1, "got %lu\n", value ); } static void test_opt_protocol_version( LDAP *ld ) diff --git a/dlls/wldap32/winldap_private.h b/dlls/wldap32/winldap_private.h index 249af99e51e..a4f2caf7772 100644 --- a/dlls/wldap32/winldap_private.h +++ b/dlls/wldap32/winldap_private.h @@ -168,6 +168,9 @@ typedef enum { #define WLDAP32_LDAP_VERSION3 3 #define WLDAP32_LDAP_VERSION WLDAP32_LDAP_VERSION2 +#define LDAP_CHASE_SUBORDINATE_REFERRALS 0x20 +#define LDAP_CHASE_EXTERNAL_REFERRALS 0x40 + #define WLDAP32_LDAP_AUTH_SIMPLE 0x80 #define WLDAP32_LDAP_AUTH_SASL 0x83 #define WLDAP32_LDAP_AUTH_OTHERKIND 0x86
1
0
0
0
Alex Henrie : wldap32/tests: Name option test functions after the option being tested.
by Alexandre Julliard
03 Apr '23
03 Apr '23
Module: wine Branch: master Commit: e2ead2fbfe21ae29c91b2ab9ea8914412bc5ac7d URL:
https://gitlab.winehq.org/wine/wine/-/commit/e2ead2fbfe21ae29c91b2ab9ea8914…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun Apr 2 21:41:27 2023 -0600 wldap32/tests: Name option test functions after the option being tested. --- dlls/wldap32/tests/parse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/wldap32/tests/parse.c b/dlls/wldap32/tests/parse.c index 031b8bcb22a..d29cbfdd1b8 100644 --- a/dlls/wldap32/tests/parse.c +++ b/dlls/wldap32/tests/parse.c @@ -114,7 +114,7 @@ static void test_ldap_search_extW( LDAP *ld ) ok( !ret, "ldap_search_extW failed %#lx\n", ret ); } -static void test_ldap_set_optionW( LDAP *ld ) +static void test_opt_referrals( LDAP *ld ) { ULONG ret, oldvalue; @@ -132,7 +132,7 @@ static void test_ldap_set_optionW( LDAP *ld ) ok( !ret, "ldap_set_optionW failed %#lx\n", ret ); } -static void test_ldap_get_optionW( LDAP *ld ) +static void test_opt_protocol_version( LDAP *ld ) { ULONG ret, version; @@ -601,7 +601,7 @@ START_TEST (parse) test_ldap_delete( ld ); test_ldap_parse_sort_control( ld ); test_ldap_search_extW( ld ); - test_ldap_get_optionW( ld ); - test_ldap_set_optionW( ld ); + test_opt_referrals( ld ); + test_opt_protocol_version( ld ); ldap_unbind( ld ); }
1
0
0
0
Florian Will : dinput: Fix EnumObjects callback return value handling.
by Alexandre Julliard
03 Apr '23
03 Apr '23
Module: wine Branch: master Commit: dcb84a45f69f57efeb547f11ed5a8474ee74de1e URL:
https://gitlab.winehq.org/wine/wine/-/commit/dcb84a45f69f57efeb547f11ed5a84…
Author: Florian Will <florian.will(a)gmail.com> Date: Sun Apr 2 00:13:47 2023 +0200 dinput: Fix EnumObjects callback return value handling. This solves an issue in ZUSI 3 settings for DirectInput devices. Delphi defines the True value of the "C-compatible" LongBool type as -1, which wine interpreted to mean DIENUM_STOP because it is != DIENUM_CONTINUE. Change that logic so only an explicit DIENUM_STOP (= 0) return value stops the enumeration of objects. --- dlls/dinput/device.c | 4 +++- dlls/dinput/tests/device8.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 19c3241e51f..4db8bd943cb 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -730,7 +730,9 @@ static BOOL enum_objects_callback( struct dinput_device *impl, UINT index, struc struct enum_objects_params *params = data; if (instance->wUsagePage == HID_USAGE_PAGE_PID && !(instance->dwType & DIDFT_NODATA)) return DIENUM_CONTINUE; - return params->callback( instance, params->context ); + + /* Applications may return non-zero values instead of DIENUM_CONTINUE. */ + return params->callback( instance, params->context ) ? DIENUM_CONTINUE : DIENUM_STOP; } static HRESULT WINAPI dinput_device_EnumObjects( IDirectInputDevice8W *iface, LPDIENUMDEVICEOBJECTSCALLBACKW callback, diff --git a/dlls/dinput/tests/device8.c b/dlls/dinput/tests/device8.c index 128fb2992f6..a649fe53b41 100644 --- a/dlls/dinput/tests/device8.c +++ b/dlls/dinput/tests/device8.c @@ -1346,7 +1346,7 @@ static void test_sys_mouse( DWORD version ) res = 0; hr = IDirectInputDevice8_EnumObjects( device, check_object_count_bad_retval, &res, DIDFT_AXIS ); ok( hr == DI_OK, "EnumObjects returned %#lx\n", hr ); - todo_wine ok( res == 3, "got %lu expected 3\n", res ); + ok( res == 3, "got %lu expected 3\n", res ); objinst.dwSize = sizeof(DIDEVICEOBJECTINSTANCEW); res = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
1
0
0
0
Florian Will : dinput/tests: Add EnumObjects callback return value test.
by Alexandre Julliard
03 Apr '23
03 Apr '23
Module: wine Branch: master Commit: c04319e5a09dc2b2e85beeada1c4bf5bc31b8519 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c04319e5a09dc2b2e85beeada1c4bf…
Author: Florian Will <florian.will(a)gmail.com> Date: Sun Apr 2 00:10:34 2023 +0200 dinput/tests: Add EnumObjects callback return value test. --- dlls/dinput/tests/device8.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/dinput/tests/device8.c b/dlls/dinput/tests/device8.c index ea0ec8db837..128fb2992f6 100644 --- a/dlls/dinput/tests/device8.c +++ b/dlls/dinput/tests/device8.c @@ -991,6 +991,13 @@ static BOOL CALLBACK check_object_count( const DIDEVICEOBJECTINSTANCEW *obj, voi return DIENUM_CONTINUE; } +static BOOL CALLBACK check_object_count_bad_retval( const DIDEVICEOBJECTINSTANCEW *obj, void *args ) +{ + DWORD *count = args; + *count = *count + 1; + return -1; /* Invalid, but should CONTINUE. Only explicit DIENUM_STOP will stop enumeration. */ +} + static void test_sys_mouse( DWORD version ) { const DIDEVCAPS expect_caps = @@ -1336,6 +1343,11 @@ static void test_sys_mouse( DWORD version ) ok( check_objects_params.index >= check_objects_params.expect_count, "missing %u objects\n", check_objects_params.expect_count - check_objects_params.index ); + res = 0; + hr = IDirectInputDevice8_EnumObjects( device, check_object_count_bad_retval, &res, DIDFT_AXIS ); + ok( hr == DI_OK, "EnumObjects returned %#lx\n", hr ); + todo_wine ok( res == 3, "got %lu expected 3\n", res ); + objinst.dwSize = sizeof(DIDEVICEOBJECTINSTANCEW); res = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC ); hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, res, DIPH_BYUSAGE );
1
0
0
0
Zebediah Figura : tests: Use a pixel shader that consumes SV_Position in test_query_pipeline_statistics().
by Alexandre Julliard
03 Apr '23
03 Apr '23
Module: vkd3d Branch: master Commit: 8186b75228ca34a533126494e3189372c0789f9b URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/8186b75228ca34a533126494e3189…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Fri Mar 24 17:05:23 2023 -0500 tests: Use a pixel shader that consumes SV_Position in test_query_pipeline_statistics(). Some drivers (AMD Radeon RX 6700 XT, with radeonsi from Mesa 22.2.0-rc3) emit less than one invocation per pixel, presumably because they detect that the shader control flow is uniform for all pixels. Having the control flow depend on SV_Position avoids this test failure. Cf. 34bd0dd0704c613abef8a9aa3ba2a2507ed02843 in wine. --- tests/d3d12.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 7e2e7fa4..685b03b6 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -23822,16 +23822,38 @@ static void test_query_pipeline_statistics(void) ID3D12Device *device; D3D12_QUERY_HEAP_DESC heap_desc; ID3D12QueryHeap *query_heap; + ID3D12PipelineState *pso; ID3D12Resource *resource; unsigned int pixel_count, i; HRESULT hr; + static const uint32_t ps_code[] = + { +#if 0 + float4 main(float4 pos : sv_position) : sv_target + { + return pos; + } +#endif + 0x43425844, 0xac408178, 0x2ca4213f, 0x4f2551e1, 0x1626b422, 0x00000001, 0x000000d8, 0x00000003, + 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x00000f0f, 0x705f7673, 0x7469736f, 0x006e6f69, + 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x745f7673, 0x65677261, 0xabab0074, 0x52444853, 0x0000003c, 0x00000040, + 0x0000000f, 0x04002064, 0x001010f2, 0x00000000, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, + 0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e, + }; + static const D3D12_SHADER_BYTECODE ps = {ps_code, sizeof(ps_code)}; + if (!init_test_context(&context, NULL)) return; device = context.device; command_list = context.list; queue = context.queue; + pso = create_pipeline_state(context.device, + context.root_signature, context.render_target_desc.Format, NULL, &ps, NULL); + heap_desc.Type = D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS; heap_desc.Count = 2; heap_desc.NodeMask = 0; @@ -23853,7 +23875,7 @@ static void test_query_pipeline_statistics(void) ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, false, NULL); ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, context.root_signature); - ID3D12GraphicsCommandList_SetPipelineState(command_list, context.pipeline_state); + ID3D12GraphicsCommandList_SetPipelineState(command_list, pso); ID3D12GraphicsCommandList_IASetPrimitiveTopology(command_list, D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); ID3D12GraphicsCommandList_RSSetViewports(command_list, 1, &context.viewport); ID3D12GraphicsCommandList_RSSetScissorRects(command_list, 1, &context.scissor_rect); @@ -23907,6 +23929,7 @@ static void test_query_pipeline_statistics(void) pipeline_statistics->CSInvocations); release_resource_readback(&rb); + ID3D12PipelineState_Release(pso); ID3D12QueryHeap_Release(query_heap); ID3D12Resource_Release(resource); destroy_test_context(&context);
1
0
0
0
Giovanni Mascellani : tests: Read integer uniforms with strtol() and strtoul().
by Alexandre Julliard
03 Apr '23
03 Apr '23
Module: vkd3d Branch: master Commit: 9a27df3a8ca1c43a21668b44fd3c2a40d5a45caa URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/9a27df3a8ca1c43a21668b44fd3c2…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Fri Mar 17 12:35:13 2023 +0100 tests: Read integer uniforms with strtol() and strtoul(). Because %i sscanf() converters are deprecated, and in practice clamp to [-2^31, 2^31) on 32 bit. --- tests/d3d12.c | 5 ---- tests/shader_runner.c | 74 ++++++++++++++++++++++++++++++++++++++++++++------- tests/utils.h | 5 ++++ 3 files changed, 70 insertions(+), 14 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 890a65d5..7e2e7fa4 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -28,11 +28,6 @@ struct test_options test_options = {0}; static PFN_D3D12_CREATE_VERSIONED_ROOT_SIGNATURE_DESERIALIZER pfn_D3D12CreateVersionedRootSignatureDeserializer; static PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE pfn_D3D12SerializeVersionedRootSignature; -struct ivec4 -{ - int x, y, z, w; -}; - struct dvec2 { double x, y; diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 10c6dd21..0912c60b 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -371,6 +371,58 @@ static void set_uniforms(struct shader_runner *runner, size_t offset, size_t cou memcpy(runner->uniforms + offset, uniforms, count * sizeof(*runner->uniforms)); } +static void read_int(const char **line, int *i) +{ + char *rest; + long val; + + errno = 0; + val = strtol(*line, &rest, 0); + + if (errno != 0 || (*rest != '\0' && !isspace((unsigned char)*rest))) + fatal_error("Malformed int constant '%s'.\n", *line); + + *i = val; + if (*i != val) + fatal_error("Out of range int constant '%.*s'.\n", (int)(rest - *line), *line); + + *line = rest; +} + +static void read_uint(const char **line, unsigned int *u) +{ + char *rest; + unsigned long val; + + errno = 0; + val = strtoul(*line, &rest, 0); + + if (errno != 0 || (*rest != '\0' && !isspace((unsigned char)*rest))) + fatal_error("Malformed uint constant '%s'.\n", *line); + + *u = val; + if (*u != val) + fatal_error("Out of range uint constant '%.*s'.\n", (int)(rest - *line), *line); + + *line = rest; +} + +static void read_int4(const char **line, struct ivec4 *v) +{ + read_int(line, &v->x); + read_int(line, &v->y); + read_int(line, &v->z); + read_int(line, &v->w); +} + +static void read_uint4(const char **line, struct uvec4 *v) +{ + read_uint(line, &v->x); + read_uint(line, &v->y); + read_uint(line, &v->z); + read_uint(line, &v->w); +} + static void parse_test_directive(struct shader_runner *runner, const char *line) { char *rest; @@ -590,28 +642,32 @@ static void parse_test_directive(struct shader_runner *runner, const char *line) fatal_error("Malformed float constant '%s'.\n", line); set_uniforms(runner, offset, 1, &f); } - else if (match_string(line, "int4", &line) || match_string(line, "uint4", &line)) + else if (match_string(line, "int4", &line)) + { + struct ivec4 v; + + read_int4(&line, &v); + set_uniforms(runner, offset, 4, &v); + } + else if (match_string(line, "uint4", &line)) { - int v[4]; + struct uvec4 v; - if (sscanf(line, "%i %i %i %i", &v[0], &v[1], &v[2], &v[3]) < 4) - fatal_error("Malformed (u)int4 constant '%s'.\n", line); - set_uniforms(runner, offset, 4, v); + read_uint4(&line, &v); + set_uniforms(runner, offset, 4, &v); } else if (match_string(line, "int", &line)) { int i; - if (sscanf(line, "%i", &i) < 1) - fatal_error("Malformed int constant '%s'.\n", line); + read_int(&line, &i); set_uniforms(runner, offset, 1, &i); } else if (match_string(line, "uint", &line)) { unsigned int u; - if (sscanf(line, "%u", &u) < 1) - fatal_error("Malformed uint constant '%s'.\n", line); + read_uint(&line, &u); set_uniforms(runner, offset, 1, &u); } else diff --git a/tests/utils.h b/tests/utils.h index 99f1d3a3..5fd7b086 100644 --- a/tests/utils.h +++ b/tests/utils.h @@ -35,6 +35,11 @@ struct vec4 float x, y, z, w; }; +struct ivec4 +{ + int x, y, z, w; +}; + struct uvec4 { unsigned int x, y, z, w;
1
0
0
0
Nikolay Sivov : vkd3d-shader/hlsl: Handle round() for SM1.
by Alexandre Julliard
03 Apr '23
03 Apr '23
Module: vkd3d Branch: master Commit: eb71c5f20dd0a141b35f04887cc81ff88b9db6ba URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/eb71c5f20dd0a141b35f04887cc81…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Mar 16 21:14:12 2023 +0100 vkd3d-shader/hlsl: Handle round() for SM1. --- libs/vkd3d-shader/hlsl_codegen.c | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 75ac2e64..6c529f19 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -1848,6 +1848,51 @@ static bool lower_abs(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, void *co return true; } +/* Lower ROUND using FRC, ROUND(x) -> ((x + 0.5) - FRC(x + 0.5)). */ +static bool lower_round(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, void *context) +{ + struct hlsl_ir_node *arg, *neg, *sum, *frc, *replacement; + struct hlsl_type *type = instr->data_type; + unsigned int i, component_count; + struct hlsl_ir_constant *half; + struct hlsl_ir_expr *expr; + + if (instr->type != HLSL_IR_EXPR) + return false; + + expr = hlsl_ir_expr(instr); + arg = expr->operands[0].node; + if (expr->op != HLSL_OP1_ROUND) + return false; + + if (!(half = hlsl_new_constant(ctx, type, &expr->node.loc))) + return false; + + component_count = hlsl_type_component_count(type); + for (i = 0; i < component_count; ++i) + half->value[i].f = 0.5f; + list_add_before(&instr->entry, &half->node.entry); + + if (!(sum = hlsl_new_binary_expr(ctx, HLSL_OP2_ADD, arg, &half->node))) + return false; + list_add_before(&instr->entry, &sum->entry); + + if (!(frc = hlsl_new_unary_expr(ctx, HLSL_OP1_FRACT, sum, instr->loc))) + return false; + list_add_before(&instr->entry, &frc->entry); + + if (!(neg = hlsl_new_unary_expr(ctx, HLSL_OP1_NEG, frc, instr->loc))) + return false; + list_add_before(&instr->entry, &neg->entry); + + if (!(replacement = hlsl_new_binary_expr(ctx, HLSL_OP2_ADD, sum, neg))) + return false; + list_add_before(&instr->entry, &replacement->entry); + + hlsl_replace_node(instr, replacement); + return true; +} + static bool lower_casts_to_bool(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, void *context) { struct hlsl_type *type = instr->data_type, *arg_type; @@ -3305,6 +3350,7 @@ int hlsl_emit_bytecode(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry transform_ir(ctx, lower_division, body, NULL); transform_ir(ctx, lower_sqrt, body, NULL); transform_ir(ctx, lower_dot, body, NULL); + transform_ir(ctx, lower_round, body, NULL); } if (profile->major_version < 2)
1
0
0
0
Conor McCarthy : tests: Release and then use a heap which contains resources.
by Alexandre Julliard
03 Apr '23
03 Apr '23
Module: vkd3d Branch: master Commit: c87a292f98172fb4b8ebf480f3809ed318faa249 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/c87a292f98172fb4b8ebf480f3809…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Mon Mar 27 16:36:27 2023 +1000 tests: Release and then use a heap which contains resources. The expected use case where a heap is freed before its contained resources is not reasonably testable, so the ability to place a new resource is tested instead. --- tests/d3d12.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 405c9419..890a65d5 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -2081,12 +2081,12 @@ done: static void test_create_placed_resource(void) { D3D12_GPU_VIRTUAL_ADDRESS gpu_address; + ID3D12Resource *resource, *resource2; D3D12_RESOURCE_DESC resource_desc; ID3D12Device *device, *tmp_device; D3D12_CLEAR_VALUE clear_value; D3D12_RESOURCE_STATES state; D3D12_HEAP_DESC heap_desc; - ID3D12Resource *resource; ID3D12Heap *heap; unsigned int i; ULONG refcount; @@ -2112,7 +2112,7 @@ static void test_create_placed_resource(void) return; } - heap_desc.SizeInBytes = D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT; + heap_desc.SizeInBytes = D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT * 2; memset(&heap_desc.Properties, 0, sizeof(heap_desc.Properties)); heap_desc.Properties.Type = D3D12_HEAP_TYPE_DEFAULT; heap_desc.Alignment = 0; @@ -2181,7 +2181,21 @@ static void test_create_placed_resource(void) &IID_ID3D12Resource, (void **)&resource); ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + /* Test heap peristence when its resource count is non-zero. */ + hr = ID3D12Device_CreatePlacedResource(device, heap, 0, + &resource_desc, D3D12_RESOURCE_STATE_COMMON, NULL, &IID_ID3D12Resource, (void **)&resource); + ok(hr == S_OK, "Failed to create placed resource, hr %#x.\n", hr); + ID3D12Heap_Release(heap); + refcount = get_refcount(heap); + ok(!refcount, "Got unexpected refcount %u.\n", (unsigned int)refcount); + + hr = ID3D12Device_CreatePlacedResource(device, heap, D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT, + &resource_desc, D3D12_RESOURCE_STATE_COMMON, NULL, &IID_ID3D12Resource, (void **)&resource2); + ok(hr == S_OK, "Failed to create placed resource, hr %#x.\n", hr); + + ID3D12Resource_Release(resource); + ID3D12Resource_Release(resource2); for (i = 0; i < ARRAY_SIZE(invalid_buffer_desc_tests); ++i) {
1
0
0
0
Conor McCarthy : vkd3d: Do not destroy a heap until its resource count is zero.
by Alexandre Julliard
03 Apr '23
03 Apr '23
Module: vkd3d Branch: master Commit: 88667098ebcf6b956e3902f9dce51e01dc0c6b2f URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/88667098ebcf6b956e3902f9dce51…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Mon Mar 27 16:30:43 2023 +1000 vkd3d: Do not destroy a heap until its resource count is zero. Fixes a crash on exit in Horizon Zero Dawn (which requres added SM 6.0 support). Placed resources should hold a reference to their heap:
https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12de…
--- libs/vkd3d/resource.c | 17 ++++++++++++++--- libs/vkd3d/vkd3d_private.h | 1 + 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 8c050cfe..79db6666 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -346,12 +346,19 @@ static ULONG STDMETHODCALLTYPE d3d12_heap_Release(ID3D12Heap *iface) TRACE("%p decreasing refcount to %u.\n", heap, refcount); - if (!refcount) + /* A heap must not be destroyed until all contained resources are destroyed. */ + if (!refcount && !heap->resource_count) d3d12_heap_destroy(heap); return refcount; } +static void d3d12_heap_resource_destroyed(struct d3d12_heap *heap) +{ + if (!InterlockedDecrement(&heap->resource_count) && (!heap->refcount || heap->is_private)) + d3d12_heap_destroy(heap); +} + static HRESULT STDMETHODCALLTYPE d3d12_heap_GetPrivateData(ID3D12Heap *iface, REFGUID guid, UINT *data_size, void *data) { @@ -561,6 +568,7 @@ static HRESULT d3d12_heap_init(struct d3d12_heap *heap, heap->ID3D12Heap_iface.lpVtbl = &d3d12_heap_vtbl; heap->refcount = 1; + heap->resource_count = 0; heap->is_private = !!resource; @@ -628,6 +636,8 @@ static HRESULT d3d12_heap_init(struct d3d12_heap *heap, heap->device = device; if (!heap->is_private) d3d12_device_add_ref(heap->device); + else + heap->resource_count = 1; return S_OK; } @@ -1027,8 +1037,8 @@ static void d3d12_resource_destroy(struct d3d12_resource *resource, struct d3d12 else VK_CALL(vkDestroyImage(device->vk_device, resource->u.vk_image, NULL)); - if (resource->flags & VKD3D_RESOURCE_DEDICATED_HEAP) - d3d12_heap_destroy(resource->heap); + if (resource->heap) + d3d12_heap_resource_destroyed(resource->heap); } static ULONG d3d12_resource_incref(struct d3d12_resource *resource) @@ -1941,6 +1951,7 @@ static HRESULT vkd3d_bind_heap_memory(struct d3d12_device *device, { resource->heap = heap; resource->heap_offset = heap_offset; + InterlockedIncrement(&heap->resource_count); } else { diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 075b67c2..1a277a47 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -563,6 +563,7 @@ struct d3d12_heap { ID3D12Heap ID3D12Heap_iface; LONG refcount; + LONG resource_count; bool is_private; D3D12_HEAP_DESC desc;
1
0
0
0
← Newer
1
...
78
79
80
81
82
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
71
72
73
74
75
76
77
78
79
80
81
82
Results per page:
10
25
50
100
200