On Mon Jan 27 21:05:00 2025 +0000, Stéphane Bacri wrote:
> Hello, Piotr.
> Thanks for your review and comments. However, I'm unsure the issue is
> there (and I have no other clue, because no window machine nor VM). I
> agree that [MS
> documentation](https://learn.microsoft.com/en-us/cpp/c-runtime-library/refe…
> defines the signature you mention, but it is the same for _Cbuild, and I
> used it as a template. I could have suspected the entries crealf(int64)
> & cimagf(int64) to be the cause if it had been a 32 vs 64 bit issue. But
> I don't understand why the difference is between windows & linux.
> Moreover, I checked the stage log, and I see only zeroes in the failing
> tests reports, which is weird, even with params size issues).
> By the way, the positive thing is I figured out that
> msvcr120_app/msvcr120_app.spec had to be updated. However, the current
> build-linux stage seems to fail for reasons not related to the branch (I
> tried to revert a commit then commit back after setting again my user
> name & email, and still fails saying email not set when other stage do
> not complain).
Actually _Cbuild has the same problem, but it's less obvious since it will break only on non-x86 platforms.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7109#note_92977
Hello, Piotr.
Thanks for your review and comments. However, I'm unsure the issue is there (and I have no other clue, because no window machine nor VM). I agree that [MS documentation](https://learn.microsoft.com/en-us/cpp/c-runtime-library/refe… defines the signature you mention, but it is the same for _Cbuild, and I used it as a template. I could have suspected the entries crealf(int64) & cimagf(int64) to be the cause if it had been a 32 vs 64 bit issue. But I don't understand why the difference is between windows & linux.
Moreover, I checked the stage log, and I see only zeroes in the failing tests reports, which is weird, even with params size issues).
By the way, the positive thing is I figured out that msvcr120_app/msvcr120_app.spec had to be updated. However, the current build-linux stage seems to fail for reasons not related to the branch (I tried to revert a commit then commit back after setting again my user name & email, and still fails saying email not set when other stage do not complain).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7109#note_92974
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: STATUS_SUCCESS or STATUS_USER_APC
--
v12: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: STATUS_SUCCESS or STATUS_USER_APC
--
v11: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
v2: dlls/oleaut32: Add DeleteTypeInfo() base-cases in typelib.c
https://gitlab.winehq.org/wine/wine/-/merge_requests/7203
Mostly adding a couple of missing bits. Regarding the 32-bit KDHELP structure definition:
- I checked against some SDK:s back to 2000, and the overall size of this structure hasn't changed ever since (some fields have been added with decreasing Reserved array size)
- so it's really Wine's header which were missing these fields not the callers
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7206
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: STATUS_SUCCESS or STATUS_USER_APC
--
v10: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
On Mon Jan 27 16:37:50 2025 +0000, Akihiro Sagawa wrote:
> @huw, I have been waiting for your review for several months. Do you
> have any concerns?
Looks good. By the time it was ready, it was too late in the release cycle.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5633#note_92949
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: STATUS_SUCCESS or STATUS_USER_APC
--
v9: ntdll: Fix the return value of NtDelayExecution.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: STATUS_SUCCESS or STATUS_USER_APC
--
v8: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
This MR intends to add the complex numbers related functions:
* cimag
* _FCbuild
* crealf
* cimagf
These functions are defined in dlls/msvcr120/math.c and mapped in dlls/msvcr120/msvcr120.spec and dlls/ucrbase/ucrbase.spec.
The related tests were added in dlls/mscr120/tests/msvcr120.c and result were checked.
--
v3: fixed msvcr120_app spec
https://gitlab.winehq.org/wine/wine/-/merge_requests/7109
This allows using one single wineprefix, one wineserver and one single wine executable for running both arm and arm64 executables.
This setup actually has worked earlier; Ubuntu 22.04 packages Wine 6.0, where the wine32 + wine64 packages together end up working this way. However, since Wine 6.0, a couple of refactorings has broken this setup along the way; reinstate this way of working.
The new wow64 mode probably won't work on arm, as it's not easily possible to switch between 32 and 64 bit execution mode within a process, as far as I know, but the old wow64 mode is still a great convenience - especially considering distro-packaged use for users who aren't familiar with the particular quirks on this architecture.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7204
--
v5: crypt32: Don't assert in Context_Release() on invalid refcount.
crypt32/tests: Add a test for deleting and adding certs during enumeration.
crypt32: Only remove cert from mem store list when deleting it.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7193
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7203
Recently I am experimenting with an ASan instrumented Wine build (Details [here](https://gitlab.winehq.org/bernhardu/wine/-/blob/asan-pe_2024-12-29/RE…), which was showing some issues when running the confirmance tests.
ASan got triggered on this `lstrlenW( dst )` because it seems the NormalizeString function does not add a termination if the length of the source string does not include the terminating character.
Because the `ok` statements condition contains `lstrlenW( ptest->expected[i] )` I assume that value is also expected to get printed if the test would fail.
```
ASAN_OPTIONS="allocator_may_return_null=1:halt_on_error=0" wine dlls/kernel32/tests/x86_64-windows/kernel32_test.exe locale
=================================================================
==640==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffffe1dd420 at pc 0x000140117178 bp 0x7ffffe1dd0d0 sp 0x7ffffe1dd118
READ of size 2 at 0x7ffffe1dd420 thread T0
0800:fixme:file:server_get_file_info Unsupported info class e
#0 0x000140117177 in lstrlenW .../wine/include/winbase.h:2921:12
#1 0x00014010d76e in test_NormalizeString .../wine/dlls/kernel32/tests/locale.c:7401:54
#2 0x0001400f0e4c in func_locale .../wine/dlls/kernel32/tests/locale.c:8725:3
#3 0x0001401e6c5e in run_test .../wine/include/wine/test.h:765:5
#4 0x0001401e67a1 in main .../wine/include/wine/test.h:884:12
#5 0x0001401e8113 in mainCRTStartup .../wine/dlls/msvcrt/crt_main.c:58:11
#6 0x6fffffc455ee in BaseThreadInitThunk .../wine/dlls/kernel32/thread.c:61:24
#7 0x6fffffdcaaea in RtlUserThreadStart (C:\windows\system32\ntdll.dll+0x17004aaea)
Address 0x7ffffe1dd420 is located in stack of thread T0 at offset 544 in frame
#0 0x00014010d13f in test_NormalizeString .../wine/dlls/kernel32/tests/locale.c:7212
This frame has 8 object(s):
[32, 544) 'dst' (line 7358) <== Memory access at offset 544 overflows this variable
[608, 609) 'ret' (line 7359)
[624, 628) 'dstlen' (line 7361)
[640, 1664) 'buffer' (line 7620)
[1792, 1798) 'str745' (line 7621)
[1824, 1888) 'srcW' (line 7621)
[1920, 1984) 'dstW' (line 7621)
[2016, 2272) 'resW' (line 7621)
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
(longjmp, SEH and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow .../wine/include/winbase.h:2921:12 in lstrlenW
Shadow bytes around the buggy address:
0x7ffffe1dd180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7ffffe1dd200: f1 f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 00
0x7ffffe1dd280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7ffffe1dd300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7ffffe1dd380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x7ffffe1dd400: 00 00 00 00[f2]f2 f2 f2 f2 f2 f2 f2 01 f2 04 f2
0x7ffffe1dd480: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
0x7ffffe1dd500: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
0x7ffffe1dd580: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
0x7ffffe1dd600: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
0x7ffffe1dd680: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==640==ABORTING
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7201
If application sends out-of-range values for FFB effects, they become -1, which is undesireable, when -1 is in the physical range of the field and being sent to the device. This patch fixes it, clamping values to the field range. Clamping was earlier implemented [here](https://gitlab.winehq.org/wine/wine/-/blob/wine-6.19/dlls/dinput/effe… in 6.19. Windows does this clamping silently, and doesn't fail `SetParameters` call when values is out of range.
Affected application is Assetto Corsa EVO, which with default settings sends out ConstantForce magnitude under/over [documented](https://learn.microsoft.com/en-us/previous-versions/ms835644(v=… \[-10000, 10000\]. [Link to the discussion with some investigation on Steam](https://steamcommunity.com/app/3058630/discussions/0/756142145462617….
In this submission scaling and clamping were moved to the separate `scale_and_clamp_value` function, which is now called every time from `set_parameter_value`. To avoid regression with sending `-1` for the infinite duration effects, separate function `set_parameter_value_no_scaling` created. Gain values in `hid_joystick_send_device_gain` are also scaled and clamped.
--
v3: dinput: Clamp FFB effect report value to the field range.
dinput/tests: Add more tests for force feedback.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7161
Added Constant Force tests, with out-of-bounds Magnitude levels. Also updated Condition Effect tests, now includes Saturation field being out-of-bounds. Tests are passing on Windows. That required modifying test HID descriptor, to include new effect type (Constant) and usage (Magnitude).
Now we have an option to not clamp specific fields, specifically - Saturation ones.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7161#note_92866
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: STATUS_SUCCESS or STATUS_USER_APC
--
v7: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: STATUS_SUCCESS or STATUS_USER_APC
--
v6: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: STATUS_SUCCESS or STATUS_USER_APC
--
v5: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: STATUS_SUCCESS or STATUS_USER_APC
--
v4: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: STATUS_SUCCESS or STATUS_USER_APC
--
v3: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
--
v3: crypt32: Don't assert in Context_Release() on invalid refcount.
crypt32/tests: Add a test for deleting and adding certs during enumeration.
crypt32: Only remove cert from mem store list when deleting it.
crypt32: Release existing cert context in add_cert_to_store().
crypt32: Don't try to release zero-refcount context in MemStore_addContext().
crypt32: Factor out memstore_free_context() function.
crypt32: Release cert context in CertDeleteCertificateFromStore().
https://gitlab.winehq.org/wine/wine/-/merge_requests/7193
--
v2: crypt32: Don't assert in Context_Release() on invalid refcount.
crypt32/tests: Add a test for deleting and adding certs during enumeration.
crypt32: Only remove cert from mem store list when deleting it.
crypt32: Don't try to release zero-refcount context in MemStore_addContext().
crypt32: Factor out memstore_free_context() function.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7193
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: STATUS_SUCCESS or STATUS_USER_APC
--
v2: ntdll: Fix the return value of NtDelayExecution.
ntdll/tests: Add tests for NtDelayExecution and Sleep(Ex).
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
This is an alternative proposal to !5830. It fixes the same glitches in Horizon Zero Dawn, but attempts to do that by implementing the proper behavior expected from the swapchain. More precisely, it fixes a few mistakes I had made the last time I touched this code, it implements the frame latency waitable with a semaphore instead of an event (as it should be) and at last it uses the frame latency waitable to implement an appropriate wait after presentation when the client didn't request to manage the waitable directly.
This implementation is not yet complete, because the semaphore should be released when the frame is presented. Knowing when this is the case would require using `VK_KHR_present_wait`. We currently approximate that with the moment in which the frame is submitted for presentation to Vulkan, which as far as I can tell is good enough. Eventually I'll try to write the proper thing.
This MR depends on https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1343, which has been submitted in the meantime to vkd3d. The vkd3d change is included in the first commit, so this MR is already functional.
--
v3: dxgi: Wait on the frame latency semaphore when the client doesn't do it.
dxgi: Make the frame latency waitable a semaphore.
dxgi: Remove the frame latency fence.
dxgi: Directly signal the frame latency fence.
dxgi: Do not bias the frame latency fence.
dxgi: Set the frame latency even when increasing the frame latency.
dxgi: Submit Vulkan presentation as soon as possible.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7152
The key change is to never return STATUS_TIMEOUT, and to instead return the result of
NtYieldExecution() if zero timeout was passed, or STATUS_SUCCESS otherwise.
An overview of the correct values for each combination, copied from the test commit:
- Non-alertable, zero timeout: STATUS_SUCCESS or STATUS_NO_YIELD_PERFORMED
- Non-alertable, non-zero timeout: STATUS_SUCCESS
- Alertable, zero timeout: STATUS_SUCCESS, STATUS_NO_YIELD_PERFORMED, or STATUS_USER_APC
- Alertable, non-zero timeout: STATUS_SUCCESS or STATUS_USER_APC
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7169
These changes are enough to allow building the entirety of the native (ELF) side with `-flto`.
--
v2: loader: Mark thread_ldt, thread_data, wld_start "used".
ntdll: Mark call_init_thunk "used".
https://gitlab.winehq.org/wine/wine/-/merge_requests/7119
This should fix [bug 54339](https://bugs.winehq.org/show_bug.cgi?id=54339) for desktop models.
PCI IDs were obtained from https://devicehunt.com/view/type/pci/vendor/10DE/ and additionally verified against https://techpowerup.com/vgabios/ except for the 40xx SUPER line models that were obtained only from https://techpowerup.com/vgabios/ .
I tested the patch on Debian trixie against wine-9.0 and 10.0~rc2 with my 3090: my card was correctly recognized and there were some performance gains when playing SC2. I've also created a [ppa with patched packages for Ubuntu noble and oracular](https://launchpad.net/~morgwai/+archive/ubuntu/wine) and posted links on reddit to [r/linux_gaming](https://www.reddit.com/r/linux_gaming/comments/1i37g2q/pls_… and [r/ubuntu](https://www.reddit.com/r/Ubuntu/comments/1i3ifkx/pls_help_testing… asking for help with testing with other models, but the posts were removed and [my account was banned](https://www.reddit.com/user/morgwai666/) for "posting spam" (I tried to appeal, but never got a reply). I am however completely almost sure that other 30xx models will work correctly as well since this is the same GPU architecture. 40xx models should work correctly as long as
`DRIVER_NVIDIA_KEPLER` is able to support them: I believe this to be the case, but was not able to test it.
As both 30xx and 40xx series are really messed up in terms of different variants within the same "base models" (things "Ti", "LHR", VRAM size *may* correspond to different PCI IDs), constant names and string descriptions became really long which in turn messed up the code formatting/alignment. Please let me know if the current formatting is acceptable or if I should change it somehow or maybe even add one more commit that increases spacing between fields in all other rows to make it all aligned.
I skipped mobile models for now: honestly putting this together was extremely tedious and frustrating (especially as it was unfolding before my eyes how messed up the mapping is due to different variants), so I didn't want to dedicate more time to this until I received some positive feedback.
--
v4: wined3d: Add Nvidia RTX40xx series desktop models data.
wined3d: Add Nvidia RTX30xx series desktop models data.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7171
This is an alternative proposal to !5830. It fixes the same glitches in Horizon Zero Dawn, but attempts to do that by implementing the proper behavior expected from the swapchain. More precisely, it fixes a few mistakes I had made the last time I touched this code, it implements the frame latency waitable with a semaphore instead of an event (as it should be) and at last it uses the frame latency waitable to implement an appropriate wait after presentation when the client didn't request to manage the waitable directly.
This implementation is not yet complete, because the semaphore should be released when the frame is presented. Knowing when this is the case would require using `VK_KHR_present_wait`. We currently approximate that with the moment in which the frame is submitted for presentation to Vulkan, which as far as I can tell is good enough. Eventually I'll try to write the proper thing.
This MR depends on https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1343, which has been submitted in the meantime to vkd3d. The vkd3d change is included in the first commit, so this MR is already functional.
--
v2: dxgi: Wait on the frame latency semaphore when the client doesn't do it.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7152
Before this patch, WM_COPYDATA message data was packed at the end of the message and then passed
to KeUserModeCallback() to call user mode callbacks. However, WM_COPYDATA can contain a large amount
of data so KeUserModeCallback() can cause stack overflows. Manual tests on Windows show that
WM_COPYDATA messages with data <= 2048 bytes do have their data packed at the end of the message.
But for WM_COPYDATA messages with data > 2048 bytes, KiUserCallbackDispatcher() gets a 120 bytes
packed arguments, which is the same size when packing WM_COPYDATA messages with no data. So for
WM_COPYDATA messages with data > 2048 bytes, the data must be packed differently.
Fix FCSExpress hangs after sending WM_COPYDATA messages.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7189
--
v2: d3dx9: Link versions 42 and 43 to the corresponding d3dcompiler DLL.
d3dx9: Reimplement D3DXCompileShader() for versions before 42.
d3dcompiler: Use D3DCompile2VKD3D() from vkd3d-utils.
d3dcompiler: Use D3DPreprocess() from vkd3d-utils.
vkd3d: Import vkd3d-utils.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5814
--
v3: rtworkq: Support putting work on RTWQ_CALLBACK_QUEUE_UNDEFINED.
rtworkq/tests: Add a test for putting work on RTWQ_CALLBACK_QUEUE_UNDEFINED.
mfplat/tests: Add a test for putting work on MFASYNC_CALLBACK_QUEUE_UNDEFINED.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7173
On Thu Jan 23 12:38:42 2025 +0000, William Horvath wrote:
> ~~I just tested this again on swaywm (recent git version), and it only
> fixes the issue the first time the minimize-to-tray action is performed.
> Once the floating tray icon is clicked and the window is restored, on
> subsequent attempts, the game window is no longer unmapped/hidden. It
> remains as an empty black window on screen (but the tray icon does show
> up again).~~
> ~~This is different from how this patch affects i3 (where I tested
> before), because on i3 it fixes the issue no matter how many times the
> minimization/restoration is done. Before the async request patches, the
> functionality worked identically on i3 and sway.~~
> ~~Sorry I didn't catch that earlier. It's still interesting, because it
> means that the outdated workaround/hack I pointed out in i3's source is
> not the only thing to blame here. I looked around for something like
> that in sway/wlroots' xwayland interop and couldn't find anything as
> suspicious like that.~~
> Ignore this. The difference where the window is a black rectangle on
> consecutive attempts is not a regression due to the async requests
> commit, it's a separate bug. This patch does restore the behavior to how
> it was before the async requests change on both i3 and sway.
Thanks for checking this, reading the edited comment I understand this actually works and everything is fine.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7121#note_92585
I just tested this again on swaywm (recent git version), and it only fixes the issue the first time the minimize-to-tray action is performed. Once the floating tray icon is clicked and the window is restored, on subsequent attempts, the game window is no longer unmapped/hidden. It remains as an empty black window on screen (but the tray icon does show up again).
This is different from how this patch affects i3 (where I tested before), because on i3 it fixes the issue no matter how many times the minimization/restoration is done. Before the async request patches, the functionality worked identically on i3 and sway.
Sorry I didn't catch that earlier. It's still interesting, because it means that the outdated workaround/hack I pointed out in i3's source is not the only thing to blame here. I looked around for something like that in sway/wlroots' xwayland interop and couldn't find anything as suspicious like that.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7121#note_92582
This confuses mutter and it manifests with spurious IconicState WM_STATE
change when it decides to try managing the window, but it also makes it
randomly lose focus or even fail to map the window back on screen.
Adding the flag after the window has been created fixes the issue.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7181
In cases where MF is already shut down, simply forwarding MFShutdown() to
RtwqShutdown() will corrupt the Rtwq lock count if async result objects
still exist, because they hold a lock. JR East Train Simulator does this.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7174