Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 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
July 2022
- 51 participants
- 1216 messages
Re: [PATCH v2 2/4] bcrypt/tests: Test for BCryptEncrypt with RSA keys.
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120255
Your paranoid android.
=== debian11 (32 bit report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit Arabic:Morocco report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit German report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit French report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit Hebrew:Israel report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit Hindi:India report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit Japanese:Japan report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit Chinese:China report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit WoW report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (64 bit WoW report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
July 31, 2022
Re: [PATCH 2/4] bcrypt/tests: Test for BCryptEncrypt with RSA keys.
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120251
Your paranoid android.
=== debian11 (32 bit report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit Arabic:Morocco report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit German report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit French report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit Hebrew:Israel report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit Hindi:India report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit Japanese:Japan report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit Chinese:China report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (32 bit WoW report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
=== debian11 (64 bit WoW report) ===
bcrypt:
bcrypt.c:2083: Test failed: got c0000002
bcrypt.c:2084: Test failed: got size of 60
bcrypt.c:2092: Test failed: got c0000002
bcrypt.c:2094: Test failed: got c0000002
bcrypt.c:2095: Test failed: Both outputs are the same
July 31, 2022
Re: [PATCH v2 1/1] cabinet.dll: implement DllGetVersion & GetDllVersion Fix stub DllGetVersion implementation to read Dll ve
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120249
Your paranoid android.
=== debian11 (build log) ===
../wine/dlls/cabinet/cabinet_main.c:58:13: error: conflicting types for ‘DllGetVersion’
Task: The win32 Wine build failed
=== debian11 (build log) ===
../wine/dlls/cabinet/cabinet_main.c:58:13: error: conflicting types for ‘DllGetVersion’
Task: The wow64 Wine build failed
July 31, 2022
Re: [PATCH 1/1] cabinet.dll: implement DllGetVersion & GetDllVersion Fix stub DllGetVersion implementation to read Dll versi
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120247
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w7u_adm (32 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w7u_el (32 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w8 (32 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w8adm (32 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w864 (32 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w1064v1507 (32 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w1064v1809 (32 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w1064 (32 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w1064_tsign (32 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w10pro64 (32 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w864 (64 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w1064v1507 (64 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w1064v1809 (64 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w1064 (64 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w1064_2qxl (64 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w1064_adm (64 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w1064_tsign (64 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w10pro64 (64 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w10pro64_en_AE_u8 (64 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w10pro64_ar (64 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w10pro64_ja (64 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== w10pro64_zh_CN (64 bit report) ===
cabinet:
version.c:55: Test failed: Size of cabinet version structure incorrect: Error = 203.
=== debian11 (build log) ===
../wine/dlls/cabinet/cabinet_main.c:58:13: error: conflicting types for ‘DllGetVersion’
Task: The win32 Wine build failed
=== debian11 (build log) ===
../wine/dlls/cabinet/cabinet_main.c:58:13: error: conflicting types for ‘DllGetVersion’
Task: The wow64 Wine build failed
July 31, 2022
Re: [PATCH v2 01/11] winmm/tests: Add tests for visibility of video window.
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120234
Your paranoid android.
=== w8 (testbot log) ===
WineRunTask.pl:error: The previous 1 run(s) terminated abnormally
July 31, 2022
Re: [PATCH v2 05/11] winmm/tests: Add tests for destination of video window.
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120238
Your paranoid android.
=== debian11 (32 bit report) ===
winmm:
mci.c:1606: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1606: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1606: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit Arabic:Morocco report) ===
winmm:
mci.c:1606: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,10)-(112,61), got (0,10)-(112,61)
mci.c:1606: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1606: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit German report) ===
winmm:
mci.c:1606: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,10)-(112,61), got (0,10)-(112,61)
mci.c:1606: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1606: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit French report) ===
winmm:
mci.c:1606: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,10)-(112,61), got (0,10)-(112,61)
mci.c:1606: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,10)-(112,61), got (0,10)-(112,61)
mci.c:1606: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit Hebrew:Israel report) ===
winmm:
mci.c:1606: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1606: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1606: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit Hindi:India report) ===
winmm:
mci.c:1606: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1606: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1606: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit Japanese:Japan report) ===
winmm:
mci.c:1606: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,10)-(112,61), got (0,10)-(112,61)
mci.c:1606: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1606: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit Chinese:China report) ===
winmm:
mci.c:1606: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,0)-(113,52), got (0,0)-(113,52)
mci.c:1606: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(113,52), got (0,0)-(113,52)
mci.c:1606: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(113,52), got (0,0)-(113,52)
=== debian11 (32 bit WoW report) ===
winmm:
mci.c:1606: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1606: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1606: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (64 bit WoW report) ===
winmm:
mci.c:1606: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,10)-(112,61), got (0,10)-(112,61)
mci.c:1606: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1606: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
July 31, 2022
Re: [PATCH v2 04/11] winmm/tests: Add tests for dimensions of video window.
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120237
Your paranoid android.
=== debian11 (32 bit report) ===
winmm:
mci.c:1601: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1601: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1601: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit Arabic:Morocco report) ===
winmm:
mci.c:1601: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1601: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1601: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit German report) ===
winmm:
mci.c:1601: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,10)-(112,61), got (0,10)-(112,61)
mci.c:1601: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,10)-(112,61), got (0,10)-(112,61)
mci.c:1601: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit French report) ===
winmm:
mci.c:1601: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,10)-(112,61), got (0,10)-(112,61)
mci.c:1601: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1601: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit Hebrew:Israel report) ===
winmm:
mci.c:1601: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,10)-(112,61), got (0,10)-(112,61)
mci.c:1601: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1601: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit Hindi:India report) ===
winmm:
mci.c:1601: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1601: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1601: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit Japanese:Japan report) ===
winmm:
mci.c:1601: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,10)-(112,61), got (0,10)-(112,61)
mci.c:1601: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1601: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (32 bit Chinese:China report) ===
winmm:
mci.c:1601: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,0)-(113,52), got (0,0)-(113,52)
mci.c:1601: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(113,52), got (0,0)-(113,52)
mci.c:1601: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(113,52), got (0,0)-(113,52)
=== debian11 (32 bit WoW report) ===
winmm:
mci.c:1601: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1601: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1601: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
=== debian11 (64 bit WoW report) ===
winmm:
mci.c:1601: Test succeeded inside todo block: 0: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1601: Test succeeded inside todo block: 2: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
mci.c:1601: Test succeeded inside todo block: 3: window rectangle doesn't match, expected (0,0)-(112,51), got (0,0)-(112,51)
July 31, 2022
Re: [PATCH v2 7/7] xactengine3_7: Return error on invalid notification value.
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120222
Your paranoid android.
=== debian11 (32 bit report) ===
xactengine3_7:
xact3.c:215: Test failed: got hr 0
xact3.c:218: Test failed: got hr 0
xact3.c:224: Test failed: got hr 0
xact3.c:227: Test failed: got hr 0
xact3.c:272: Test failed: The 'wave bank prepared' notification was never received
xact3.c:276: Test failed: The 'wave bank destroyed' notification was never received
=== debian11 (32 bit Arabic:Morocco report) ===
xactengine3_7:
xact3.c:215: Test failed: got hr 0
xact3.c:218: Test failed: got hr 0
xact3.c:224: Test failed: got hr 0
xact3.c:227: Test failed: got hr 0
xact3.c:272: Test failed: The 'wave bank prepared' notification was never received
xact3.c:276: Test failed: The 'wave bank destroyed' notification was never received
=== debian11 (32 bit German report) ===
xactengine3_7:
xact3.c:215: Test failed: got hr 0
xact3.c:218: Test failed: got hr 0
xact3.c:224: Test failed: got hr 0
xact3.c:227: Test failed: got hr 0
xact3.c:272: Test failed: The 'wave bank prepared' notification was never received
xact3.c:276: Test failed: The 'wave bank destroyed' notification was never received
=== debian11 (32 bit French report) ===
xactengine3_7:
xact3.c:215: Test failed: got hr 0
xact3.c:218: Test failed: got hr 0
xact3.c:224: Test failed: got hr 0
xact3.c:227: Test failed: got hr 0
xact3.c:272: Test failed: The 'wave bank prepared' notification was never received
xact3.c:276: Test failed: The 'wave bank destroyed' notification was never received
=== debian11 (32 bit Hebrew:Israel report) ===
xactengine3_7:
xact3.c:215: Test failed: got hr 0
xact3.c:218: Test failed: got hr 0
xact3.c:224: Test failed: got hr 0
xact3.c:227: Test failed: got hr 0
xact3.c:272: Test failed: The 'wave bank prepared' notification was never received
xact3.c:276: Test failed: The 'wave bank destroyed' notification was never received
=== debian11 (32 bit Hindi:India report) ===
xactengine3_7:
xact3.c:215: Test failed: got hr 0
xact3.c:218: Test failed: got hr 0
xact3.c:224: Test failed: got hr 0
xact3.c:227: Test failed: got hr 0
xact3.c:272: Test failed: The 'wave bank prepared' notification was never received
xact3.c:276: Test failed: The 'wave bank destroyed' notification was never received
=== debian11 (32 bit Japanese:Japan report) ===
xactengine3_7:
xact3.c:215: Test failed: got hr 0
xact3.c:218: Test failed: got hr 0
xact3.c:224: Test failed: got hr 0
xact3.c:227: Test failed: got hr 0
xact3.c:272: Test failed: The 'wave bank prepared' notification was never received
xact3.c:276: Test failed: The 'wave bank destroyed' notification was never received
=== debian11 (32 bit Chinese:China report) ===
xactengine3_7:
xact3.c:215: Test failed: got hr 0
xact3.c:218: Test failed: got hr 0
xact3.c:224: Test failed: got hr 0
xact3.c:227: Test failed: got hr 0
xact3.c:272: Test failed: The 'wave bank prepared' notification was never received
xact3.c:276: Test failed: The 'wave bank destroyed' notification was never received
=== debian11 (32 bit WoW report) ===
xactengine3_7:
xact3.c:215: Test failed: got hr 0
xact3.c:218: Test failed: got hr 0
xact3.c:224: Test failed: got hr 0
xact3.c:227: Test failed: got hr 0
xact3.c:272: Test failed: The 'wave bank prepared' notification was never received
xact3.c:276: Test failed: The 'wave bank destroyed' notification was never received
=== debian11 (64 bit WoW report) ===
xactengine3_7:
xact3.c:215: Test failed: got hr 0
xact3.c:218: Test failed: got hr 0
xact3.c:224: Test failed: got hr 0
xact3.c:227: Test failed: got hr 0
xact3.c:272: Test failed: The 'wave bank prepared' notification was never received
xact3.c:276: Test failed: The 'wave bank destroyed' notification was never received
July 31, 2022
Re: [PATCH] fltlib: Add fixme stub for FilterSendMessage.
by Zhiyi Zhang
On 7/21/22 17:13, Chao Long wrote:
> Signed-off-by: Chao Long <longchao(a)uniontech.com>
> ---
> dlls/fltlib/fltlib.c | 11 +++++++++++
> dlls/fltlib/fltlib.spec | 2 +-
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/dlls/fltlib/fltlib.c b/dlls/fltlib/fltlib.c
> index a6cf060b3d1..a322e7559de 100644
> --- a/dlls/fltlib/fltlib.c
> +++ b/dlls/fltlib/fltlib.c
> @@ -80,3 +80,14 @@ HRESULT WINAPI FilterUnload(LPCWSTR filtername)
>
> return S_OK;
> }
> +
> +/**********************************************************************
> + * FilterSendMessage (FLTLIB.@)
> + */
> +HRESULT WINAPI FilterSendMessage(HANDLE port, LPVOID in_buffer, DWORD in_size, LPVOID out_buffer,
> + DWORD out_size, LPDWORD returned)
> +{
> + FIXME("(%p, %p, %d, %p, %d, %p) stub\n", port,in_buffer,in_size,out_buffer,out_size,returned);
Please use %ld to print DWORD. %d generates warnings.
> +
> + return S_OK;
> +}
> \ No newline at end of file
Please keep a new line.
Also, do you have a real world application that needs this stub?
Thanks,
Zhiyi
> diff --git a/dlls/fltlib/fltlib.spec b/dlls/fltlib/fltlib.spec
> index 226a61519d1..48caa505a28 100644
> --- a/dlls/fltlib/fltlib.spec
> +++ b/dlls/fltlib/fltlib.spec
> @@ -18,7 +18,7 @@
> @ stub FilterInstanceGetInformation
> @ stdcall FilterLoad(wstr)
> @ stub FilterReplyMessage
> -@ stub FilterSendMessage
> +@ stdcall FilterSendMessage(ptr ptr long ptr long ptr)
> @ stdcall FilterUnload(wstr)
> @ stub FilterVolumeClose
> @ stub FilterVolumeFindClose
July 31, 2022
Wine staging 7.14 release
by Alistair Leslie-Hughes
Binary packages for various distributions will be available from:
https://www.winehq.org/download
Summary since last release
* Rebased to current wine 7.14 (537 patches are applied to wine vanilla)
Upstreamed (Either directly from staging or fixed with a similar patch).
* xactengine3.7: Delay Notication for WAVEBANKPREPARED
* ntdll: Check return parameter before use
* ntdll: RtlFirstFreeAce only return FALSE on error
* xactengine3_7: Remove Entry after FAudio Destroyed call
Added:
* None
Updated:
* xactengine3_7-Notification
* xactengine3_7-callbacks
Where can you help
* Run Steam/Battle.net/GOG/UPlay/Epic
* Test your favorite game.
* Test your favorite applications.
* Improve staging patches and get them accepted upstream.
As always, if you find a bug, please report it via
https://bugs.winehq.org
Best Regards
Alistair.
July 30, 2022
Re: [PATCH v2 3/5] mshtml: Implement document.doctype.
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how
to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120190
Your paranoid android.
=== w10pro64_en_AE_u8 (64 bit report) ===
mshtml:
htmldoc.c:2541: Test failed: unexpected call UpdateUI
htmldoc.c:2853: Test failed: unexpected call Exec_UPDATECOMMANDS
htmldoc.c:350: Test failed: expected Exec_SETTITLE
htmldoc.c:2859: Test failed: unexpected call Exec_SETTITLE
July 29, 2022
Re: [PATCH 4/5] mshtml: Implement DocumentType node's name prop.
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how
to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120170
Your paranoid android.
=== w10pro64_ja (64 bit report) ===
mshtml:
htmldoc.c:2541: Test failed: unexpected call UpdateUI
htmldoc.c:2853: Test failed: unexpected call Exec_UPDATECOMMANDS
htmldoc.c:2541: Test failed: unexpected call UpdateUI
htmldoc.c:2853: Test failed: unexpected call Exec_UPDATECOMMANDS
htmldoc.c:350: Test failed: expected Exec_SETTITLE
htmldoc.c:2859: Test failed: unexpected call Exec_SETTITLE
July 29, 2022
Re: [PATCH 3/5] mshtml: Implement document.doctype.
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how
to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120169
Your paranoid android.
=== w1064v1809 (testbot log) ===
WineRunTask.pl:error: The previous 1 run(s) terminated abnormally
July 29, 2022
Re: [PATCH vkd3d 2/3] vkd3d-shader: Introduce a compile option to use Unknown format for typed UAV reads.
by Conor McCarthy
On Fri, Jul 22, 2022 at 8:28 PM Henri Verbeet <hverbeet(a)gmail.com> wrote:
> I'm not entirely sure we're decoding these correctly. The format is
> certainly specified in the HLSL; it would seem surprising (though not
> inconceivable) that the information just gets dropped when generating
> the bytecode.
>
It appears from the spec we are not missing anything. The obvious way to
encode a format component count is in the dword which specifies the type of
each component. Those beyond the last component could be
D3D11_SB_RETURN_TYPE_UNUSED, but instead they all have the same type.
There's no other place to store it. The output from /dumpbin has four
components for the declaration too, and the load instruction specifies a
vec4 load. Looks like the actual format component count is left out.
July 29, 2022
[PATCH v2] ntdll/signalx86_64: Add CFI for __wine_syscall_dispatcher
by Keno Fischer
In a debugger that is capable of loading both PE and ELF libraries
(e.g. the wine-enhanced GDB version at [1]), this unwind information
will allow proper unwind across the __wine_syscall_dispatcher.
The CFI itself is relatively straightforward, though the implementation
looks a little complex, because support for proper CFI encoding is
somewhat limitied in the GNU toolchain. Essentially, as registers are
stored in the rcx buffer in this function, we switch their cfi
description to point at that rcx buffer, so the registers may be
freely used thereafter without affecting the unwind. Eventually the
rcx buffer is tracked in rbp instead at which point we pivot the
CFI information as well and keep it there for most of the rest of
the function.
[1] https://github.com/JuliaComputing/gdb-solib-wine
Signed-off-by: Keno Fischer <keno(a)juliacomputing.com>
---
v2: Fix accidental build issues introduced during cleanup.
(And missed in my build test, because I forgot to enable
win64, sigh).
dlls/ntdll/unix/signal_x86_64.c | 181 ++++++++++++++++++++++++++++++++
1 file changed, 181 insertions(+)
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index d6f19dbfa84..2d33df8bccd 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -442,6 +442,10 @@ static USHORT fs32_sel; /* selector for %fs in 32-bit mode */
* Definitions for Dwarf unwind tables
*/
+/* For use in inline-assembly and other contexts where C enums are unavailable */
+#define PP_DW_CFA_def_cfa_expression 0xf
+#define PP_DW_CFA_expression 0x10
+
enum dwarf_call_frame_info
{
DW_CFA_advance_loc = 0x40,
@@ -472,6 +476,14 @@ enum dwarf_call_frame_info
DW_CFA_val_expression = 0x16,
};
+/* DWARF State machine ops */
+#define PP_DW_OP_const1u 0x08
+#define PP_DW_OP_breg_base 0x70
+#define PP_DW_OP_minus 0x1c
+#define PP_DW_OP_deref 0x06
+#define PP_DW_OP_plus 0x22
+#define PP_DW_OP_plus_uconst 0x23
+
enum dwarf_operation
{
DW_OP_addr = 0x03,
@@ -3288,35 +3300,177 @@ __ASM_GLOBAL_FUNC( signal_exit_thread,
__ASM_CFI(".cfi_rel_offset %r15,8\n\t")
"call *%rsi" )
+
+/***********************************************************************
+ * CFI Utility definitions
+ *
+ * These utility definitions help encode CFI unwind information (for consumption
+ * in gdb and similar debuggers), improving the accuracy of backtraces.
+ */
+
+/* DWARF Register ordering for x86_64 */
+#define X86_64_DWARF_RAX 0x00
+#define X86_64_DWARF_RDX 0x01
+#define X86_64_DWARF_RCX 0x02
+#define X86_64_DWARF_RBX 0x03
+#define X86_64_DWARF_RSI 0x04
+#define X86_64_DWARF_RDI 0x05
+#define X86_64_DWARF_RBP 0x06
+#define X86_64_DWARF_RSP 0x07
+#define X86_64_DWARF_R8 0x08
+#define X86_64_DWARF_R9 0x09
+#define X86_64_DWARF_R10 0x0a
+#define X86_64_DWARF_R11 0x0b
+#define X86_64_DWARF_R12 0x0c
+#define X86_64_DWARF_R13 0x0d
+#define X86_64_DWARF_R14 0x0e
+#define X86_64_DWARF_R15 0x0f
+#define X86_64_DWARF_RIP 0x10
+
+/* __ASM_REG_IS_DEREF_REF_OFFSET(REG_SAVE, REG, OFFSET)
+ *
+ * Declare that the register with DWARF register number `REG` is
+ * saved at offset `OFFSET` from the register with DWARF register
+ * number `REG_SAVE`. I.e.:
+ *
+ * REG (in previous frame) = *(%REG_SAVE + OFFSET)
+ */
+#define _STR(R) #R
+#define __STR(R) _STR(R)
+#define __ASM_REG_IS_DEREF_REF_OFFSET(REG_SAVE, REG, OFFSET) \
+ ".cfi_escape " __STR(PP_DW_CFA_expression) ", " \
+ _STR(REG) "," /* The register being saved */ \
+ " 0x02," /* 2 bytes follow */ \
+ __STR(PP_DW_OP_breg_base) " + " _STR(REG_SAVE) ", " #OFFSET ";\n\t"
+
+/* __ASM_REG_IS_DEREF_REF_OFFSET2(REG_SAVE, REG, OFFSET1, OFFSET2)
+ *
+ * Like __ASM_REG_IS_DEREF_REF_OFFSET, expect for offsets of more than
+ * 7 bits. Takes an SLEB128 encoded offset as two bytes. Thus to e.g.
+ * encode an offset of 0x70, convert to SLEB128 first:
+ *
+ * HEX: 0x70
+ * BINARY: 01110000
+ * SLEB128: 11110000 00000000
+ * |||||||| ||||||||
+ * |||||||| \------- High bits
+ * |\------ Low bits
+ * \- Continuation Bit
+ *
+ * SLEB128: 0xf0 0x00
+ */
+#define __ASM_REG_IS_DEREF_REF_OFFSET2(REG_SAVE, REG, OFFSET1, OFFSET2) \
+ ".cfi_escape " __STR(PP_DW_CFA_expression) ", " \
+ _STR(REG) "," /* The register being saved */ \
+ " 0x03," /* 3 bytes follow */ \
+ __STR(PP_DW_OP_breg_base) " + " _STR(REG_SAVE) ", " #OFFSET1 ", " #OFFSET2 ";\n\t"
+
+/* __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, REG, OFFSET, OFFSET_SUB)
+ *
+ * Like __ASM_REG_IS_DEREF_REF_OFFSET, except encodes that the saved
+ * register value is at `*(%REG_SAVE + OFFSET - OFFSET_SUB).
+ */
+#define __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, REG, OFFSET, OFFSET_SUB) \
+ ".cfi_escape " __STR(PP_DW_CFA_expression) ", " \
+ _STR(REG) "," /* The register being saved */ \
+ " 0x05," /* 5 bytes follow */ \
+ __STR(PP_DW_OP_breg_base) " + " _STR(REG_SAVE) ", " #OFFSET "," \
+ __STR(PP_DW_OP_const1u) ", " #OFFSET_SUB "," __STR(PP_DW_OP_minus) ";\n\t"
+
+/* __ASM_CFA_AT_REG_OFFSET(REG_SAVE, OFFSET)
+ *
+ * Declares the CFA of set frame to be stored at *(REG_SAVE + OFFSET).
+ * Note that the CFA is ordinarily the same as the stack pointer at the end
+ * of the previous frame, but these are technically separate concepts.
+ */
+#define __ASM_CFA_AT_REG_OFFSET(REG_SAVE, OFFSET) \
+ ".cfi_escape " __STR(PP_DW_CFA_def_cfa_expression) "," \
+ " 0x03," /* 3 bytes follow */ \
+ __STR(PP_DW_OP_breg_base) " + " _STR(REG_SAVE) ", " #OFFSET ", " \
+ __STR(PP_DW_OP_deref) ";\n\t"
+
+/* __ASM_CFA_AT_REG_OFFSET2(REG_SAVE, OFFSET_HIGH, OFFSET_LOW)
+ *
+ * Like __ASM_CFA_AT_REG_OFFSET, except used for larger offsets. `OFFSET_LOW` encodes
+ * the low 7 bits of the offset. `OFFSET_HIGH` the next 7 bits.
+ */
+#define __ASM_CFA_AT_REG_OFFSET2(REG_SAVE, OFFSET_HIGH, OFFSET_LOW) \
+ ".cfi_escape " __STR(PP_DW_CFA_def_cfa_expression) "," \
+ " 0x04," /* 4 bytes follow */ \
+ __STR(PP_DW_OP_breg_base) " + " _STR(REG_SAVE) ", " #OFFSET_LOW " | 0x80 , " #OFFSET_HIGH ", " \
+ __STR(PP_DW_OP_deref) ";\n\t"
+
+#define __ASM_REG_IS_DEREF_RCX_OFFSET(REG, OFFSET) \
+ __ASM_REG_IS_DEREF_REF_OFFSET(X86_64_DWARF_RCX, REG, OFFSET)
+#define __ASM_REG_IS_DEREF_RCX_OFFSET2(REG, OFFSET_HIGH, OFFSET_LOW) \
+ __ASM_REG_IS_DEREF_REF_OFFSET2(X86_64_DWARF_RCX, REG, OFFSET_LOW | 0x80, OFFSET_HIGH)
+
+/* __ASM_REGSAVE_AT_DWARF_REG_MINUS(REG_SAVE, OFFSET_SUB)
+ *
+ * Declares that a `struct syscall_frame` containing the previous frame's registers may
+ * be found at `*(struct syscall_frame*)(%REG_SAVE - OFFSET_SUB)` and declares both the
+ * CFA and saved registers may be found in the corresponding offset.
+ */
+#define __ASM_REGSAVE_AT_DWARF_REG_MINUS(REG_SAVE, OFFSET_SUB) \
+ /* N.B.: First argument is SLEB128 encoded, so move the high bit over \
+ to the subtraction */ \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RIP, 0x00, OFFSET_SUB - 0x70) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RAX, 0x00, OFFSET_SUB) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RBX, 0x08, OFFSET_SUB) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RDX, 0x18, OFFSET_SUB) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RSI, 0x20, OFFSET_SUB) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RDI, 0x28, OFFSET_SUB) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_R12, 0x00, OFFSET_SUB - 0x50) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_R14, 0x10, OFFSET_SUB - 0x50) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RSP, 0x08, OFFSET_SUB - 0x80) \
+ /* -0x10 in 7bit 2's complement */ \
+ __ASM_CFA_AT_REG_OFFSET(REG_SAVE, 0x70) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RBP, 0x18, OFFSET_SUB - 0x80)
+
/***********************************************************************
* __wine_syscall_dispatcher
*/
__ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"movq %gs:0x30,%rcx\n\t"
+ __ASM_CFI(".cfi_undefined rcx\n\t")
"movq 0x328(%rcx),%rcx\n\t" /* amd64_thread_data()->syscall_frame */
"popq 0x70(%rcx)\n\t" /* frame->rip */
+ __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t")
+ __ASM_REG_IS_DEREF_RCX_OFFSET2(X86_64_DWARF_RIP, 0x00, 0x70)
"pushfq\n\t"
+ __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t")
"popq 0x80(%rcx)\n\t"
+ __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t")
"movl $0,0x94(%rcx)\n\t" /* frame->restore_flags */
".globl " __ASM_NAME("__wine_syscall_dispatcher_prolog_end") "\n"
__ASM_NAME("__wine_syscall_dispatcher_prolog_end") ":\n\t"
"movq %rax,0x00(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET(X86_64_DWARF_RAX, 0x00)
"movq %rbx,0x08(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET(X86_64_DWARF_RBX, 0x08)
"movq %rdx,0x18(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET(X86_64_DWARF_RDX, 0x18)
"movq %rsi,0x20(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET(X86_64_DWARF_RSI, 0x20)
"movq %rdi,0x28(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET(X86_64_DWARF_RDI, 0x28)
"movq %r12,0x50(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET2(X86_64_DWARF_R12, 0x00, 0x50)
"movq %r13,0x58(%rcx)\n\t"
"movq %r14,0x60(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET2(X86_64_DWARF_R14, 0x00, 0x60)
"movq %r15,0x68(%rcx)\n\t"
"movw %cs,0x78(%rcx)\n\t"
"movw %ds,0x7a(%rcx)\n\t"
"movw %es,0x7c(%rcx)\n\t"
"movw %fs,0x7e(%rcx)\n\t"
"movq %rsp,0x88(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET2(X86_64_DWARF_RSP, 0x01, 0x08)
+ __ASM_CFA_AT_REG_OFFSET2(X86_64_DWARF_RCX, 0x01, 0x08)
"movw %ss,0x90(%rcx)\n\t"
"movw %gs,0x92(%rcx)\n\t"
"movq %rbp,0x98(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET2(X86_64_DWARF_RBP, 0x01, 0x18)
/* Legends of Runeterra hooks the first system call return instruction, and
* depends on us returning to it. Adjust the return address accordingly. */
"subq $0xb,0x70(%rcx)\n\t"
@@ -3341,6 +3495,8 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"jmp 3f\n"
"2:\tfxsave64 0xc0(%rcx)\n"
"3:\tleaq 0x98(%rcx),%rbp\n\t"
+ __ASM_CFI(".cfi_remember_state\n\t")
+ __ASM_REGSAVE_AT_DWARF_REG_MINUS(X86_64_DWARF_RBP, 0x98)
#ifdef __linux__
"testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */
"jz 2f\n\t"
@@ -3402,35 +3558,60 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"jmp 4f\n"
"3:\tfxrstor64 0xc0(%rcx)\n"
"4:\tmovq 0x98(%rcx),%rbp\n\t"
+ __ASM_CFI(".cfi_restore_state\n\t")
"movq 0x68(%rcx),%r15\n\t"
+ __ASM_CFI(".cfi_same_value r15\n\t")
"movq 0x60(%rcx),%r14\n\t"
+ __ASM_CFI(".cfi_same_value r14\n\t")
"movq 0x58(%rcx),%r13\n\t"
+ __ASM_CFI(".cfi_same_value r13\n\t")
"movq 0x50(%rcx),%r12\n\t"
+ __ASM_CFI(".cfi_same_value r12\n\t")
"movq 0x28(%rcx),%rdi\n\t"
+ __ASM_CFI(".cfi_same_value rdi\n\t")
"movq 0x20(%rcx),%rsi\n\t"
+ __ASM_CFI(".cfi_same_value rsi\n\t")
"movq 0x08(%rcx),%rbx\n\t"
+ __ASM_CFI(".cfi_same_value rbx\n\t")
"testl $0x3,%edx\n\t" /* CONTEXT_CONTROL | CONTEXT_INTEGER */
"jnz 1f\n\t"
+ __ASM_CFI(".cfi_remember_state\n\t")
"movq 0x80(%rcx),%r11\n\t" /* frame->eflags */
+ __ASM_CFI(".cfi_same_value r11\n\t")
"pushq %r11\n\t"
"popfq\n\t"
"movq 0x88(%rcx),%rsp\n\t"
+ __ASM_CFI(".cfi_same_value rsp\n\t")
"movq 0x70(%rcx),%rcx\n\t" /* frame->rip */
+ __ASM_CFI(".cfi_register rip, rcx\n\t")
"jmpq *%rcx\n\t"
"1:\tleaq 0x70(%rcx),%rsp\n\t"
+ __ASM_CFI(".cfi_restore_state\n\t")
+ __ASM_CFI(".cfi_remember_state\n\t")
"testl $0x2,%edx\n\t" /* CONTEXT_INTEGER */
"jnz 1f\n\t"
"movq 0x10(%rsp),%r11\n\t" /* frame->eflags */
+ __ASM_CFI(".cfi_same_value r11\n\t")
"movq (%rsp),%rcx\n\t" /* frame->rip */
+ __ASM_CFI(".cfi_register rip, rcx\n\t")
"iretq\n"
"1:\tmovq 0x00(%rcx),%rax\n\t"
+ __ASM_CFI(".cfi_restore_state\n\t")
+ __ASM_CFI(".cfi_same_value rax\n\t")
"movq 0x18(%rcx),%rdx\n\t"
+ __ASM_CFI(".cfi_same_value rdx\n\t")
"movq 0x30(%rcx),%r8\n\t"
+ __ASM_CFI(".cfi_same_value r8\n\t")
"movq 0x38(%rcx),%r9\n\t"
+ __ASM_CFI(".cfi_same_value r9\n\t")
"movq 0x40(%rcx),%r10\n\t"
+ __ASM_CFI(".cfi_same_value r10\n\t")
"movq 0x48(%rcx),%r11\n\t"
+ __ASM_CFI(".cfi_same_value r11\n\t")
"movq 0x10(%rcx),%rcx\n"
+ __ASM_REG_IS_DEREF_REF_OFFSET(X86_64_DWARF_RSP, X86_64_DWARF_RIP, 0)
"iretq\n"
+ __ASM_REGSAVE_AT_DWARF_REG_MINUS(X86_64_DWARF_RBP, 0x98)
"5:\tmovl $0xc000000d,%edx\n\t" /* STATUS_INVALID_PARAMETER */
"movq %rsp,%rcx\n\t"
".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n"
--
2.25.1
July 29, 2022
Re: [PATCH] ntdll/signalx86_64: Add CFI for __wine_syscall_dispatcher
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120103
Your paranoid android.
=== debian11 (build log) ===
../wine/dlls/ntdll/unix/signal_x86_64.c:3339:60: error: '#' is not followed by a macro parameter
../wine/dlls/ntdll/unix/signal_x86_64.c:3361:71: error: '#' is not followed by a macro parameter
../wine/dlls/ntdll/unix/signal_x86_64.c:3372:78: error: '#' is not followed by a macro parameter
../wine/dlls/ntdll/unix/signal_x86_64.c:3385:49: error: '#' is not followed by a macro parameter
../wine/dlls/ntdll/unix/signal_x86_64.c:3396:67: error: '#' is not followed by a macro parameter
../wine/dlls/ntdll/unix/signal_x86_64.c:3405:5: error: expected ‘)’ before ‘__ASM_REG_IS_DEREF_REF_OFFSET2’
Task: The wow64 Wine build failed
July 29, 2022
[PATCH] ntdll/signalx86_64: Add CFI for __wine_syscall_dispatcher
by Keno Fischer
In a debugger that is capable of loading both PE and ELF libraries
(e.g. the wine-enhanced GDB version at [1]), this unwind information
will allow proper unwind across the __wine_syscall_dispatcher.
The CFI itself is relatively straightforward, though the implementation
looks a little complex, because support for proper CFI encoding is
somewhat limitied in the GNU toolchain. Essentially, as registers are
stored in the rcx buffer in this function, we switch their cfi
description to point at that rcx buffer, so the registers may be
freely used thereafter without affecting the unwind. Eventually the
rcx buffer is tracked in rbp instead at which point we pivot the
CFI information as well and keep it there for most of the rest of
the function.
[1] https://github.com/JuliaComputing/gdb-solib-wine
Signed-off-by: Keno Fischer <keno(a)juliacomputing.com>
---
dlls/ntdll/unix/signal_x86_64.c | 180 ++++++++++++++++++++++++++++++++
1 file changed, 180 insertions(+)
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index d6f19dbfa84..a6b79335fab 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -442,6 +442,10 @@ static USHORT fs32_sel; /* selector for %fs in 32-bit mode */
* Definitions for Dwarf unwind tables
*/
+/* For use in inline-assembly and other contexts where C enums are unavailable */
+#define PP_DW_CFA_def_cfa_expression 0xf
+#define PP_DW_CFA_expression 0x10
+
enum dwarf_call_frame_info
{
DW_CFA_advance_loc = 0x40,
@@ -472,6 +476,14 @@ enum dwarf_call_frame_info
DW_CFA_val_expression = 0x16,
};
+/* DWARF State machine ops */
+#define PP_DW_OP_const1u 0x08
+#define PP_DW_OP_breg_base 0x70
+#define PP_DW_OP_minus 0x1c
+#define PP_DW_OP_deref 0x06
+#define PP_DW_OP_plus 0x22
+#define PP_DW_OP_plus_uconst 0x23
+
enum dwarf_operation
{
DW_OP_addr = 0x03,
@@ -3288,35 +3300,176 @@ __ASM_GLOBAL_FUNC( signal_exit_thread,
__ASM_CFI(".cfi_rel_offset %r15,8\n\t")
"call *%rsi" )
+
+/***********************************************************************
+ * CFI Utility definitions
+ *
+ * These utility definitions help encode CFI unwind information (for consumption
+ * in gdb and similar debuggers), improving the accuracy of backtraces.
+ */
+
+/* DWARF Register ordering for x86_64 */
+#define X86_64_DWARF_RAX 0x00
+#define X86_64_DWARF_RDX 0x01
+#define X86_64_DWARF_RCX 0x02
+#define X86_64_DWARF_RBX 0x03
+#define X86_64_DWARF_RSI 0x04
+#define X86_64_DWARF_RDI 0x05
+#define X86_64_DWARF_RBP 0x06
+#define X86_64_DWARF_RSP 0x07
+#define X86_64_DWARF_R8 0x08
+#define X86_64_DWARF_R9 0x09
+#define X86_64_DWARF_R10 0x0a
+#define X86_64_DWARF_R11 0x0b
+#define X86_64_DWARF_R12 0x0c
+#define X86_64_DWARF_R13 0x0d
+#define X86_64_DWARF_R14 0x0e
+#define X86_64_DWARF_R15 0x0f
+#define X86_64_DWARF_RIP 0x10
+
+/* __ASM_REG_IS_DEREF_REF_OFFSET(REG_SAVE, REG, OFFSET)
+ *
+ * Declare that the register with DWARF register number `REG` is
+ * saved at offset `OFFSET` from the register with DWARF register
+ * number `REG_SAVE`. I.e.:
+ *
+ * REG (in previous frame) = *(%REG_SAVE + OFFSET)
+ */
+#define _STR(R) #R
+#define __ASM_REG_IS_DEREF_REF_OFFSET(REG_SAVE, REG, OFFSET) \
+ ".cfi_escape " #PP_DW_CFA_expression", " \
+ _STR(REG) "," /* The register being saved */ \
+ " 0x02," /* 2 bytes follow */ \
+ #PP_DW_OP_breg_base " + " _STR(REG_SAVE) ", " #OFFSET ";\n\t"
+
+/* __ASM_REG_IS_DEREF_REF_OFFSET2(REG_SAVE, REG, OFFSET1, OFFSET2)
+ *
+ * Like __ASM_REG_IS_DEREF_REF_OFFSET, expect for offsets of more than
+ * 7 bits. Takes an SLEB128 encoded offset as two bytes. Thus to e.g.
+ * encode an offset of 0x70, convert to SLEB128 first:
+ *
+ * HEX: 0x70
+ * BINARY: 01110000
+ * SLEB128: 11110000 00000000
+ * |||||||| ||||||||
+ * |||||||| \------- High bits
+ * |\------ Low bits
+ * \- Continuation Bit
+ *
+ * SLEB128: 0xf0 0x00
+ */
+#define __ASM_REG_IS_DEREF_REF_OFFSET2(REG_SAVE, REG, OFFSET1, OFFSET2) \
+ ".cfi_escape " #PP_DW_CFA_expression", " \
+ _STR(REG) "," /* The register being saved */ \
+ " 0x03," /* 3 bytes follow */ \
+ #PP_DW_OP_breg_base " + " _STR(REG_SAVE) ", " #OFFSET1 ", " #OFFSET2 ";\n\t"
+
+/* __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, REG, OFFSET, OFFSET_SUB)
+ *
+ * Like __ASM_REG_IS_DEREF_REF_OFFSET, except encodes that the saved
+ * register value is at `*(%REG_SAVE + OFFSET - OFFSET_SUB).
+ */
+#define __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, REG, OFFSET, OFFSET_SUB) \
+ ".cfi_escape " #PP_DW_CFA_expression", " \
+ _STR(REG) "," /* The register being saved */ \
+ " 0x05," /* 5 bytes follow */ \
+ #PP_DW_OP_breg_base " + " _STR(REG_SAVE) ", " #OFFSET "," \
+ #PP_DW_OP_const1u ", " #OFFSET_SUB "," #PP_DW_OP_minus ";\n\t"
+
+/* __ASM_CFA_AT_REG_OFFSET(REG_SAVE, OFFSET)
+ *
+ * Declares the CFA of set frame to be stored at *(REG_SAVE + OFFSET).
+ * Note that the CFA is ordinarily the same as the stack pointer at the end
+ * of the previous frame, but these are technically separate concepts.
+ */
+#define __ASM_CFA_AT_REG_OFFSET(REG_SAVE, OFFSET) \
+ ".cfi_escape " #PP_DW_CFA_def_cfa_expression "," \
+ " 0x03," /* 3 bytes follow */ \
+ #PP_DW_OP_breg_base " + " _STR(REG_SAVE) ", " #OFFSET ", " \
+ #PP_DW_OP_deref ";\n\t"
+
+/* __ASM_CFA_AT_REG_OFFSET2(REG_SAVE, OFFSET_HIGH, OFFSET_LOW)
+ *
+ * Like __ASM_CFA_AT_REG_OFFSET, except used for larger offsets. `OFFSET_LOW` encodes
+ * the low 7 bits of the offset. `OFFSET_HIGH` the next 7 bits.
+ */
+#define __ASM_CFA_AT_REG_OFFSET2(REG_SAVE, OFFSET_HIGH, OFFSET_LOW) \
+ ".cfi_escape " DW_CFA_def_cfa_expression "," \
+ " 0x04," /* 4 bytes follow */ \
+ #PP_DW_OP_breg_base " + " _STR(REG_SAVE) ", " #OFFSET_LOW " | 0x80 , " #OFFSET_HIGH ", " \
+ #PP_DW_OP_deref ";\n\t"
+
+#define __ASM_REG_IS_DEREF_RCX_OFFSET(REG, OFFSET) \
+ __ASM_REG_IS_DEREF_REF_OFFSET(X86_64_DWARF_RCX, REG, OFFSET)
+#define __ASM_REG_IS_DEREF_RCX_OFFSET2(REG, OFFSET_HIGH, OFFSET_LOW) \
+ __ASM_REG_IS_DEREF_REF_OFFSET2(X86_64_DWARF_RCX, REG, OFFSET_LOW | 0x80, OFFSET_HIGH)
+
+/* __ASM_REGSAVE_AT_DWARF_REG_MINUS(REG_SAVE, OFFSET_SUB)
+ *
+ * Declares that a `struct syscall_frame` containing the previous frame's registers may
+ * be found at `*(struct syscall_frame*)(%REG_SAVE - OFFSET_SUB)` and declares both the
+ * CFA and saved registers may be found in the corresponding offset.
+ */
+#define __ASM_REGSAVE_AT_DWARF_REG_MINUS(REG_SAVE, OFFSET_SUB) \
+ /* N.B.: First argument is SLEB128 encoded, so move the high bit over \
+ to the subtraction */ \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RIP, 0x00, OFFSET_SUB - 0x70) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RAX, 0x00, OFFSET_SUB) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RBX, 0x08, OFFSET_SUB) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RDX, 0x18, OFFSET_SUB) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RSI, 0x20, OFFSET_SUB) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RDI, 0x28, OFFSET_SUB) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_R12, 0x00, OFFSET_SUB - 0x50) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_R14, 0x10, OFFSET_SUB - 0x50) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RSP, 0x08, OFFSET_SUB - 0x80) \
+ /* -0x10 in 7bit 2's complement */ \
+ __ASM_CFA_AT_REG_OFFSET(REG_SAVE, 0x70) \
+ __ASM_REG_IS_DEREF_REF_OFFSET_MINUS(REG_SAVE, X86_64_DWARF_RBP, 0x18, OFFSET_SUB - 0x80)
+
/***********************************************************************
* __wine_syscall_dispatcher
*/
__ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"movq %gs:0x30,%rcx\n\t"
+ __ASM_CFI(".cfi_undefined rcx\n\t")
"movq 0x328(%rcx),%rcx\n\t" /* amd64_thread_data()->syscall_frame */
"popq 0x70(%rcx)\n\t" /* frame->rip */
+ __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t")
+ __ASM_REG_IS_DEREF_RCX_OFFSET2(X86_64_DWARF_RIP, 0x00, 0x70)
"pushfq\n\t"
+ __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t")
"popq 0x80(%rcx)\n\t"
+ __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t")
"movl $0,0x94(%rcx)\n\t" /* frame->restore_flags */
".globl " __ASM_NAME("__wine_syscall_dispatcher_prolog_end") "\n"
__ASM_NAME("__wine_syscall_dispatcher_prolog_end") ":\n\t"
"movq %rax,0x00(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET(X86_64_DWARF_RAX, 0x00)
"movq %rbx,0x08(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET(X86_64_DWARF_RBX, 0x08)
"movq %rdx,0x18(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET(X86_64_DWARF_RDX, 0x18)
"movq %rsi,0x20(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET(X86_64_DWARF_RSI, 0x20)
"movq %rdi,0x28(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET(X86_64_DWARF_RDI, 0x28)
"movq %r12,0x50(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET2(X86_64_DWARF_R12, 0x00, 0x50)
"movq %r13,0x58(%rcx)\n\t"
"movq %r14,0x60(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET2(X86_64_DWARF_R14, 0x00, 0x60)
"movq %r15,0x68(%rcx)\n\t"
"movw %cs,0x78(%rcx)\n\t"
"movw %ds,0x7a(%rcx)\n\t"
"movw %es,0x7c(%rcx)\n\t"
"movw %fs,0x7e(%rcx)\n\t"
"movq %rsp,0x88(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET2(X86_64_DWARF_RSP, 0x01, 0x08)
+ __ASM_CFA_AT_REG_OFFSET2(X86_64_DWARF_RCX, 0x01, 0x08)
"movw %ss,0x90(%rcx)\n\t"
"movw %gs,0x92(%rcx)\n\t"
"movq %rbp,0x98(%rcx)\n\t"
+ __ASM_REG_IS_DEREF_RCX_OFFSET2(X86_64_DWARF_RBP, 0x01, 0x18)
/* Legends of Runeterra hooks the first system call return instruction, and
* depends on us returning to it. Adjust the return address accordingly. */
"subq $0xb,0x70(%rcx)\n\t"
@@ -3341,6 +3494,8 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"jmp 3f\n"
"2:\tfxsave64 0xc0(%rcx)\n"
"3:\tleaq 0x98(%rcx),%rbp\n\t"
+ __ASM_CFI(".cfi_remember_state\n\t")
+ __ASM_REGSAVE_AT_DWARF_REG_MINUS(X86_64_DWARF_RBP, 0x98)
#ifdef __linux__
"testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */
"jz 2f\n\t"
@@ -3402,35 +3557,60 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
"jmp 4f\n"
"3:\tfxrstor64 0xc0(%rcx)\n"
"4:\tmovq 0x98(%rcx),%rbp\n\t"
+ __ASM_CFI(".cfi_restore_state\n\t")
"movq 0x68(%rcx),%r15\n\t"
+ __ASM_CFI(".cfi_same_value r15\n\t")
"movq 0x60(%rcx),%r14\n\t"
+ __ASM_CFI(".cfi_same_value r14\n\t")
"movq 0x58(%rcx),%r13\n\t"
+ __ASM_CFI(".cfi_same_value r13\n\t")
"movq 0x50(%rcx),%r12\n\t"
+ __ASM_CFI(".cfi_same_value r12\n\t")
"movq 0x28(%rcx),%rdi\n\t"
+ __ASM_CFI(".cfi_same_value rdi\n\t")
"movq 0x20(%rcx),%rsi\n\t"
+ __ASM_CFI(".cfi_same_value rsi\n\t")
"movq 0x08(%rcx),%rbx\n\t"
+ __ASM_CFI(".cfi_same_value rbx\n\t")
"testl $0x3,%edx\n\t" /* CONTEXT_CONTROL | CONTEXT_INTEGER */
"jnz 1f\n\t"
+ __ASM_CFI(".cfi_remember_state\n\t")
"movq 0x80(%rcx),%r11\n\t" /* frame->eflags */
+ __ASM_CFI(".cfi_same_value r11\n\t")
"pushq %r11\n\t"
"popfq\n\t"
"movq 0x88(%rcx),%rsp\n\t"
+ __ASM_CFI(".cfi_same_value rsp\n\t")
"movq 0x70(%rcx),%rcx\n\t" /* frame->rip */
+ __ASM_CFI(".cfi_register rip, rcx\n\t")
"jmpq *%rcx\n\t"
"1:\tleaq 0x70(%rcx),%rsp\n\t"
+ __ASM_CFI(".cfi_restore_state\n\t")
+ __ASM_CFI(".cfi_remember_state\n\t")
"testl $0x2,%edx\n\t" /* CONTEXT_INTEGER */
"jnz 1f\n\t"
"movq 0x10(%rsp),%r11\n\t" /* frame->eflags */
+ __ASM_CFI(".cfi_same_value r11\n\t")
"movq (%rsp),%rcx\n\t" /* frame->rip */
+ __ASM_CFI(".cfi_register rip, rcx\n\t")
"iretq\n"
"1:\tmovq 0x00(%rcx),%rax\n\t"
+ __ASM_CFI(".cfi_restore_state\n\t")
+ __ASM_CFI(".cfi_same_value rax\n\t")
"movq 0x18(%rcx),%rdx\n\t"
+ __ASM_CFI(".cfi_same_value rdx\n\t")
"movq 0x30(%rcx),%r8\n\t"
+ __ASM_CFI(".cfi_same_value r8\n\t")
"movq 0x38(%rcx),%r9\n\t"
+ __ASM_CFI(".cfi_same_value r9\n\t")
"movq 0x40(%rcx),%r10\n\t"
+ __ASM_CFI(".cfi_same_value r10\n\t")
"movq 0x48(%rcx),%r11\n\t"
+ __ASM_CFI(".cfi_same_value r11\n\t")
"movq 0x10(%rcx),%rcx\n"
+ __ASM_REG_IS_DEREF_REF_OFFSET(X86_64_DWARF_RSP, X86_64_DWARF_RIP, 0)
"iretq\n"
+ __ASM_REGSAVE_AT_DWARF_REG_MINUS(X86_64_DWARF_RBP, 0x98)
"5:\tmovl $0xc000000d,%edx\n\t" /* STATUS_INVALID_PARAMETER */
"movq %rsp,%rcx\n\t"
".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n"
--
2.25.1
July 29, 2022
Re: [PATCH v4 01/11] winmm/tests: Add tests for visibility of video window.
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120073
Your paranoid android.
=== w7u_adm (32 bit report) ===
winmm:
midi.c:1039: Test failed: bad message 1e/0 from midiStreamOut, expect 3c9/22f940
midi.c:1048: Test failed: bad message 3c9/22f940 from midiStreamClose, expect 3c8/0
=== w7u_el (32 bit report) ===
winmm:
midi.c:988: Test failed: bad message 1e/0 from midiStreamOpen, expect 3c7/0
midi.c:1039: Test failed: bad message 3c7/0 from midiStreamOut, expect 3c9/22f940
midi.c:1048: Test failed: bad message 3c9/22f940 from midiStreamClose, expect 3c8/0
July 28, 2022
Re: [PATCH v3 2/2] ddraw/tests: Add some video memory accounting tests.
by Marvin
Hi,
It looks like your patch introduced the new failures shown below.
Please investigate and fix them before resubmitting your patch.
If they are not new, fixing them anyway would help a lot. Otherwise
please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how
to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=120071
Your paranoid android.
=== w8adm (32 bit report) ===
ddraw:
ddraw7.c:18888: Test failed: Got unexpected color 0x0000ff00.
=== w864 (32 bit report) ===
ddraw:
ddraw7.c:18888: Test failed: Got unexpected color 0x0000ff00.
=== w1064_tsign (32 bit report) ===
ddraw:
ddraw7.c:18888: Test failed: Got unexpected color 0x00000040.
=== debian11 (32 bit Chinese:China report) ===
Report validation errors:
ddraw1: Timeout
=== debian11 (build log) ===
WineRunWineTest.pl:error: The task timed out
July 28, 2022
Re: [PATCH vkd3d v3 17/17] vkd3d-shader/hlsl: Replace register offsets with index paths in split copies.
by Matteo Bruni
On Wed, Jul 20, 2022 at 3:24 PM Francisco Casas <fcasas(a)codeweavers.com> wrote:
>
> hlsl_new_store() and hlsl_new_load() are deleted, so now there are no more
> direct ways to create derefs with offsets in hlsl.c and hlsl.h.
>
> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
> ---
>
> v3:
> * No changes.
>
> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
> ---
> libs/vkd3d-shader/hlsl.c | 32 -------------------------
> libs/vkd3d-shader/hlsl.h | 4 ----
> libs/vkd3d-shader/hlsl_codegen.c | 40 +++++++++-----------------------
> 3 files changed, 11 insertions(+), 65 deletions(-)
>
> diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
> index 20dcd9af..6b187e7d 100644
> --- a/libs/vkd3d-shader/hlsl.c
> +++ b/libs/vkd3d-shader/hlsl.c
> @@ -795,25 +795,6 @@ void hlsl_cleanup_deref(struct hlsl_deref *deref)
> hlsl_src_remove(&deref->offset);
> }
>
> -struct hlsl_ir_store *hlsl_new_store(struct hlsl_ctx *ctx, struct hlsl_ir_var *var, struct hlsl_ir_node *offset,
> - struct hlsl_ir_node *rhs, unsigned int writemask, struct vkd3d_shader_location loc)
> -{
> - struct hlsl_ir_store *store;
> -
> - if (!writemask && type_is_single_reg(rhs->data_type))
> - writemask = (1 << rhs->data_type->dimx) - 1;
> -
> - if (!(store = hlsl_alloc(ctx, sizeof(*store))))
> - return NULL;
> -
> - init_node(&store->node, HLSL_IR_STORE, NULL, loc);
> - init_deref(ctx, &store->lhs, var, 0);
> - hlsl_src_from_node(&store->lhs.offset, offset);
> - hlsl_src_from_node(&store->rhs, rhs);
> - store->writemask = writemask;
> - return store;
> -}
> -
> /* Initializes a simple variable derefence, so that it can be passed to load/store functions. */
> void hlsl_init_simple_deref_from_var(struct hlsl_deref *deref, struct hlsl_ir_var *var)
> {
> @@ -969,19 +950,6 @@ struct hlsl_ir_if *hlsl_new_if(struct hlsl_ctx *ctx, struct hlsl_ir_node *condit
> return iff;
> }
>
> -struct hlsl_ir_load *hlsl_new_load(struct hlsl_ctx *ctx, struct hlsl_ir_var *var, struct hlsl_ir_node *offset,
> - struct hlsl_type *type, const struct vkd3d_shader_location loc)
> -{
> - struct hlsl_ir_load *load;
> -
> - if (!(load = hlsl_alloc(ctx, sizeof(*load))))
> - return NULL;
> - init_node(&load->node, HLSL_IR_LOAD, type, loc);
> - init_deref(ctx, &load->src, var, 0);
> - hlsl_src_from_node(&load->src.offset, offset);
> - return load;
> -}
> -
> struct hlsl_ir_load *hlsl_new_load_index(struct hlsl_ctx *ctx, const struct hlsl_deref *deref,
> struct hlsl_ir_node *idx, const struct vkd3d_shader_location *loc)
> {
> diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h
> index e1ddd0cf..77005407 100644
> --- a/libs/vkd3d-shader/hlsl.h
> +++ b/libs/vkd3d-shader/hlsl.h
> @@ -774,11 +774,7 @@ struct hlsl_ir_resource_load *hlsl_new_resource_load(struct hlsl_ctx *ctx, struc
> enum hlsl_resource_load_type type, struct hlsl_deref *resource, struct hlsl_deref *sampler,
> struct hlsl_ir_node *coords, struct hlsl_ir_node *texel_offset, const struct vkd3d_shader_location *loc);
>
> -struct hlsl_ir_load *hlsl_new_load(struct hlsl_ctx *ctx, struct hlsl_ir_var *var, struct hlsl_ir_node *offset,
> - struct hlsl_type *type, struct vkd3d_shader_location loc);
> struct hlsl_ir_loop *hlsl_new_loop(struct hlsl_ctx *ctx, struct vkd3d_shader_location loc);
> -struct hlsl_ir_store *hlsl_new_store(struct hlsl_ctx *ctx, struct hlsl_ir_var *var, struct hlsl_ir_node *offset,
> - struct hlsl_ir_node *rhs, unsigned int writemask, struct vkd3d_shader_location loc);
> struct hlsl_type *hlsl_new_struct_type(struct hlsl_ctx *ctx, const char *name,
> struct hlsl_struct_field *fields, size_t field_count);
> struct hlsl_ir_swizzle *hlsl_new_swizzle(struct hlsl_ctx *ctx, DWORD s, unsigned int components,
> diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c
> index 7a245007..08029361 100644
> --- a/libs/vkd3d-shader/hlsl_codegen.c
> +++ b/libs/vkd3d-shader/hlsl_codegen.c
> @@ -950,39 +950,21 @@ static bool fold_redundant_casts(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
> * split_matrix_copies(). Inserts new instructions right before
> * "store". */
> static bool split_copy(struct hlsl_ctx *ctx, struct hlsl_ir_store *store,
> - const struct hlsl_ir_load *load, const unsigned int offset, struct hlsl_type *type)
> + const struct hlsl_ir_load *load, const unsigned int indx, struct hlsl_type *type)
Why "indx" now?
July 28, 2022
Re: [PATCH vkd3d v3 16/17] vkd3d-shader/hlsl: Replace register offsets with index paths in input/output copies.
by Matteo Bruni
On Wed, Jul 20, 2022 at 3:24 PM Francisco Casas <fcasas(a)codeweavers.com> wrote:
>
> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
> ---
>
> v3:
> * No changes.
>
> The recursive structure of prepend_input_var_copy() and
> append_output_var_copy() could be preserved creating additional
> loads to complete the paths. Otherwise we would be requiring
> passing whole paths as arguments.
>
> These additional loads should be handled by DCE.
>
> Still, matrix vectors are copied iteratively instead of recursively now,
> to avoid the boilerplate of creating new loads in this last step.
>
> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
> ---
> libs/vkd3d-shader/hlsl_codegen.c | 188 +++++++++++++++++++------------
> 1 file changed, 116 insertions(+), 72 deletions(-)
>
> diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c
> index 6437006b..7a245007 100644
> --- a/libs/vkd3d-shader/hlsl_codegen.c
> +++ b/libs/vkd3d-shader/hlsl_codegen.c
> @@ -239,59 +239,75 @@ static struct hlsl_ir_var *add_semantic_var(struct hlsl_ctx *ctx, struct hlsl_ir
> return ext_var;
> }
>
> -static void prepend_input_copy(struct hlsl_ctx *ctx, struct list *instrs, struct hlsl_ir_var *var,
> - struct hlsl_type *type, unsigned int field_offset, unsigned int modifiers, const struct hlsl_semantic *semantic)
> +static void prepend_input_copy(struct hlsl_ctx *ctx, struct list *instrs, struct hlsl_ir_load *lhs,
> + struct hlsl_type *type, unsigned int modifiers, const struct hlsl_semantic *semantic)
I haven't put a lot of thought into this, but it seems to me we could
pass a deref instead of a redundant load and be mostly set. Mostly
because we then need to add the instructions to the instruction list
in some other way (e.g. by passing an explicit list).
July 28, 2022
Re: [PATCH vkd3d v3 09/17] vkd3d-shader/hlsl: Replace register offsets with index paths in load initializations.
by Matteo Bruni
On Wed, Jul 20, 2022 at 3:23 PM Francisco Casas <fcasas(a)codeweavers.com> wrote:
>
> The transform_deref_paths_into_offsets pass turns these index paths back
> into register offsets.
>
> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
> ---
>
> The idea is that we can move the transform_deref_paths_into_offsets()
> pass forward as we translate more passes to work with index paths.
> This, until register offsets can be totally removed, after we implement
> the SMxIRs and their translations.
>
> The aim is to have 3 ways of initializing load/store nodes when using index
> paths:
>
> * One that initializes the node from a another's node deref and and
> optional index to be appended to that deref's path.
> * One that initializes the node from a deref and the index
> of a single basic component within it. This one also generates constant
> nodes for the required path, so it also initializes an instruction block
> whose instructions must be inserted in the instruction list.
> * One that initializes the node directly for a whole variable. These functions
> are already present: hlsl_new_var_load() and hlsl_new_simple_store().
>
> The signatures of these functions are to be placed nearby in hlsl.h as
> they are introduced in the following patches.
>
> It is worth noting that the use of index paths allows to remove the data type
> argument when initializing store/loads because it can now be deducted from the
> variable and the hlsl_deref.
>
> Applying an index over a matrix derefence retrieves a vector. If the matrix
> is row_major, this corresponds to a row, otherwise, it corresponds to a
> column. So, the code should take matrix majority into account, at least until
> the split_matrix_copies pass.
>
> The first index in a path after a loading a struct should be an
> hlsl_ir_constant, since the field that's being addressed is always
> known at parse-time.
>
> hlsl_init_simple_deref_from_var() can be used to initialize a deref that can
> be passed by reference to the load and store initialization functions.
> This value shall not be modified after being created and does not
> require to call hlsl_cleanup_deref().
> The deref obtained with this function, can also be passed be passed as prefix
> to deref_from_component_index().
>
> ---
>
> v3:
> * Replaced compute_component_path() with deref_from_component_index().
> * Wrote implementation of init_deref() and get_type_from_deref() further
> up in the file.
> * Made hlsl_new_load_component() use deref_from_component_index()
> instead of the removed compute_component_path().
> * Rewrote hlsl.c function comments in present and active voice.
> * Renamed
> typep -> type_ptr
> indexp -> index_ptr
> in subtype_index_from_component_index().
> * Added space before '?' in ternary operators.
>
> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
> ---
> libs/vkd3d-shader/hlsl.c | 298 +++++++++++++++++++++++++++++--
> libs/vkd3d-shader/hlsl.h | 35 +++-
> libs/vkd3d-shader/hlsl.y | 102 ++++++-----
> libs/vkd3d-shader/hlsl_codegen.c | 44 +++++
> 4 files changed, 410 insertions(+), 69 deletions(-)
>
> diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
> index 66acce23..535433ee 100644
> --- a/libs/vkd3d-shader/hlsl.c
> +++ b/libs/vkd3d-shader/hlsl.c
> @@ -330,6 +330,176 @@ unsigned int hlsl_compute_component_offset(struct hlsl_ctx *ctx, struct hlsl_typ
> return 0;
> }
>
> +static bool type_is_single_component(const struct hlsl_type *type)
> +{
> + return type->type == HLSL_CLASS_SCALAR || type->type == HLSL_CLASS_OBJECT;
> +}
> +
> +/* Given a type and a component index, this function returns the next path index required to reach
> + * the component within the type.
> + * It sets *type to the subtype within the original type that contains the component.
> + * It sets *index to the index of the component within *type. */
Now *type_ptr and *index_ptr respectively, right?
> +static unsigned int subtype_index_from_component_index(struct hlsl_ctx *ctx,
> + struct hlsl_type **type_ptr, unsigned int *index_ptr)
After rereading the patch a number of times, I think the prototype is
okay (not sure about the name, it sounds like a "get" but it does
change the two parameters, not that I have better suggestions) but
that comment above needs some clarification. What this function does
is to move one step through the "path", or component index I guess,
returning the "index" to be taken for the outer data type and updating
type_ptr and index_ptr (which are two in/out parameters btw, their
types do make it somewhat expected but I wouldn't say it's super
obvious at a first glance) with the next inner type and index.
Which I guess is what the comment is trying to convey, but dunno, it
really didn't work for me. It might be enough to tweak it with more
details (e.g. next -> outer?) or maybe it deserves some more
substantial rewriting.
> +{
> + struct hlsl_type *type = *type_ptr;
> + unsigned int index = *index_ptr;
> +
> + assert(!type_is_single_component(type));
> + assert(index < hlsl_type_component_count(type));
> +
> + switch (type->type)
> + {
> + case HLSL_CLASS_VECTOR:
> + assert(index < type->dimx);
> + *type_ptr = hlsl_get_scalar_type(ctx, type->base_type);
> + *index_ptr = 0;
> + return index;
> +
> + case HLSL_CLASS_MATRIX:
> + {
> + unsigned int y = index / type->dimx, x = index % type->dimx;
> + bool row_major = hlsl_type_is_row_major(type);
> +
> + assert(index < type->dimx * type->dimy);
> + *type_ptr = hlsl_get_vector_type(ctx, type->base_type, row_major ? type->dimx : type->dimy);
> + *index_ptr = row_major ? x : y;
> + return row_major ? y : x;
> + }
> +
> + case HLSL_CLASS_ARRAY:
> + {
> + unsigned int elem_comp_count = hlsl_type_component_count(type->e.array.type);
> + unsigned int array_index;
> +
> + *type_ptr = type->e.array.type;
> + *index_ptr = index % elem_comp_count;
> + array_index = index / elem_comp_count;
> + assert(array_index < type->e.array.elements_count);
> + return array_index;
> + }
> +
> + case HLSL_CLASS_STRUCT:
> + {
> + struct hlsl_struct_field *field;
> + unsigned int field_comp_count, i;
> +
> + for (i = 0; i < type->e.record.field_count; ++i)
> + {
> + field = &type->e.record.fields[i];
> + field_comp_count = hlsl_type_component_count(field->type);
> + if (index < field_comp_count)
> + {
> + *type_ptr = field->type;
> + *index_ptr = index;
> + return i;
> + }
> + index -= field_comp_count;
> + }
> + assert(0);
> + return 0;
> + }
> +
> + default:
> + assert(0);
> + return 0;
> + }
> +}
> +
> +struct hlsl_type *hlsl_type_get_component_type(struct hlsl_ctx *ctx, struct hlsl_type *type,
> + unsigned int index)
> +{
> + while (!type_is_single_component(type))
> + subtype_index_from_component_index(ctx, &type, &index);
> +
> + return type;
> +}
> +
> +static bool init_deref(struct hlsl_ctx *ctx, struct hlsl_deref *deref, struct hlsl_ir_var *var,
> + unsigned int path_len)
> +{
> + deref->var = var;
> + deref->path_len = path_len;
> + deref->offset.node = NULL;
> +
> + if (path_len == 0)
> + {
> + deref->path = NULL;
> + return true;
> + }
> +
> + if (!(deref->path = hlsl_alloc(ctx, sizeof(*deref->path) * deref->path_len)))
> + {
> + deref->var = NULL;
> + deref->path_len = 0;
> + return false;
> + }
> +
> + return true;
> +}
> +
> +static struct hlsl_type *get_type_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *deref)
> +{
> + struct hlsl_type *type;
> + unsigned int i;
> +
> + assert(deref);
> + assert(!deref->offset.node);
> +
> + type = deref->var->data_type;
> + for (i = 0; i < deref->path_len; ++i)
> + type = hlsl_get_type_from_path_index(ctx, type, deref->path[i].node);
> + return type;
> +}
> +
> +/* Initializes a deref from another deref (prefix) and a component index. */
> +static bool deref_from_component_index(struct hlsl_ctx *ctx, struct hlsl_block *block,
> + struct hlsl_deref *deref, const struct hlsl_deref *prefix, unsigned int index,
> + const struct vkd3d_shader_location *loc)
It might come as a shock but I don't like this function's name.
Originally these x_from_y() kind of functions were always "conversion"
functions, i.e. take object y and return something from it as type x.
Which I guess is technically what this function is, but I don't feel
like that is the best way to represent it.
For one, this function effectively has 2 out parameters (block and
deref), in that it also generates instructions and adds them to the
block list. I guess it's not any different from a few other functions
you're introducing in the patchset but, as it is, the comment feels
somewhat partial. I would mention "block" as another byproduct of the
function in the comment at the top.
In regard to the name, maybe just adding a new_ (or create_?
generate_? init_?) in front would be enough. I don't have great
suggestions, as usual.
Somewhat minor, and probably more controversial, but maybe still worth
mentioning: instead of returning a bool, the function could return a
pointer to the deref. It should return NULL in the codepaths currently
returning "false", to maintain the current semantics (which are fine).
While it's unlikely that the return value is going to be super useful,
making this function resemble the other similar ones introduced in
this patch and previously has value in my mind. Also, of course, that
doesn't mean you can drop the "deref" parameter.
> +{
> + unsigned int path_len, path_index, deref_path_len, i;
> + struct hlsl_type *path_type;
> + struct hlsl_ir_constant *c;
> +
> + list_init(&block->instrs);
> +
> + path_len = 0;
> + path_type = get_type_from_deref(ctx, prefix);
> + path_index = index;
> + while (!type_is_single_component(path_type))
> + {
> + subtype_index_from_component_index(ctx, &path_type, &path_index);
> + ++path_len;
> + }
> +
> + if (!init_deref(ctx, deref, prefix->var, prefix->path_len + path_len))
> + return false;
> +
> + deref_path_len = 0;
> + for (i = 0; i < prefix->path_len; ++i)
> + hlsl_src_from_node(&deref->path[deref_path_len++], prefix->path[i].node);
> +
> + path_type = get_type_from_deref(ctx, prefix);
> + path_index = index;
> + while (!type_is_single_component(path_type))
> + {
> + unsigned int next_index = subtype_index_from_component_index(ctx, &path_type, &path_index);
> +
> + if (!(c = hlsl_new_uint_constant(ctx, next_index, loc)))
> + {
> + hlsl_free_instr_list(&block->instrs);
> + return false;
> + }
> + list_add_tail(&block->instrs, &c->node.entry);
> +
> + hlsl_src_from_node(&deref->path[deref_path_len++], &c->node);
> + }
> +
> + assert(deref_path_len == deref->path_len);
> +
> + return true;
> +}
> +
> struct hlsl_type *hlsl_get_type_from_path_index(struct hlsl_ctx *ctx, const struct hlsl_type *type,
> struct hlsl_ir_node *node)
> {
> @@ -435,6 +605,37 @@ struct hlsl_ir_node *hlsl_new_offset_from_path_index(struct hlsl_ctx *ctx, struc
> return idx_offset;
> }
>
> +struct hlsl_ir_node *hlsl_new_offset_node_from_deref(struct hlsl_ctx *ctx, struct hlsl_block *block,
> + const struct hlsl_deref *deref, const struct vkd3d_shader_location *loc)
For reference, I find the naming of this one okay (aside from node ->
instr or something), probably just because of the new_ prefix.
July 28, 2022
Re: [PATCH vkd3d 09/17] vkd3d-shader/hlsl: Replace register offsets with index paths in load initializations.
by Matteo Bruni
On Wed, Jul 20, 2022 at 12:03 AM Zebediah Figura
<zfigura(a)codeweavers.com> wrote:
>
> On 7/19/22 15:21, Francisco Casas wrote:
> > Hello,
> >
> > On 19-07-22 05:11, Giovanni Mascellani wrote:
> >> Hi,
> >>
> >> Il 15/07/22 03:23, Francisco Casas ha scritto:
> >>> +/* Given a type and a component index, retrieves next path index
> >>> required to reach the component.
> >>> + * *typep will be set to the subtype within the original type that
> >>> contains the component.
> >>> + * *indexp will be set to the index of the component within *typep.
> >>> + */
> >>> +static unsigned int subtype_index_from_component_index(struct
> >>> hlsl_ctx *ctx,
> >>> + struct hlsl_type **typep, unsigned int *indexp)
> >>
> >> I guess that the "p"'s in "typep" and "indexp" are a sort of reverse
> >> Hungarian notation. It's a nitpick, but I am not really a fan of that,
> >> and I don't think we're using that anywhere in the HLSL compiler.
> >>
> >
> > I didn't think on Hungarian notation, but I indeed added the 'p' to
> > indicate that this is a "pointer to" the actual value.
> >
> > Because the referenced values (*typep and *indexp) have to be used
> > several times, and typep is a double pointer, I assigned these values to
> > local variables:
> >
> > struct hlsl_type *type = *typep;
> > unsigned int index = *indexp;
> >
> > Which is my opinion makes it far more readable that constantly using the
> > dereference operator.
> >
> > The problem is that I had to pick a different name for the local
> > variables an the function arguments.
> >
> > But, unless there is another suggestion, in v3 I am renaming the
> > pointers "typep" and "indexp" to "type" and "index" respectively, and
> > the values from "type" and "index" to "type_val" and "index_val"
> > respectively.
>
> Personally I prefer the former, and don't particularly mind the -p
> suffix. Perhaps "type_ptr" would be more palatable.
>From a general naming viewpoint, yes I think it would be. "typep"
looks pretty ugly to me...
July 28, 2022
Re: [PATCH vkd3d 07/17] vkd3d-shader/hlsl: Unify type minor/major size functions.
by Matteo Bruni
On Fri, Jul 15, 2022 at 3:24 AM Francisco Casas <fcasas(a)codeweavers.com> wrote:
>
> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
> ---
>
> v2:
> * No changes.
>
> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
> ---
> libs/vkd3d-shader/hlsl.c | 16 ++++++++++++++++
> libs/vkd3d-shader/hlsl.h | 2 ++
> libs/vkd3d-shader/hlsl.y | 20 ++------------------
> libs/vkd3d-shader/hlsl_codegen.c | 28 ++++++----------------------
> 4 files changed, 26 insertions(+), 40 deletions(-)
>
> diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
> index e4e2ca17..d3ceba35 100644
> --- a/libs/vkd3d-shader/hlsl.c
> +++ b/libs/vkd3d-shader/hlsl.c
> @@ -124,6 +124,22 @@ bool hlsl_type_is_row_major(const struct hlsl_type *type)
> return !!(type->modifiers & HLSL_MODIFIER_ROW_MAJOR);
> }
>
> +unsigned int hlsl_type_minor_size(const struct hlsl_type *type)
> +{
> + if (type->type != HLSL_CLASS_MATRIX || hlsl_type_is_row_major(type))
> + return type->dimx;
> + else
> + return type->dimy;
> +}
> +
> +unsigned int hlsl_type_major_size(const struct hlsl_type *type)
> +{
> + if (type->type != HLSL_CLASS_MATRIX || hlsl_type_is_row_major(type))
> + return type->dimy;
> + else
> + return type->dimx;
> +}
> +
> static unsigned int get_array_size(const struct hlsl_type *type)
> {
> if (type->type == HLSL_CLASS_ARRAY)
> diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h
> index 2a6402ce..546c87f3 100644
> --- a/libs/vkd3d-shader/hlsl.h
> +++ b/libs/vkd3d-shader/hlsl.h
> @@ -799,6 +799,8 @@ unsigned int hlsl_type_get_array_element_reg_size(const struct hlsl_type *type);
> unsigned int hlsl_compute_component_offset(struct hlsl_ctx *ctx, struct hlsl_type *type,
> unsigned int idx, struct hlsl_type **comp_type);
> bool hlsl_type_is_row_major(const struct hlsl_type *type);
> +unsigned int hlsl_type_minor_size(const struct hlsl_type *type);
> +unsigned int hlsl_type_major_size(const struct hlsl_type *type);
> unsigned int hlsl_type_get_sm4_offset(const struct hlsl_type *type, unsigned int offset);
> bool hlsl_types_are_equal(const struct hlsl_type *t1, const struct hlsl_type *t2);
>
> diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
> index b4ca4631..a1d39140 100644
> --- a/libs/vkd3d-shader/hlsl.y
> +++ b/libs/vkd3d-shader/hlsl.y
> @@ -1216,22 +1216,6 @@ static bool expr_common_shape(struct hlsl_ctx *ctx, struct hlsl_type *t1, struct
> return true;
> }
>
> -static unsigned int minor_size(const struct hlsl_type *type)
> -{
> - if (type->modifiers & HLSL_MODIFIER_ROW_MAJOR)
> - return type->dimx;
> - else
> - return type->dimy;
> -}
> -
> -static unsigned int major_size(const struct hlsl_type *type)
> -{
> - if (type->modifiers & HLSL_MODIFIER_ROW_MAJOR)
> - return type->dimy;
> - else
> - return type->dimx;
> -}
> -
> static struct hlsl_ir_node *add_expr(struct hlsl_ctx *ctx, struct list *instrs,
> enum hlsl_ir_expr_op op, struct hlsl_ir_node *operands[HLSL_MAX_OPERANDS],
> struct hlsl_type *type, const struct vkd3d_shader_location *loc)
> @@ -1247,7 +1231,7 @@ static struct hlsl_ir_node *add_expr(struct hlsl_ctx *ctx, struct list *instrs,
> struct hlsl_ir_load *load;
> struct hlsl_ir_var *var;
>
> - vector_type = hlsl_get_vector_type(ctx, type->base_type, minor_size(type));
> + vector_type = hlsl_get_vector_type(ctx, type->base_type, hlsl_type_minor_size(type));
>
> name = vkd3d_string_buffer_get(&ctx->string_buffers);
> vkd3d_string_buffer_printf(name, "<split_op-%u>", counter++);
> @@ -1256,7 +1240,7 @@ static struct hlsl_ir_node *add_expr(struct hlsl_ctx *ctx, struct list *instrs,
> if (!var)
> return NULL;
>
> - for (i = 0; i < major_size(type); i++)
> + for (i = 0; i < hlsl_type_major_size(type); i++)
Nitpick, while at it you could change i++ to ++i as well.
July 28, 2022
Re: [PATCH vkd3d 06/17] vkd3d-shader/hlsl: Introduce add_load_index().
by Matteo Bruni
On Fri, Jul 15, 2022 at 3:24 AM Francisco Casas <fcasas(a)codeweavers.com> wrote:
>
> At this point add_load() is split into add_load_component() and
> add_load_index(); register offsets are hidden for these functions.
>
> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
Nice patch. I guess this one is already pretty compelling evidence in
support of this "index paths" idea for parse-time IR.
> ---
>
> v2:
> * Use "const struct vkd3d_shader_location *loc" instead of "const struct
> vkd3d_shader_location loc"
> * Use vkd3d_string_buffer for initializing the deref synthetic variable names.
> * Move common "load = hlsl_new_load" pattern out of the if..else branches.
> * Removed braces on simple switch cases in
> hlsl_new_offset_from_path_index(). I kept them in the
> HLSL_CLASS_MATRIX case, even though it doesn't have declarations,
> because its body seems complex enough.
>
> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
> ---
> libs/vkd3d-shader/hlsl.c | 105 +++++++++++++++++++++++++++++-
> libs/vkd3d-shader/hlsl.h | 7 ++
> libs/vkd3d-shader/hlsl.y | 134 ++++++++++++++-------------------------
> 3 files changed, 157 insertions(+), 89 deletions(-)
>
> diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
> index 2925b4e5..e4e2ca17 100644
> --- a/libs/vkd3d-shader/hlsl.c
> +++ b/libs/vkd3d-shader/hlsl.c
> @@ -117,7 +117,7 @@ void hlsl_free_var(struct hlsl_ir_var *decl)
> vkd3d_free(decl);
> }
>
> -static bool hlsl_type_is_row_major(const struct hlsl_type *type)
> +bool hlsl_type_is_row_major(const struct hlsl_type *type)
> {
> /* Default to column-major if the majority isn't explicitly set, which can
> * happen for anonymous nodes. */
> @@ -314,6 +314,109 @@ unsigned int hlsl_compute_component_offset(struct hlsl_ctx *ctx, struct hlsl_typ
> return 0;
> }
>
> +struct hlsl_type *hlsl_get_type_from_path_index(struct hlsl_ctx *ctx, const struct hlsl_type *type,
> + struct hlsl_ir_node *node)
Maybe index, or field, or field_index? In the next function you have
"idx", which also works.
In any case, pick one and then use consistent naming throughout.
Also, I'm a bit confused by the function name: as far as I can see the
function has nothing specific to path indices, it's more of a "tell me
the type of the next inner component".
> +{
> + assert(node);
> +
> + if (type->type == HLSL_CLASS_VECTOR)
> + return hlsl_get_scalar_type(ctx, type->base_type);
> +
> + if (type->type == HLSL_CLASS_MATRIX)
> + {
> + if (hlsl_type_is_row_major(type))
> + return hlsl_get_vector_type(ctx, type->base_type, type->dimx);
> + else
> + return hlsl_get_vector_type(ctx, type->base_type, type->dimy);
> + }
> +
> + if (type->type == HLSL_CLASS_ARRAY)
> + return type->e.array.type;
> +
> + if (type->type == HLSL_CLASS_STRUCT)
> + {
> + struct hlsl_ir_constant *c = hlsl_ir_constant(node);
> +
> + assert(c->value[0].u < type->e.record.field_count);
> + return type->e.record.fields[c->value[0].u].type;
> + }
> +
> + assert(0);
> + return NULL;
> +}
> +
> +struct hlsl_ir_node *hlsl_new_offset_from_path_index(struct hlsl_ctx *ctx, struct hlsl_block *block,
> + struct hlsl_type *type, struct hlsl_ir_node *offset, struct hlsl_ir_node *idx,
> + const struct vkd3d_shader_location *loc)
> +{
> + struct hlsl_ir_node *idx_offset = NULL;
> + struct hlsl_ir_constant *c;
> +
> + list_init(&block->instrs);
> +
> + switch (type->type)
> + {
> + case HLSL_CLASS_VECTOR:
> + idx_offset = idx;
> + break;
> +
> + case HLSL_CLASS_MATRIX:
> + {
> + if (!(c = hlsl_new_uint_constant(ctx, 4, loc)))
> + return NULL;
> + list_add_tail(&block->instrs, &c->node.entry);
> +
> + if (!(idx_offset = hlsl_new_binary_expr(ctx, HLSL_OP2_MUL, &c->node, idx)))
> + return NULL;
> + list_add_tail(&block->instrs, &idx_offset->entry);
> +
> + break;
> + }
> +
> + case HLSL_CLASS_ARRAY:
> + {
> + unsigned int size = hlsl_type_get_array_element_reg_size(type->e.array.type);
> +
> + if (!(c = hlsl_new_uint_constant(ctx, size, loc)))
> + return NULL;
> + list_add_tail(&block->instrs, &c->node.entry);
> +
> + if (!(idx_offset = hlsl_new_binary_expr(ctx, HLSL_OP2_MUL, &c->node, idx)))
> + return NULL;
> + list_add_tail(&block->instrs, &idx_offset->entry);
> +
> + break;
> + }
> +
> + case HLSL_CLASS_STRUCT:
> + {
> + unsigned int field_i = hlsl_ir_constant(idx)->value[0].u;
field_idx?
July 28, 2022