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
February 2022
----- 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
1495 discussions
Start a n
N
ew thread
Piotr Caban : msvcr100/tests: Build without -DWINE_NO_LONG_TYPES.
by Alexandre Julliard
14 Feb '22
14 Feb '22
Module: wine Branch: master Commit: 52f7dcc5558e056a9104e1ec12baaee5e469acb5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=52f7dcc5558e056a9104e1ec…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Feb 11 23:18:47 2022 +0100 msvcr100/tests: Build without -DWINE_NO_LONG_TYPES. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcr100/tests/Makefile.in | 1 - dlls/msvcr100/tests/msvcr100.c | 26 +++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/dlls/msvcr100/tests/Makefile.in b/dlls/msvcr100/tests/Makefile.in index bcb6d6fd13c..a7652df38d2 100644 --- a/dlls/msvcr100/tests/Makefile.in +++ b/dlls/msvcr100/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = msvcr100.dll C_SRCS = \ diff --git a/dlls/msvcr100/tests/msvcr100.c b/dlls/msvcr100/tests/msvcr100.c index bdd44fa405a..4319f31a400 100644 --- a/dlls/msvcr100/tests/msvcr100.c +++ b/dlls/msvcr100/tests/msvcr100.c @@ -66,7 +66,7 @@ static void __cdecl test_invalid_parameter_handler(const wchar_t *expression, ok(function == NULL, "function is not NULL\n"); ok(file == NULL, "file is not NULL\n"); ok(line == 0, "line = %u\n", line); - ok(arg == 0, "arg = %lx\n", (UINT_PTR)arg); + ok(arg == 0, "arg = %Ix\n", arg); } #ifdef __i386__ @@ -251,7 +251,7 @@ static BOOL init(void) SetLastError(0xdeadbeef); hcrt = LoadLibraryA("msvcr100.dll"); if (!hcrt) { - win_skip("msvcr100.dll not installed (got %d)\n", GetLastError()); + win_skip("msvcr100.dll not installed (got %ld)\n", GetLastError()); return FALSE; } @@ -691,34 +691,34 @@ static void test__SpinWait(void) CHECK_CALLED(yield_func); ul = call_func1(pSpinWait__NumberOfSpins, &sp); - ok(ul == 1, "_SpinWait::_NumberOfSpins returned %u\n", ul); + ok(ul == 1, "_SpinWait::_NumberOfSpins returned %lu\n", ul); sp.spin = 2; b = call_func1(pSpinWait__ShouldSpinAgain, &sp); ok(b, "_SpinWait::_ShouldSpinAgain returned %x\n", b); - ok(sp.spin == 1, "sp.spin = %u\n", sp.spin); + ok(sp.spin == 1, "sp.spin = %lu\n", sp.spin); b = call_func1(pSpinWait__ShouldSpinAgain, &sp); ok(!b, "_SpinWait::_ShouldSpinAgain returned %x\n", b); - ok(sp.spin == 0, "sp.spin = %u\n", sp.spin); + ok(sp.spin == 0, "sp.spin = %lu\n", sp.spin); b = call_func1(pSpinWait__ShouldSpinAgain, &sp); ok(b, "_SpinWait::_ShouldSpinAgain returned %x\n", b); - ok(sp.spin == -1, "sp.spin = %u\n", sp.spin); + ok(sp.spin == -1, "sp.spin = %lu\n", sp.spin); call_func2(pSpinWait__SetSpinCount, &sp, 2); b = call_func1(pSpinWait__SpinOnce, &sp); ok(b, "_SpinWait::_SpinOnce returned %x\n", b); - ok(sp.spin == 1, "sp.spin = %u\n", sp.spin); + ok(sp.spin == 1, "sp.spin = %lu\n", sp.spin); b = call_func1(pSpinWait__SpinOnce, &sp); ok(b, "_SpinWait::_SpinOnce returned %x\n", b); - ok(sp.spin == 0, "sp.spin = %u\n", sp.spin); + ok(sp.spin == 0, "sp.spin = %lu\n", sp.spin); SET_EXPECT(yield_func); b = call_func1(pSpinWait__SpinOnce, &sp); ok(b, "_SpinWait::_SpinOnce returned %x\n", b); - ok(sp.spin == 0, "sp.spin = %u\n", sp.spin); + ok(sp.spin == 0, "sp.spin = %lu\n", sp.spin); CHECK_CALLED(yield_func); b = call_func1(pSpinWait__SpinOnce, &sp); ok(!b, "_SpinWait::_SpinOnce returned %x\n", b); - ok(sp.spin==0 || sp.spin==4000, "sp.spin = %u\n", sp.spin); + ok(sp.spin==0 || sp.spin==4000, "sp.spin = %lu\n", sp.spin); call_func1(pSpinWait_dtor, &sp); } @@ -763,7 +763,7 @@ static void test_reader_writer_lock(void) call_func1(preader_writer_lock_lock, rw_lock); thread = CreateThread(NULL, 0, lock_read_thread, rw_lock, 0, NULL); - ok(thread != NULL, "CreateThread failed: %d\n", GetLastError()); + ok(thread != NULL, "CreateThread failed: %ld\n", GetLastError()); WaitForSingleObject(thread, INFINITE); ok(GetExitCodeThread(thread, &d), "GetExitCodeThread failed\n"); ok(!d, "reader_writer_lock::try_lock_read succeeded on already locked object\n"); @@ -772,7 +772,7 @@ static void test_reader_writer_lock(void) call_func1(preader_writer_lock_lock_read, rw_lock); thread = CreateThread(NULL, 0, lock_read_thread, rw_lock, 0, NULL); - ok(thread != NULL, "CreateThread failed: %d\n", GetLastError()); + ok(thread != NULL, "CreateThread failed: %ld\n", GetLastError()); WaitForSingleObject(thread, INFINITE); ok(GetExitCodeThread(thread, &d), "GetExitCodeThread failed\n"); ok(d, "reader_writer_lock::try_lock_read failed on object locked for reading\n"); @@ -951,7 +951,7 @@ static void test_ExternalContextBase(void) ok(id == 0, "Context::Id() = %u\n", id); thread = CreateThread(NULL, 0, external_context_thread, NULL, 0, NULL); - ok(thread != NULL, "CreateThread failed: %d\n", GetLastError()); + ok(thread != NULL, "CreateThread failed: %ld\n", GetLastError()); WaitForSingleObject(thread, INFINITE); CloseHandle(thread); }
1
0
0
0
Piotr Caban : msvcp90/tests: Build without -DWINE_NO_LONG_TYPES.
by Alexandre Julliard
14 Feb '22
14 Feb '22
Module: wine Branch: master Commit: 61da3277c4682d1540f79b6f9fa3730862a55052 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=61da3277c4682d1540f79b6f…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Feb 11 23:18:34 2022 +0100 msvcp90/tests: Build without -DWINE_NO_LONG_TYPES. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp90/tests/Makefile.in | 1 - dlls/msvcp90/tests/ios.c | 14 +++++++------- dlls/msvcp90/tests/misc.c | 8 ++++---- dlls/msvcp90/tests/string.c | 2 +- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/dlls/msvcp90/tests/Makefile.in b/dlls/msvcp90/tests/Makefile.in index ad6f6a0ecf0..3dfaf0b303e 100644 --- a/dlls/msvcp90/tests/Makefile.in +++ b/dlls/msvcp90/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = msvcp90.dll C_SRCS = \ diff --git a/dlls/msvcp90/tests/ios.c b/dlls/msvcp90/tests/ios.c index 994420dd229..b17e8f88a4d 100644 --- a/dlls/msvcp90/tests/ios.c +++ b/dlls/msvcp90/tests/ios.c @@ -566,7 +566,7 @@ static void __cdecl test_invalid_parameter_handler(const wchar_t *expression, ok(function == NULL, "function is not NULL\n"); ok(file == NULL, "file is not NULL\n"); ok(line == 0, "line = %u\n", line); - ok(arg == 0, "arg = %lx\n", (UINT_PTR)arg); + ok(arg == 0, "arg = %Ix\n", arg); invalid_parameter++; } @@ -1922,9 +1922,9 @@ static void test_istream_tellg(void) call_func2_ptr_fpos(p_basic_istream_char_seekg_fpos, &ss.base.base1, spos); rpos = call_func2(p_basic_istream_char_tellg, &ss.base.base1, &tpos); - ok(tests[i].telloff_ss == tpos.off, "wrong offset, expected = %ld found = %ld\n", tests[i].telloff_ss, tpos.off); + ok(tests[i].telloff_ss == tpos.off, "wrong offset, expected = %Id found = %Id\n", tests[i].telloff_ss, tpos.off); if (tests[i].telloff_ss != -1 && spos.off != -1) /* check if tell == seek but only if not hit EOF */ - ok(spos.off == tpos.off, "tell doesn't match seek, seek = %ld tell = %ld\n", spos.off, tpos.off); + ok(spos.off == tpos.off, "tell doesn't match seek, seek = %Id tell = %Id\n", spos.off, tpos.off); ok(rpos == &tpos, "wrong return fpos, expected = %p found = %p\n", rpos, &tpos); ok(tpos.pos == 0, "wrong position, expected = 0 found = %s\n", wine_dbgstr_longlong(tpos.pos)); ok(tpos.state == 0, "wrong state, expected = 0 found = %d\n", tpos.state); @@ -1953,9 +1953,9 @@ static void test_istream_tellg(void) call_func2_ptr_fpos(p_basic_istream_wchar_seekg_fpos, &wss.base.base1, spos); rpos = call_func2(p_basic_istream_wchar_tellg, &wss.base.base1, &tpos); - ok(tests[i].telloff_ss == tpos.off, "wrong offset, expected = %ld found = %ld\n", tests[i].telloff_ss, tpos.off); + ok(tests[i].telloff_ss == tpos.off, "wrong offset, expected = %Id found = %Id\n", tests[i].telloff_ss, tpos.off); if (tests[i].telloff_ss != -1 && spos.off != -1) /* check if tell == seek but only if not hit EOF */ - ok(spos.off == tpos.off, "tell doesn't match seek, seek = %ld tell = %ld\n", spos.off, tpos.off); + ok(spos.off == tpos.off, "tell doesn't match seek, seek = %Id tell = %Id\n", spos.off, tpos.off); ok(rpos == &tpos, "wrong return fpos, expected = %p found = %p\n", rpos, &tpos); ok(tpos.pos == 0, "wrong position, expected = 0 found = %s\n", wine_dbgstr_longlong(tpos.pos)); ok(tpos.state == 0, "wrong state, expected = 0 found = %d\n", tpos.state); @@ -1990,7 +1990,7 @@ static void test_istream_tellg(void) ok(tests[i].tellpos == tpos.pos, "wrong filepos, expected = %s found = %s\n", wine_dbgstr_longlong(tests[i].tellpos), wine_dbgstr_longlong(tpos.pos)); ok(rpos == &tpos, "wrong return fpos, expected = %p found = %p\n", rpos, &tpos); - ok(tpos.off == tests[i].telloff_fs, "wrong offset, expected %ld found %ld\n", tests[i].telloff_fs, tpos.off); + ok(tpos.off == tests[i].telloff_fs, "wrong offset, expected %Id found %Id\n", tests[i].telloff_fs, tpos.off); ok(tpos.state == 0, "wrong state, expected = 0 found = %d\n", tpos.state); call_func1(p_basic_fstream_char_vbase_dtor, &fs); @@ -2013,7 +2013,7 @@ static void test_istream_tellg(void) ok(tests[i].tellpos == tpos.pos, "wrong filepos, expected = %s found = %s\n", wine_dbgstr_longlong(tests[i].tellpos), wine_dbgstr_longlong(tpos.pos)); ok(rpos == &tpos, "wrong return fpos, expected = %p found = %p\n", rpos, &tpos); - ok(tpos.off == tests[i].telloff_fs, "wrong offset, expected %ld found %ld\n", tests[i].telloff_fs, tpos.off); + ok(tpos.off == tests[i].telloff_fs, "wrong offset, expected %Id found %Id\n", tests[i].telloff_fs, tpos.off); ok(tpos.state == 0, "wrong state, expected = 0 found = %d\n", tpos.state); call_func1(p_basic_fstream_wchar_vbase_dtor, &wfs); diff --git a/dlls/msvcp90/tests/misc.c b/dlls/msvcp90/tests/misc.c index 40858bc5594..de52405559c 100644 --- a/dlls/msvcp90/tests/misc.c +++ b/dlls/msvcp90/tests/misc.c @@ -167,7 +167,7 @@ static void __cdecl test_invalid_parameter_handler(const wchar_t *expression, ok(function == NULL, "function is not NULL\n"); ok(file == NULL, "file is not NULL\n"); ok(line == 0, "line = %u\n", line); - ok(arg == 0, "arg = %lx\n", (UINT_PTR)arg); + ok(arg == 0, "arg = %Ix\n", arg); invalid_parameter++; } @@ -585,7 +585,7 @@ static void test__Getctype(void) _locale_t locale; ret = p__Getctype(); - ok(ret.handle == 0, "ret.handle = %d\n", ret.handle); + ok(ret.handle == 0, "ret.handle = %ld\n", ret.handle); ok(ret.page == 0, "ret.page = %d\n", ret.page); ok(ret.delfl == 1, "ret.delfl = %d\n", ret.delfl); ok(ret.table[0] == 32, "ret.table[0] = %d\n", ret.table[0]); @@ -595,7 +595,7 @@ static void test__Getctype(void) locale->locinfo->lc_handle[LC_COLLATE] = 0x1234567; p__free_locale(locale); ret = p__Getctype(); - ok(ret.handle == 0x1234567, "ret.handle = %d\n", ret.handle); + ok(ret.handle == 0x1234567, "ret.handle = %ld\n", ret.handle); ok(ret.page == 0, "ret.page = %d\n", ret.page); ok(ret.delfl == 1, "ret.delfl = %d\n", ret.delfl); ok(ret.table[0] == 32, "ret.table[0] = %d\n", ret.table[0]); @@ -619,7 +619,7 @@ static void test__Getcoll(void) locale->locinfo->lc_handle[LC_COLLATE] = 0x7654321; p__free_locale(locale); call__Getcoll(ret); - ok(ret.handle == 0x7654321, "ret.handle = %x\n", ret.handle); + ok(ret.handle == 0x7654321, "ret.handle = %lx\n", ret.handle); ok(ret.page == 0, "ret.page = %x\n", ret.page); } diff --git a/dlls/msvcp90/tests/string.c b/dlls/msvcp90/tests/string.c index 6c919f84d95..c5e6c8c1127 100644 --- a/dlls/msvcp90/tests/string.c +++ b/dlls/msvcp90/tests/string.c @@ -103,7 +103,7 @@ static void __cdecl test_invalid_parameter_handler(const wchar_t *expression, ok(function == NULL, "function is not NULL\n"); ok(file == NULL, "file is not NULL\n"); ok(line == 0, "line = %u\n", line); - ok(arg == 0, "arg = %lx\n", (UINT_PTR)arg); + ok(arg == 0, "arg = %Ix\n", arg); invalid_parameter++; }
1
0
0
0
Piotr Caban : msvcp140/tests: Build without -DWINE_NO_LONG_TYPES.
by Alexandre Julliard
14 Feb '22
14 Feb '22
Module: wine Branch: master Commit: dc4126e8c6a174a010587483c1b9f393b5ee15d8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dc4126e8c6a174a010587483…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Feb 11 23:05:00 2022 +0100 msvcp140/tests: Build without -DWINE_NO_LONG_TYPES. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp140/tests/Makefile.in | 1 - dlls/msvcp140/tests/msvcp140.c | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/msvcp140/tests/Makefile.in b/dlls/msvcp140/tests/Makefile.in index 4c4f7688109..aa82d0cba06 100644 --- a/dlls/msvcp140/tests/Makefile.in +++ b/dlls/msvcp140/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = msvcp140.dll C_SRCS = \ diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c index c79e425190b..b24c5e0f53d 100644 --- a/dlls/msvcp140/tests/msvcp140.c +++ b/dlls/msvcp140/tests/msvcp140.c @@ -301,7 +301,7 @@ static BOOL init(void) static void test_thrd(void) { ok(p__Thrd_id() == GetCurrentThreadId(), - "expected same id, got _Thrd_id %u GetCurrentThreadId %u\n", + "expected same id, got _Thrd_id %u GetCurrentThreadId %lu\n", p__Thrd_id(), GetCurrentThreadId()); } @@ -529,7 +529,7 @@ static void test_chore(void) ok(chore.callback == chore_callback, "chore.callback = %p, expected %p\n", chore.callback, chore_callback); ok(chore.arg == event, "chore.arg = %p, expected %p\n", chore.arg, event); wait = WaitForSingleObject(event, 500); - ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", wait); + ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %ld\n", wait); if(!GetProcAddress(GetModuleHandleA("kernel32"), "CreateThreadpoolWork")) { @@ -545,12 +545,12 @@ static void test_chore(void) ok(old_chore.work != chore.work, "new threadpool work was not created\n"); p__Release_chore(&old_chore); wait = WaitForSingleObject(event, 500); - ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", wait); + ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %ld\n", wait); ret = p__Reschedule_chore(&chore); ok(!ret, "_Reschedule_chore returned %d\n", ret); wait = WaitForSingleObject(event, 500); - ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", wait); + ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %ld\n", wait); p__Release_chore(&chore); ok(!chore.work, "chore.work != NULL\n"); @@ -1256,12 +1256,12 @@ static void test__Winerror_message(void) ret = p__Winerror_message(0, buf, sizeof(buf)); ok(ret == ret_fm || (ret_fm > 2 && buf_fm[ret_fm - 1] == '\n' && buf_fm[ret_fm - 2] == '\r' && ret + 2 == ret_fm), - "ret = %u, expected %u\n", ret, ret_fm); + "ret = %lu, expected %lu\n", ret, ret_fm); ok(!strncmp(buf, buf_fm, ret), "buf = %s, expected %s\n", buf, buf_fm); memset(buf, 'a', sizeof(buf)); ret = p__Winerror_message(0, buf, 2); - ok(!ret, "ret = %u\n", ret); + ok(!ret, "ret = %lu\n", ret); ok(buf[0] == 'a', "buf = %s\n", buf); }
1
0
0
0
Piotr Caban : msvcp140_atomic_wait/tests: Build without -DWINE_NO_LONG_TYPES.
by Alexandre Julliard
14 Feb '22
14 Feb '22
Module: wine Branch: master Commit: 7bbb7042943c5dc080cfc74bc9d6cced7dc45dd3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7bbb7042943c5dc080cfc74b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Feb 11 23:04:52 2022 +0100 msvcp140_atomic_wait/tests: Build without -DWINE_NO_LONG_TYPES. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp140_atomic_wait/tests/Makefile.in | 1 - dlls/msvcp140_atomic_wait/tests/msvcp140_atomic_wait.c | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dlls/msvcp140_atomic_wait/tests/Makefile.in b/dlls/msvcp140_atomic_wait/tests/Makefile.in index 30f1c7c2f88..7f58d06d8f3 100644 --- a/dlls/msvcp140_atomic_wait/tests/Makefile.in +++ b/dlls/msvcp140_atomic_wait/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = msvcp140_atomic_wait.dll C_SRCS = \ diff --git a/dlls/msvcp140_atomic_wait/tests/msvcp140_atomic_wait.c b/dlls/msvcp140_atomic_wait/tests/msvcp140_atomic_wait.c index 3a971bb4ce3..42fefc4db03 100644 --- a/dlls/msvcp140_atomic_wait/tests/msvcp140_atomic_wait.c +++ b/dlls/msvcp140_atomic_wait/tests/msvcp140_atomic_wait.c @@ -56,7 +56,7 @@ static void test___std_parallel_algorithms_hw_threads(void) GetSystemInfo(&si); nthr = p___std_parallel_algorithms_hw_threads(); - ok(nthr == si.dwNumberOfProcessors, "expected %u, got %u\n", si.dwNumberOfProcessors, nthr); + ok(nthr == si.dwNumberOfProcessors, "expected %lu, got %u\n", si.dwNumberOfProcessors, nthr); } static PTP_WORK cb_work; @@ -102,7 +102,7 @@ static void test_threadpool_work(void) p___std_submit_threadpool_work(work); p___std_wait_for_threadpool_work_callbacks(work, FALSE); p___std_close_threadpool_work(work); - ok(workcalled == 1, "expected work to be called once, got %d\n", workcalled); + ok(workcalled == 1, "expected work to be called once, got %ld\n", workcalled); ok(cb_work == work, "expected %p, got %p\n", work, cb_work); ok(cb_context == &workcalled, "expected %p, got %p\n", &workcalled, cb_context); @@ -113,7 +113,7 @@ static void test_threadpool_work(void) p___std_bulk_submit_threadpool_work(work, 13); p___std_wait_for_threadpool_work_callbacks(work, FALSE); p___std_close_threadpool_work(work); - ok(workcalled == 13, "expected work to be called 13 times, got %d\n", workcalled); + ok(workcalled == 13, "expected work to be called 13 times, got %ld\n", workcalled); workcalled = 0; work = p___std_create_threadpool_work(threadpool_workcallback, &workcalled, NULL); @@ -121,7 +121,7 @@ static void test_threadpool_work(void) p___std_bulk_submit_threadpool_work(work, 0); p___std_wait_for_threadpool_work_callbacks(work, FALSE); p___std_close_threadpool_work(work); - ok(workcalled == 0, "expected no work, got %d\n", workcalled); + ok(workcalled == 0, "expected no work, got %ld\n", workcalled); /* test with environment */ cb_event = CreateEventW(NULL, TRUE, FALSE, NULL); @@ -136,7 +136,7 @@ static void test_threadpool_work(void) p___std_close_threadpool_work(work); ret = WaitForSingleObject(cb_event, 1000); ok(ret == WAIT_OBJECT_0, "expected finalization callback to be called\n"); - ok(workcalled == 2, "expected work to be called twice, got %d\n", workcalled); + ok(workcalled == 2, "expected work to be called twice, got %ld\n", workcalled); CloseHandle(cb_event); /* test with environment version 3 */ @@ -147,7 +147,7 @@ static void test_threadpool_work(void) work = p___std_create_threadpool_work(threadpool_workcallback, &workcalled, (TP_CALLBACK_ENVIRON *)&environment3); gle = GetLastError(); - ok(gle == 0xdeadbeef, "expected 0xdeadbeef, got %x\n", gle); + ok(gle == 0xdeadbeef, "expected 0xdeadbeef, got %lx\n", gle); ok(!!work, "failed to create threadpool_work\n"); p___std_close_threadpool_work(work); @@ -158,7 +158,7 @@ static void test_threadpool_work(void) work = p___std_create_threadpool_work(threadpool_workcallback, &workcalled, (TP_CALLBACK_ENVIRON *)&environment3); gle = GetLastError(); - ok(gle == ERROR_INVALID_PARAMETER, "expected %d, got %d\n", ERROR_INVALID_PARAMETER, gle); + ok(gle == ERROR_INVALID_PARAMETER, "expected %d, got %ld\n", ERROR_INVALID_PARAMETER, gle); ok(!work, "expected failure\n"); }
1
0
0
0
Piotr Caban : msvcp120/tests: Build without -DWINE_NO_LONG_TYPES.
by Alexandre Julliard
14 Feb '22
14 Feb '22
Module: wine Branch: master Commit: 61886644fcaeef26ce12ae30e8f6aa7df6cbc8ad URL:
https://source.winehq.org/git/wine.git/?a=commit;h=61886644fcaeef26ce12ae30…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Feb 11 23:04:41 2022 +0100 msvcp120/tests: Build without -DWINE_NO_LONG_TYPES. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp120/tests/Makefile.in | 1 - dlls/msvcp120/tests/msvcp120.c | 28 ++++++++++++++-------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dlls/msvcp120/tests/Makefile.in b/dlls/msvcp120/tests/Makefile.in index 705652c3712..088a2164148 100644 --- a/dlls/msvcp120/tests/Makefile.in +++ b/dlls/msvcp120/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = msvcp120.dll C_SRCS = \ diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c index 9e36071d06a..44c0a3f0fe0 100644 --- a/dlls/msvcp120/tests/msvcp120.c +++ b/dlls/msvcp120/tests/msvcp120.c @@ -2070,14 +2070,14 @@ static void test_thrd(void) /* test for equal */ for(i=0; i<ARRAY_SIZE(testeq); i++) { ret = p__Thrd_equal(testeq[i].a, testeq[i].b); - ok(ret == testeq[i].r, "(%p %u) = (%p %u) expected %d, got %d\n", + ok(ret == testeq[i].r, "(%p %lu) = (%p %lu) expected %d, got %d\n", testeq[i].a.hnd, testeq[i].a.id, testeq[i].b.hnd, testeq[i].b.id, testeq[i].r, ret); } /* test for less than */ for(i=0; i<ARRAY_SIZE(testlt); i++) { ret = p__Thrd_lt(testlt[i].a, testlt[i].b); - ok(ret == testlt[i].r, "(%p %u) < (%p %u) expected %d, got %d\n", + ok(ret == testlt[i].r, "(%p %lu) < (%p %lu) expected %d, got %d\n", testlt[i].a.hnd, testlt[i].a.id, testlt[i].b.hnd, testlt[i].b.id, testlt[i].r, ret); } @@ -2095,8 +2095,8 @@ static void test_thrd(void) /* test for current */ ta = p__Thrd_current(); tb = p__Thrd_current(); - ok(ta.id == tb.id, "got a %d b %d\n", ta.id, tb.id); - ok(ta.id == GetCurrentThreadId(), "expected %d, got %d\n", GetCurrentThreadId(), ta.id); + ok(ta.id == tb.id, "got a %ld b %ld\n", ta.id, tb.id); + ok(ta.id == GetCurrentThreadId(), "expected %ld, got %ld\n", GetCurrentThreadId(), ta.id); /* the handles can be different if new threads are created at same time */ ok(ta.hnd != NULL, "handle a is NULL\n"); ok(tb.hnd != NULL, "handle b is NULL\n"); @@ -2114,7 +2114,7 @@ static void test_thrd(void) ok(!ret, "failed to create thread, got %d\n", ret); ret = p__Thrd_join(ta, &r); ok(!ret, "failed to join thread, got %d\n", ret); - ok(ta.id == tb.id, "expected %d, got %d\n", ta.id, tb.id); + ok(ta.id == tb.id, "expected %ld, got %ld\n", ta.id, tb.id); ok(ta.hnd != tb.hnd, "same handles, got %p\n", ta.hnd); ok(r == 0x42, "expected 0x42, got %d\n", r); ret = p__Thrd_detach(ta); @@ -2131,7 +2131,7 @@ static void test_thrd(void) struct cndmtx { HANDLE initialized; - int started; + LONG started; int thread_no; _Cnd_t cnd; @@ -2249,7 +2249,7 @@ static void test_cnd(void) p__Cnd_register_at_thread_exit(&cnd, &mtx, &r); p__Cnd_unregister_at_thread_exit(&mtx); p__Cnd_do_broadcast_at_thread_exit(); - ok(mtx->count == 1, "mtx.count = %d\n", mtx->count); + ok(mtx->count == 1, "mtx.count = %ld\n", mtx->count); p__Cnd_register_at_thread_exit(&cnd, &mtx, &r); ok(r == 0xcafe, "r = %x\n", r); @@ -2341,14 +2341,14 @@ static unsigned int __cdecl vtbl_func__Go(_Pad *this) DWORD ret; ret = WaitForSingleObject(_Pad__Launch_returned, 100); - ok(ret == WAIT_TIMEOUT, "WiatForSingleObject returned %x\n", ret); - ok(!pad.mtx->count, "pad.mtx.count = %d\n", pad.mtx->count); + ok(ret == WAIT_TIMEOUT, "WiatForSingleObject returned %lx\n", ret); + ok(!pad.mtx->count, "pad.mtx.count = %ld\n", pad.mtx->count); ok(!pad.launched, "pad.launched = %x\n", pad.launched); call_func1(p__Pad__Release, &pad); ok(pad.launched, "pad.launched = %x\n", pad.launched); ret = WaitForSingleObject(_Pad__Launch_returned, 100); - ok(ret == WAIT_OBJECT_0, "WiatForSingleObject returned %x\n", ret); - ok(pad.mtx->count == 1, "pad.mtx.count = %d\n", pad.mtx->count); + ok(ret == WAIT_OBJECT_0, "WiatForSingleObject returned %lx\n", ret); + ok(pad.mtx->count == 1, "pad.mtx.count = %ld\n", pad.mtx->count); return 0; } @@ -2394,7 +2394,7 @@ static void test__Pad(void) memset(&pad, 0xfe, sizeof(pad)); call_func1(p__Pad_ctor, &pad); ok(!pad.launched, "pad.launched = %x\n", pad.launched); - ok(pad.mtx->count == 1, "pad.mtx.count = %d\n", pad.mtx->count); + ok(pad.mtx->count == 1, "pad.mtx.count = %ld\n", pad.mtx->count); pad.vtable = &pfunc; call_func2(p__Pad__Launch, &pad, &thrd); @@ -2784,7 +2784,7 @@ static void test_queue_base_v4(void) thread[1] = CreateThread(NULL, 0, queue_push_thread, &queue, 0, NULL); ret = WaitForSingleObject(thread[1], 100); - ok(ret == WAIT_TIMEOUT, "WaitForSingleObject returned %x\n", ret); + ok(ret == WAIT_TIMEOUT, "WaitForSingleObject returned %lx\n", ret); SetEvent(block_end); WaitForSingleObject(thread[0], INFINITE); @@ -2807,7 +2807,7 @@ static void test_queue_base_v4(void) thread[1] = CreateThread(NULL, 0, queue_pop_thread, &queue, 0, NULL); ret = WaitForSingleObject(thread[1], 100); - ok(ret == WAIT_TIMEOUT, "WaitForSingleObject returned %x\n", ret); + ok(ret == WAIT_TIMEOUT, "WaitForSingleObject returned %lx\n", ret); SetEvent(block_end); WaitForSingleObject(thread[0], INFINITE);
1
0
0
0
Piotr Caban : concrt140/tests: Build without -DWINE_NO_LONG_TYPES.
by Alexandre Julliard
14 Feb '22
14 Feb '22
Module: wine Branch: master Commit: c28e92800604442effc0af03ce430d6c176c80d2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c28e92800604442effc0af03…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Feb 11 20:51:47 2022 +0100 concrt140/tests: Build without -DWINE_NO_LONG_TYPES. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/concrt140/tests/Makefile.in | 1 - dlls/concrt140/tests/concrt140.c | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/concrt140/tests/Makefile.in b/dlls/concrt140/tests/Makefile.in index 4578fb62eb2..e36fc37eb86 100644 --- a/dlls/concrt140/tests/Makefile.in +++ b/dlls/concrt140/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = concrt140.dll C_SRCS = \ diff --git a/dlls/concrt140/tests/concrt140.c b/dlls/concrt140/tests/concrt140.c index 7b3300a3d59..4b24c9cb86f 100644 --- a/dlls/concrt140/tests/concrt140.c +++ b/dlls/concrt140/tests/concrt140.c @@ -187,9 +187,9 @@ static void test_Timer(void) call_func1(p__Timer__Start, &timer); ok(timer.timer != NULL, "timer = NULL\n"); ret = WaitForSingleObject(callback_called, 1000); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", ret); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", ret); ret = WaitForSingleObject(callback_called, 1000); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", ret); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", ret); call_func1(p__Timer__Stop, &timer); ok(!timer.timer, "timer != NULL\n"); call_func1(p__Timer_dtor, &timer); @@ -200,9 +200,9 @@ static void test_Timer(void) call_func1(p__Timer__Start, &timer); ok(timer.timer != NULL, "timer = NULL\n"); ret = WaitForSingleObject(callback_called, 1000); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", ret); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", ret); ret = WaitForSingleObject(callback_called, 100); - ok(ret == WAIT_TIMEOUT, "WaitForSingleObject returned %d\n", ret); + ok(ret == WAIT_TIMEOUT, "WaitForSingleObject returned %lu\n", ret); call_func1(p__Timer_dtor, &timer); call_func3(p__Timer_ctor, &timer, 0, TRUE); @@ -210,9 +210,9 @@ static void test_Timer(void) call_func1(p__Timer__Start, &timer); ok(timer.timer != NULL, "timer = NULL\n"); ret = WaitForSingleObject(callback_called, 1000); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", ret); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", ret); ret = WaitForSingleObject(callback_called, 100); - ok(ret == WAIT_TIMEOUT, "WaitForSingleObject returned %d\n", ret); + ok(ret == WAIT_TIMEOUT, "WaitForSingleObject returned %lu\n", ret); call_func1(p__Timer__Stop, &timer); ok(!timer.timer, "timer != NULL\n"); call_func1(p__Timer_dtor, &timer);
1
0
0
0
Giovanni Mascellani : vkd3d-shader/hlsl: Parse bitwise OR.
by Alexandre Julliard
14 Feb '22
14 Feb '22
Module: vkd3d Branch: master Commit: 02a2a9a9299591bd13273c51074035c6bb181d3a URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=02a2a9a9299591bd13273c5…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Fri Feb 11 21:04:09 2022 +0100 vkd3d-shader/hlsl: Parse bitwise OR. Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/hlsl.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 1d9d7e8..459ad03 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -3657,7 +3657,7 @@ bitor_expr: bitxor_expr | bitor_expr '|' bitxor_expr { - hlsl_fixme(ctx, &@$, "Bitwise OR."); + $$ = add_binary_bitwise_expr_merge(ctx, $1, $3, HLSL_OP2_BIT_OR, &@2); } logicand_expr:
1
0
0
0
Giovanni Mascellani : vkd3d-shader/hlsl: Parse bitwise XOR.
by Alexandre Julliard
14 Feb '22
14 Feb '22
Module: vkd3d Branch: master Commit: c7695d051105e3224c5da9c17e4ec68278294732 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=c7695d051105e3224c5da9c…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Fri Feb 11 21:04:08 2022 +0100 vkd3d-shader/hlsl: Parse bitwise XOR. Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/hlsl.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 397397b..1d9d7e8 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -3650,7 +3650,7 @@ bitxor_expr: bitand_expr | bitxor_expr '^' bitand_expr { - hlsl_fixme(ctx, &@$, "Bitwise XOR."); + $$ = add_binary_bitwise_expr_merge(ctx, $1, $3, HLSL_OP2_BIT_XOR, &@2); } bitor_expr:
1
0
0
0
Giovanni Mascellani : vkd3d-shader/hlsl: Parse bitwise AND.
by Alexandre Julliard
14 Feb '22
14 Feb '22
Module: vkd3d Branch: master Commit: c0ff9184cf1fde6df37cfbeddb54190bce5f2ce6 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=c0ff9184cf1fde6df37cfbe…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Fri Feb 11 21:04:07 2022 +0100 vkd3d-shader/hlsl: Parse bitwise AND. Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/hlsl.y | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 40fdd49..397397b 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -1057,6 +1057,49 @@ static struct list *add_binary_arithmetic_expr_merge(struct hlsl_ctx *ctx, struc return list1; } +static struct hlsl_ir_expr *add_binary_bitwise_expr(struct hlsl_ctx *ctx, struct list *instrs, + enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg1, struct hlsl_ir_node *arg2, + const struct vkd3d_shader_location *loc) +{ + if (arg1->data_type->base_type != HLSL_TYPE_INT && arg1->data_type->base_type != HLSL_TYPE_UINT + && arg1->data_type->base_type != HLSL_TYPE_BOOL) + { + struct vkd3d_string_buffer *type_str = hlsl_type_to_string(ctx, arg1->data_type); + + if (type_str) + hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, + "The first argument has type '%s', which is not integer.", type_str->buffer); + hlsl_release_string_buffer(ctx, type_str); + return NULL; + } + + if (arg2->data_type->base_type != HLSL_TYPE_INT && arg2->data_type->base_type != HLSL_TYPE_UINT + && arg2->data_type->base_type != HLSL_TYPE_BOOL) + { + struct vkd3d_string_buffer *type_str = hlsl_type_to_string(ctx, arg2->data_type); + + if (type_str) + hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, + "The second argument has type '%s', which is not integer.", type_str->buffer); + hlsl_release_string_buffer(ctx, type_str); + return NULL; + } + + return add_binary_arithmetic_expr(ctx, instrs, op, arg1, arg2, loc); +} + +static struct list *add_binary_bitwise_expr_merge(struct hlsl_ctx *ctx, struct list *list1, struct list *list2, + enum hlsl_ir_expr_op op, const struct vkd3d_shader_location *loc) +{ + struct hlsl_ir_node *arg1 = node_from_list(list1), *arg2 = node_from_list(list2); + + list_move_tail(list1, list2); + vkd3d_free(list2); + add_binary_bitwise_expr(ctx, list1, op, arg1, arg2, loc); + + return list1; +} + static struct hlsl_ir_expr *add_binary_comparison_expr(struct hlsl_ctx *ctx, struct list *instrs, enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg1, struct hlsl_ir_node *arg2, struct vkd3d_shader_location *loc) @@ -3600,7 +3643,7 @@ bitand_expr: equality_expr | bitand_expr '&' equality_expr { - hlsl_fixme(ctx, &@$, "Bitwise AND."); + $$ = add_binary_bitwise_expr_merge(ctx, $1, $3, HLSL_OP2_BIT_AND, &@2); } bitxor_expr:
1
0
0
0
Giovanni Mascellani : vkd3d-shader/hlsl: Write SM4 unsigned multiplication instructions.
by Alexandre Julliard
14 Feb '22
14 Feb '22
Module: vkd3d Branch: master Commit: 52a3e0af559b2728546763c3f6c0f66183086fd0 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=52a3e0af559b2728546763c…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Fri Feb 11 21:04:06 2022 +0100 vkd3d-shader/hlsl: Write SM4 unsigned multiplication instructions. Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/hlsl_sm4.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index 9db8a69..6996bb2 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -806,7 +806,7 @@ struct sm4_instruction { struct sm4_register reg; unsigned int writemask; - } dsts[1]; + } dsts[2]; unsigned int dst_count; struct sm4_src_register @@ -1286,6 +1286,30 @@ static void write_sm4_binary_op(struct vkd3d_bytecode_buffer *buffer, enum vkd3d write_sm4_instruction(buffer, &instr); } +static void write_sm4_binary_op_with_two_destinations(struct vkd3d_bytecode_buffer *buffer, + enum vkd3d_sm4_opcode opcode, const struct hlsl_ir_node *dst, unsigned dst_idx, + const struct hlsl_ir_node *src1, const struct hlsl_ir_node *src2) +{ + struct sm4_instruction instr; + + memset(&instr, 0, sizeof(instr)); + instr.opcode = opcode; + + assert(dst_idx < ARRAY_SIZE(instr.dsts)); + sm4_dst_from_node(&instr.dsts[dst_idx], dst); + assert(1 - dst_idx >= 0); + instr.dsts[1 - dst_idx].reg.type = VKD3D_SM4_RT_NULL; + instr.dsts[1 - dst_idx].reg.dim = VKD3D_SM4_DIMENSION_NONE; + instr.dsts[1 - dst_idx].reg.idx_count = 0; + instr.dst_count = 2; + + sm4_src_from_node(&instr.srcs[0], src1, instr.dsts[dst_idx].writemask); + sm4_src_from_node(&instr.srcs[1], src2, instr.dsts[dst_idx].writemask); + instr.src_count = 2; + + write_sm4_instruction(buffer, &instr); +} + static void write_sm4_constant(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *buffer, const struct hlsl_ir_constant *constant) { @@ -1591,6 +1615,12 @@ static void write_sm4_expr(struct hlsl_ctx *ctx, write_sm4_binary_op(buffer, VKD3D_SM4_OP_UMIN, &expr->node, arg1, arg2); break; + case HLSL_OP2_MUL: + /* Using IMUL instead of UMUL because we're taking the low + * bits, and the native compiler generates IMUL. */ + write_sm4_binary_op_with_two_destinations(buffer, VKD3D_SM4_OP_IMUL, &expr->node, 1, arg1, arg2); + break; + default: hlsl_fixme(ctx, &expr->node.loc, "SM4 uint \"%s\" expression.\n", debug_hlsl_expr_op(expr->op)); break;
1
0
0
0
← Newer
1
...
83
84
85
86
87
88
89
...
150
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
Results per page:
10
25
50
100
200