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
March 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
910 discussions
Start a n
N
ew thread
Rémi Bernon : dinput: Call enum_objects to initialize the device object format.
by Alexandre Julliard
20 Mar '23
20 Mar '23
Module: wine Branch: master Commit: 44cb6c8444e8b0030b80c6b7953e9fc9f460461d URL:
https://gitlab.winehq.org/wine/wine/-/commit/44cb6c8444e8b0030b80c6b7953e9f…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Mar 20 08:38:53 2023 +0100 dinput: Call enum_objects to initialize the device object format. --- dlls/dinput/device.c | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index df19f615a55..407e4f52a38 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -2183,11 +2183,15 @@ static const GUID *object_instance_guid( const DIDEVICEOBJECTINSTANCEW *instance return &GUID_Unknown; } -static BOOL CALLBACK enum_objects_count( const DIDEVICEOBJECTINSTANCEW *instance, void *data ) +static BOOL enum_objects_count( struct dinput_device *impl, UINT index, struct hid_value_caps *caps, + const DIDEVICEOBJECTINSTANCEW *instance, void *data ) { - struct dinput_device *impl = impl_from_IDirectInputDevice8W( data ); DIDATAFORMAT *format = &impl->device_format; + if (index == -1) return DIENUM_STOP; + format->dwNumObjs++; + if (instance->wUsagePage == HID_USAGE_PAGE_PID) return DIENUM_CONTINUE; + format->dwDataSize = max( format->dwDataSize, instance->dwOfs + sizeof(LONG) ); if (instance->dwType & DIDFT_BUTTON) impl->caps.dwButtons++; if (instance->dwType & DIDFT_AXIS) impl->caps.dwAxes++; @@ -2200,36 +2204,46 @@ static BOOL CALLBACK enum_objects_count( const DIDEVICEOBJECTINSTANCEW *instance FIXME( "multiple device state reports found!\n" ); } - format->dwNumObjs++; return DIENUM_CONTINUE; } -static BOOL CALLBACK enum_objects_init( const DIDEVICEOBJECTINSTANCEW *instance, void *data ) +static BOOL enum_objects_init( struct dinput_device *impl, UINT index, struct hid_value_caps *caps, + const DIDEVICEOBJECTINSTANCEW *instance, void *data ) { - struct dinput_device *impl = impl_from_IDirectInputDevice8W( data ); DIDATAFORMAT *format = &impl->device_format; DIOBJECTDATAFORMAT *object_format; - object_format = format->rgodf + format->dwNumObjs; + if (index == -1) return DIENUM_STOP; + if (instance->wUsagePage == HID_USAGE_PAGE_PID) return DIENUM_CONTINUE; + + object_format = format->rgodf + index; object_format->pguid = object_instance_guid( instance ); object_format->dwOfs = instance->dwOfs; object_format->dwType = instance->dwType; object_format->dwFlags = instance->dwFlags; if (impl->object_properties && (instance->dwType & (DIDFT_AXIS | DIDFT_POV))) - reset_object_value( impl, format->dwNumObjs, NULL, instance, NULL ); + reset_object_value( impl, index, caps, instance, NULL ); - format->dwNumObjs++; return DIENUM_CONTINUE; } HRESULT dinput_device_init_device_format( IDirectInputDevice8W *iface ) { + static const DIPROPHEADER filter = + { + .dwSize = sizeof(filter), + .dwHeaderSize = sizeof(filter), + .dwHow = DIPH_DEVICE, + }; struct dinput_device *impl = impl_from_IDirectInputDevice8W( iface ); DIDATAFORMAT *format = &impl->device_format; ULONG i, size; + HRESULT hr; + + hr = impl->vtbl->enum_objects( iface, &filter, DIDFT_ALL, enum_objects_count, NULL ); + if (FAILED(hr)) return hr; - IDirectInputDevice8_EnumObjects( iface, enum_objects_count, iface, DIDFT_ALL ); if (format->dwDataSize > DEVICE_STATE_MAX_SIZE) { FIXME( "unable to create device, state is too large\n" ); @@ -2242,8 +2256,15 @@ HRESULT dinput_device_init_device_format( IDirectInputDevice8W *iface ) format->dwSize = sizeof(*format); format->dwObjSize = sizeof(*format->rgodf); format->dwFlags = DIDF_ABSAXIS; - format->dwNumObjs = 0; - IDirectInputDevice8_EnumObjects( iface, enum_objects_init, iface, DIDFT_ALL ); + + hr = impl->vtbl->enum_objects( iface, &filter, DIDFT_AXIS, enum_objects_init, NULL ); + if (FAILED(hr)) return hr; + hr = impl->vtbl->enum_objects( iface, &filter, DIDFT_POV, enum_objects_init, NULL ); + if (FAILED(hr)) return hr; + hr = impl->vtbl->enum_objects( iface, &filter, DIDFT_BUTTON, enum_objects_init, NULL ); + if (FAILED(hr)) return hr; + hr = impl->vtbl->enum_objects( iface, &filter, DIDFT_NODATA, enum_objects_init, NULL ); + if (FAILED(hr)) return hr; if (TRACE_ON( dinput )) {
1
0
0
0
Rémi Bernon : dinput: Split enum_objects_count helper from enum_objects_init.
by Alexandre Julliard
20 Mar '23
20 Mar '23
Module: wine Branch: master Commit: 570e183b4153db8e701ea1ed1c6ec468b527cb4d URL:
https://gitlab.winehq.org/wine/wine/-/commit/570e183b4153db8e701ea1ed1c6ec4…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Mar 19 14:48:18 2023 +0100 dinput: Split enum_objects_count helper from enum_objects_init. --- dlls/dinput/device.c | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 7fa2a89cf35..df19f615a55 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -2183,35 +2183,39 @@ static const GUID *object_instance_guid( const DIDEVICEOBJECTINSTANCEW *instance return &GUID_Unknown; } -static BOOL CALLBACK enum_objects_init( const DIDEVICEOBJECTINSTANCEW *instance, void *data ) +static BOOL CALLBACK enum_objects_count( const DIDEVICEOBJECTINSTANCEW *instance, void *data ) { struct dinput_device *impl = impl_from_IDirectInputDevice8W( data ); DIDATAFORMAT *format = &impl->device_format; - DIOBJECTDATAFORMAT *obj_format; - if (!format->rgodf) + format->dwDataSize = max( format->dwDataSize, instance->dwOfs + sizeof(LONG) ); + if (instance->dwType & DIDFT_BUTTON) impl->caps.dwButtons++; + if (instance->dwType & DIDFT_AXIS) impl->caps.dwAxes++; + if (instance->dwType & DIDFT_POV) impl->caps.dwPOVs++; + if (instance->dwType & (DIDFT_BUTTON|DIDFT_AXIS|DIDFT_POV)) { - format->dwDataSize = max( format->dwDataSize, instance->dwOfs + sizeof(LONG) ); - if (instance->dwType & DIDFT_BUTTON) impl->caps.dwButtons++; - if (instance->dwType & DIDFT_AXIS) impl->caps.dwAxes++; - if (instance->dwType & DIDFT_POV) impl->caps.dwPOVs++; - if (instance->dwType & (DIDFT_BUTTON|DIDFT_AXIS|DIDFT_POV)) - { - if (!impl->device_state_report_id) - impl->device_state_report_id = instance->wReportId; - else if (impl->device_state_report_id != instance->wReportId) - FIXME( "multiple device state reports found!\n" ); - } - } - else - { - obj_format = format->rgodf + format->dwNumObjs; - obj_format->pguid = object_instance_guid( instance ); - obj_format->dwOfs = instance->dwOfs; - obj_format->dwType = instance->dwType; - obj_format->dwFlags = instance->dwFlags; + if (!impl->device_state_report_id) + impl->device_state_report_id = instance->wReportId; + else if (impl->device_state_report_id != instance->wReportId) + FIXME( "multiple device state reports found!\n" ); } + format->dwNumObjs++; + return DIENUM_CONTINUE; +} + +static BOOL CALLBACK enum_objects_init( const DIDEVICEOBJECTINSTANCEW *instance, void *data ) +{ + struct dinput_device *impl = impl_from_IDirectInputDevice8W( data ); + DIDATAFORMAT *format = &impl->device_format; + DIOBJECTDATAFORMAT *object_format; + + object_format = format->rgodf + format->dwNumObjs; + object_format->pguid = object_instance_guid( instance ); + object_format->dwOfs = instance->dwOfs; + object_format->dwType = instance->dwType; + object_format->dwFlags = instance->dwFlags; + if (impl->object_properties && (instance->dwType & (DIDFT_AXIS | DIDFT_POV))) reset_object_value( impl, format->dwNumObjs, NULL, instance, NULL ); @@ -2225,7 +2229,7 @@ HRESULT dinput_device_init_device_format( IDirectInputDevice8W *iface ) DIDATAFORMAT *format = &impl->device_format; ULONG i, size; - IDirectInputDevice8_EnumObjects( iface, enum_objects_init, iface, DIDFT_ALL ); + IDirectInputDevice8_EnumObjects( iface, enum_objects_count, iface, DIDFT_ALL ); if (format->dwDataSize > DEVICE_STATE_MAX_SIZE) { FIXME( "unable to create device, state is too large\n" );
1
0
0
0
Rémi Bernon : dinput: Pass additional information to enum_object callback.
by Alexandre Julliard
20 Mar '23
20 Mar '23
Module: wine Branch: master Commit: 1cda1509731a42b6c0913a3eaa47d584135057cb URL:
https://gitlab.winehq.org/wine/wine/-/commit/1cda1509731a42b6c0913a3eaa47d5…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Mar 20 15:27:48 2023 +0100 dinput: Pass additional information to enum_object callback. --- dlls/dinput/device.c | 51 +++++++++++++++-------- dlls/dinput/device_private.h | 8 +++- dlls/dinput/joystick_hid.c | 96 ++++++++++++++++++-------------------------- dlls/dinput/keyboard.c | 18 ++++----- dlls/dinput/mouse.c | 15 +++---- 5 files changed, 97 insertions(+), 91 deletions(-)
1
0
0
0
Rémi Bernon : dinput: Pass device object format index to queue_event.
by Alexandre Julliard
20 Mar '23
20 Mar '23
Module: wine Branch: master Commit: 1e594b1c0fd23c1aedc13b3c2d8c91c1fc00f8ee URL:
https://gitlab.winehq.org/wine/wine/-/commit/1e594b1c0fd23c1aedc13b3c2d8c91…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Mar 20 15:07:46 2023 +0100 dinput: Pass device object format index to queue_event. --- dlls/dinput/device.c | 61 +++++++++++++++++++---------- dlls/dinput/device_private.h | 3 +- dlls/dinput/joystick_hid.c | 10 +++-- dlls/dinput/keyboard.c | 8 ++-- dlls/dinput/mouse.c | 91 +++++++++++++++++++------------------------- 5 files changed, 92 insertions(+), 81 deletions(-)
1
0
0
0
Rémi Bernon : dinput: Rewrite IDirectInputDevice8W_BuildActionMap.
by Alexandre Julliard
20 Mar '23
20 Mar '23
Module: wine Branch: master Commit: 7b3f3d60782c63edd621353a635616f4cea029da URL:
https://gitlab.winehq.org/wine/wine/-/commit/7b3f3d60782c63edd621353a635616…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Mar 20 16:07:36 2023 +0100 dinput: Rewrite IDirectInputDevice8W_BuildActionMap. --- dlls/dinput/device.c | 139 +++++++++++++++++++++--------------------- dlls/dinput/tests/joystick8.c | 79 +++++------------------- 2 files changed, 84 insertions(+), 134 deletions(-)
1
0
0
0
Francois Gouget : mscoree/tests: Avoid temporary directory name collisions.
by Alexandre Julliard
20 Mar '23
20 Mar '23
Module: wine Branch: master Commit: c11e923422f40ab0ee5e512d81cb14c85faff6a5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c11e923422f40ab0ee5e512d81cb14…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Sun Mar 19 20:07:33 2023 +0100 mscoree/tests: Avoid temporary directory name collisions. test_loadpaths_execute() was sometimes getting ERROR_ALREADY_EXISTS when creating its temporary directoryi. That was probably because GetTempFileNameW() only uses the low 16-bits of the 'random' LUID which goes over a wider range, potentially leading to collisions in the lower 16-bits. Avoid AllocateLocallyUniqueId() entirely and add a helper function to create a guaranteed new directory. Also try to use the current directory first as it is assumed to have been configured to ward off anti-virus programs (specifically Microsoft Defender) which is especially important when writing executables to that location. Only switch to the system's temporary directory if the current directory is not a writable location. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54560
--- dlls/mscoree/tests/mscoree.c | 55 +++++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/dlls/mscoree/tests/mscoree.c b/dlls/mscoree/tests/mscoree.c index e5065a41d88..adac72e5f4c 100644 --- a/dlls/mscoree/tests/mscoree.c +++ b/dlls/mscoree/tests/mscoree.c @@ -592,25 +592,55 @@ static BOOL compile_cs(const WCHAR *source, const WCHAR *target, const WCHAR *ty return ret; } +static BOOL create_new_dir(WCHAR newdir[MAX_PATH], const WCHAR* parent, + const WCHAR* prefix) +{ + WCHAR path[MAX_PATH]; + BOOL try_tmpdir = TRUE; + static unsigned i = 0; + + if (!parent) + { + GetCurrentDirectoryW(ARRAY_SIZE(path), path); + parent = path; + } + while (1) + { + swprintf(newdir, MAX_PATH, L"%s\\%s%04d", path, prefix, i); + if (CreateDirectoryW(newdir, NULL)) + return TRUE; + switch (GetLastError()) + { + case ERROR_ACCESS_DENIED: + if (!try_tmpdir) + return FALSE; + try_tmpdir = FALSE; + GetTempPathW(ARRAY_SIZE(path), path); + path[wcslen(path) - 1] = 0; /* redundant trailing backslash */ + parent = path; + break; + case ERROR_ALREADY_EXISTS: + i++; + break; + default: + return FALSE; + } + } +} + static void test_loadpaths_execute(const WCHAR *exe_name, const WCHAR *dll_name, const WCHAR *cfg_name, const WCHAR *dll_dest, BOOL expect_failure, BOOL todo) { - WCHAR tmp[MAX_PATH], tmpdir[MAX_PATH], tmpexe[MAX_PATH], tmpcfg[MAX_PATH], tmpdll[MAX_PATH]; + WCHAR tmpdir[MAX_PATH], tmpexe[MAX_PATH], tmpcfg[MAX_PATH], tmpdll[MAX_PATH]; PROCESS_INFORMATION pi; STARTUPINFOW si = { 0 }; WCHAR *ptr, *end; DWORD exit_code = 0xdeadbeef; - LUID id; BOOL ret; - GetTempPathW(MAX_PATH, tmp); - ret = AllocateLocallyUniqueId(&id); - ok(ret, "AllocateLocallyUniqueId failed: %lu\n", GetLastError()); - ret = GetTempFileNameW(tmp, L"loadpaths", id.LowPart, tmpdir); - ok(ret, "GetTempFileNameW failed: %lu\n", GetLastError()); - - ret = CreateDirectoryW(tmpdir, NULL); - ok(ret, "CreateDirectoryW(%s) failed: %lu\n", debugstr_w(tmpdir), GetLastError()); + ok(create_new_dir(tmpdir, NULL, L"loadpaths"), + "failed to create a new dir %lu\n", GetLastError()); + end = tmpdir + wcslen(tmpdir); wcscpy(tmpexe, tmpdir); PathAppendW(tmpexe, exe_name); @@ -673,9 +703,8 @@ static void test_loadpaths_execute(const WCHAR *exe_name, const WCHAR *dll_name, ret = DeleteFileW(tmpexe); ok(ret, "DeleteFileW(%s) failed: %lu\n", debugstr_w(tmpexe), GetLastError()); - end = tmpdir + wcslen(tmp); - ptr = tmpdir + wcslen(tmpdir) - 1; - while (ptr > end && (ptr = wcsrchr(tmpdir, '\\'))) + ptr = end; + while (ptr >= end && (ptr = wcsrchr(tmpdir, '\\'))) { ret = RemoveDirectoryW(tmpdir); ok(ret, "RemoveDirectoryW(%s) failed: %lu\n", debugstr_w(tmpdir), GetLastError());
1
0
0
0
Nikolay Sivov : d3d10/effect: Add support for udiv instruction.
by Alexandre Julliard
20 Mar '23
20 Mar '23
Module: wine Branch: master Commit: 19b799fd628a404ca8977cac7caf08fce2ebffaf URL:
https://gitlab.winehq.org/wine/wine/-/commit/19b799fd628a404ca8977cac7caf08…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Mar 18 21:14:52 2023 +0100 d3d10/effect: Add support for udiv instruction. --- dlls/d3d10/effect.c | 25 ++++ dlls/d3d10/tests/effect.c | 300 +++++++++++++++++++++++++--------------------- 2 files changed, 186 insertions(+), 139 deletions(-)
1
0
0
0
Nikolay Sivov : d3d10/effect: Add support for imax instruction.
by Alexandre Julliard
20 Mar '23
20 Mar '23
Module: wine Branch: master Commit: c96c6b9826a9f8807441ac3ef8da2016eb9ca55d URL:
https://gitlab.winehq.org/wine/wine/-/commit/c96c6b9826a9f8807441ac3ef8da20…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Mar 18 21:09:08 2023 +0100 d3d10/effect: Add support for imax instruction. --- dlls/d3d10/effect.c | 14 ++++++++ dlls/d3d10/tests/effect.c | 87 ++++++++++++++++++++++++----------------------- 2 files changed, 59 insertions(+), 42 deletions(-)
1
0
0
0
Nikolay Sivov : d3d10/effect: Add support for ineg instruction.
by Alexandre Julliard
20 Mar '23
20 Mar '23
Module: wine Branch: master Commit: 8e2412fcc3feea85c71d2274cf2a6eab05b3d3f4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8e2412fcc3feea85c71d2274cf2a6e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Mar 18 20:59:37 2023 +0100 d3d10/effect: Add support for ineg instruction. --- dlls/d3d10/effect.c | 14 ++++++++++++++ dlls/d3d10/tests/effect.c | 29 +++++++++++++++-------------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 142ba7bec72..d61c94c982f 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -252,6 +252,19 @@ static void pres_cos(float **args, unsigned int n, const struct preshader_instr retval[i] = cos(args[0][i]); } +static void pres_ineg(float **args, unsigned int n, const struct preshader_instr *instr) +{ + int *arg1 = (int *)args[0]; + float *retval = args[1]; + unsigned int i; + + for (i = 0; i < instr->comp_count; ++i) + { + int v = -arg1[i]; + retval[i] = *(float *)&v; + } +} + static void pres_itof(float **args, unsigned int n, const struct preshader_instr *instr) { float *retval = args[1]; @@ -344,6 +357,7 @@ static const struct preshader_op_info preshader_ops[] = { 0x104, "frc", pres_frc }, { 0x108, "sin", pres_sin }, { 0x109, "cos", pres_cos }, + { 0x120, "ineg", pres_ineg }, { 0x130, "itof", pres_itof }, { 0x133, "ftou", pres_ftou }, { 0x137, "ftob", pres_ftob }, diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index 5a265adc07a..a39c15601c1 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -8182,15 +8182,15 @@ technique10 tech } pass p8 { - SetBlendState( NULL, 0.1 * g_var3.x, 0 ); + SetBlendState( NULL, 0.1 * -g_var3.x, 0 ); } } #endif static DWORD fx_test_value_expression[] = { - 0x43425844, 0xd57994e8, 0xc1f47b80, 0x5ab836c5, 0x02ff0a6e, 0x00000001, 0x000012c0, 0x00000001, - 0x00000024, 0x30315846, 0x00001294, 0xfeff1001, 0x00000001, 0x00000003, 0x00000001, 0x00000000, - 0x00000000, 0x00000000, 0x00000001, 0x00000f8c, 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x43425844, 0xa151a4d6, 0x36eec21c, 0xfbe6ea0f, 0xb267f68f, 0x00000001, 0x000012e0, 0x00000001, + 0x00000024, 0x30315846, 0x000012b4, 0xfeff1001, 0x00000001, 0x00000003, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000fac, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x6f6c4724, 0x736c6162, 0x6f6c6600, 0x00347461, 0x0000000d, 0x00000001, 0x00000000, 0x00000010, 0x00000010, 0x00000010, 0x0000210a, 0x61765f67, 0x5f670072, 0x32726176, 0x746e6900, 0x003d0034, 0x00010000, @@ -8301,20 +8301,21 @@ static DWORD fx_test_value_expression[] = 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x31207265, 0x00312e30, 0x494c43ab, 0x00000434, 0x00000000, 0x4c584600, 0x00003043, 0x00000100, 0x40000400, 0x00000110, 0x00000000, 0x00000200, 0x00000000, 0x00000000, 0x00000400, 0x00000000, 0xf0f0f000, 0x0f0f0ff0, 0x00ffff0f, - 0x00000100, 0x00000200, 0x00000000, 0x00000100, 0x00000200, 0x00000000, 0x00387000, 0x000001ac, - 0x43425844, 0x56d4ee7a, 0x14d0efda, 0x7f2a38e0, 0x183b28f2, 0x00000001, 0x000001ac, 0x00000003, + 0x00000100, 0x00000200, 0x00000000, 0x00000100, 0x00000200, 0x00000000, 0x00387000, 0x000001cc, + 0x43425844, 0xe22c15f6, 0xc12fca9e, 0x201275ad, 0x6952a463, 0x00000001, 0x000001cc, 0x00000003, 0x0000002c, 0x000000a8, 0x000000c4, 0x42415443, 0x00000074, 0x0000001c, 0x0000004b, 0x46580400, 0x00000001, 0x0000001c, 0x00000100, 0x00000048, 0x00000030, 0x00000002, 0x00000001, 0x00000038, 0x00000000, 0x61765f67, 0xab003372, 0x00020001, 0x00040001, 0x00000001, 0x00000000, 0x4d007874, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x30312072, 0xab00312e, 0x34494c43, 0x00000014, 0x00000004, 0x3dcccccd, 0x00000000, 0x00000000, - 0x00000000, 0x434c5846, 0x000000e0, 0x00000005, 0x13000001, 0x00000001, 0x00000000, 0x00000002, - 0x00000000, 0x00000000, 0x00000007, 0x00000000, 0x20500001, 0x00000002, 0x00000000, 0x00000007, - 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x20500001, - 0x00000002, 0x00000000, 0x00000007, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, - 0x00000004, 0x00000001, 0x20500001, 0x00000002, 0x00000000, 0x00000007, 0x00000000, 0x00000000, + 0x00000000, 0x434c5846, 0x00000100, 0x00000006, 0x12000001, 0x00000001, 0x00000000, 0x00000002, + 0x00000000, 0x00000000, 0x00000007, 0x00000000, 0x13000001, 0x00000001, 0x00000000, 0x00000007, + 0x00000000, 0x00000000, 0x00000007, 0x00000004, 0x20500001, 0x00000002, 0x00000000, 0x00000007, + 0x00000004, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x20500001, + 0x00000002, 0x00000000, 0x00000007, 0x00000004, 0x00000000, 0x00000001, 0x00000000, 0x00000000, + 0x00000004, 0x00000001, 0x20500001, 0x00000002, 0x00000000, 0x00000007, 0x00000004, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000002, 0x20500001, 0x00000002, 0x00000000, - 0x00000007, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000003, + 0x00000007, 0x00000004, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000004, 0x00000003, 0xf0f0f0f0, 0x0f0f0f0f, 0x0000ffff, 0x00000001, 0x00000002, 0x00000000, 0x00000001, 0x00000002, 0x00000000, 0x00000004, 0x00000030, 0x00000000, 0x00000003, 0xffffffff, 0x00000000, 0x00000030, 0x00000014, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000036, 0x00000014, @@ -8337,7 +8338,7 @@ static DWORD fx_test_value_expression[] = 0x00000001, 0x00000caa, 0x00000cb6, 0x00000003, 0x00000000, 0x0000000a, 0x00000000, 0x00000006, 0x00000cb9, 0x0000000b, 0x00000000, 0x00000001, 0x00000da9, 0x00000002, 0x00000000, 0x00000001, 0x00000db5, 0x00000dc1, 0x00000003, 0x00000000, 0x0000000a, 0x00000000, 0x00000006, 0x00000dc4, - 0x0000000b, 0x00000000, 0x00000001, 0x00000f74, 0x00000002, 0x00000000, 0x00000001, 0x00000f80, + 0x0000000b, 0x00000000, 0x00000001, 0x00000f94, 0x00000002, 0x00000000, 0x00000001, 0x00000fa0, }; static float get_frc(float v) @@ -8525,7 +8526,7 @@ static void test_effect_value_expression(void) pass = t->lpVtbl->GetPassByName(t, "p8"); ok(pass->lpVtbl->IsValid(pass), "Expected valid pass.\n"); - f[0] = 2.0f; + f[0] = -2.0f; hr = g_var3->lpVtbl->SetFloatVector(g_var3, f); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1
0
0
0
Nikolay Sivov : d3d10/effect: Add support for itof instruction.
by Alexandre Julliard
20 Mar '23
20 Mar '23
Module: wine Branch: master Commit: cbc25006388af5c729ff459792630d2598549450 URL:
https://gitlab.winehq.org/wine/wine/-/commit/cbc25006388af5c729ff459792630d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Mar 18 20:53:50 2023 +0100 d3d10/effect: Add support for itof instruction. --- dlls/d3d10/effect.c | 10 ++ dlls/d3d10/tests/effect.c | 305 ++++++++++++++++++++++++++-------------------- 2 files changed, 185 insertions(+), 130 deletions(-)
1
0
0
0
← Newer
1
...
43
44
45
46
47
48
49
...
91
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
83
84
85
86
87
88
89
90
91
Results per page:
10
25
50
100
200