--
v3: vkd3d-shader/hlsl: Support case-insensitive lookup for builtin 'float' type.
vkd3d-shader/hlsl: Use unsigned type for the 'dword' alias.
vkd3d-shader/hlsl: Support case-insensitive lookup for builtin 'dword' type.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/101
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54405
Also fixes Assassin Creed hanging on start (for a similar reason: it doesn't expect a spurious -1 last error).
There is already a fix attempt sent by Ivan Chikish in !2067 (https://gitlab.winehq.org/wine/wine/-/merge_requests/2067). But I suppose it may be fixed simpler like in this patch. wait_message() with zero count is only called from NtUserPeekMessage(). I think even if for some reason driver's MsgWaitForMultipleObjectsEx returns a real error code we still don't want to set last error here when called from PeekMessage().
--
v2: wineandroid.drv: Check for zero count in _MsgWaitForMultipleObjectsEx if events are present.
winemac.drv: Check for zero count in _MsgWaitForMultipleObjectsEx if events are present.
winex11.drv: Check for zero count in _MsgWaitForMultipleObjectsEx if events are present.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2242
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51848
SPORE creates a swapchain on a window, then destroys it, then creates a
different swapchain on the same window and uses it for the rest of its lifetime.
The swapchains have different GLX visuals (the details are unimportant).
The effect is that the second swapchain sees the pixel format set by the first
swapchain, through GetPixelFormat(), and therefore needs to set and then
restore the new pixel format on every present. This results in recreating the
GLX drawable twice per frame, which is extremely expensive.
This patch series changes WGL_WINE_pixel_format_passthrough to only set an
"internal" pixel format. The real pixel format will still be set as it is now,
but GetPixelFormat() will always return 0, signalling to wined3d that the
application has not set the pixel format, and therefore there is no need to
restore it.
As the tests show, this change also matches Windows, which does not report that
a pixel format has been set after presenting a Direct3D swapchain.
This is a large series by patch count, but I fear that splitting it into two
parts would make it difficult to grasp the entire picture, and purpose of the
earlier patches. It also contains six patches which are simply repetitions
across the three user drivers, which should ease the burden of review somewhat.
--
v3: wineandroid: Separately store the internal pixel format set by WGL_WINE_pixel_format_passthrough.
winemac: Separately store the internal pixel format set by WGL_WINE_pixel_format_passthrough.
winex11: Separately store the internal pixel format set by WGL_WINE_pixel_format_passthrough.
win32u: Allow separately storing the internal pixel format set by WGL_WINE_pixel_format_passthrough.
wined3d: Do not set the pixel format if wglGetPixelFormat() returns zero and we already set the internal pixel format.
winemac: Retrieve the pixel format from win32u for normal windows in wglGetPixelFormat().
wineandroid: Retrieve the pixel format from win32u for normal windows in wglGetPixelFormat().
winex11: Retrieve the pixel format from win32u for normal windows in wglGetPixelFormat().
win32u: Introduce a win32u_get_window_pixel_format() helper.
win32u: Make NtUserSetWindowPixelFormat() into a proper export.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2217
based on libpcsclite1 \
rework of [original code by Mounir IDRASSI](https://sourceforge.net/projects/scard4wine/) to use unixlib interface
First step to resolve \
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39113 \
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37495 \
It will probably also require the implementation of scarddlg.
In order for the tests to work fully in a virtual environment without the appropriate hardware,
I suggest using the project https://github.com/Jakuje/virt_cacard
Example for setting up a build server (It is supposed to be Debian):
```
apt-get install -y pcscd vsmartcard-vpcd libpcsclite1 libpcsclite-dev libcacard-dev libsofthsm2 libnss3-tools gnutls-bin opensc
service pcscd restart
git clone https://github.com/Jakuje/virt_cacard
cd virt_cacard
./autogen.sh && ./configure && make
./setup-softhsm2.sh
```
"Insert" smartcard before runing tests: \
`cd /path/to/virt_cacard && SOFTHSM2_CONF=softhsm2.conf ./virt_cacard &`
Partial test can be done if installed vsmartcard-vpcd (only test create/release context and list aviable card readers): \
```
apt-get install -y pcscd vsmartcard-vpcd
service pcscd restart
```
--
v2: winscard/test: skip when libpcsclite1 is not installed
https://gitlab.winehq.org/wine/wine/-/merge_requests/2249
based on libpcsclite1 \
rework of [original code by Mounir IDRASSI](https://sourceforge.net/projects/scard4wine/) to use unixlib interface
First step to resolve \
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39113 \
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37495 \
It will probably also require the implementation of scarddlg.
In order for the tests to work fully in a virtual environment without the appropriate hardware,
I suggest using the project https://github.com/Jakuje/virt_cacard
Example for setting up a build server (It is supposed to be Debian):
```
apt-get install -y pcscd vsmartcard-vpcd libpcsclite1 libpcsclite-dev libcacard-dev libsofthsm2 libnss3-tools gnutls-bin opensc
service pcscd restart
git clone https://github.com/Jakuje/virt_cacard
cd virt_cacard
./autogen.sh && ./configure && make
./setup-softhsm2.sh
```
"Insert" smartcard before runing tests: \
`cd /path/to/virt_cacard && SOFTHSM2_CONF=softhsm2.conf ./virt_cacard &`
Partial test can be done if installed vsmartcard-vpcd (only test create/release context and list aviable card readers): \
```
apt-get install -y pcscd vsmartcard-vpcd
service pcscd restart
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2249
Wine's dxgi implementation doesn't handle the different DXGI_ALPHA_MODE
values, save for DXGI_ALPHA_MODE_IGNORE on both vkd3d (d3d12) and
wined3d (d3d11), but prints a fixme for DXGI_ALPHA_MODE_UNSPECIFIED for
wined3d but not vkd3d.
To match the behaviour between the two, and because the "Unspecified"
mode seems like it should always be acceptable to ignore, don't print a
fixme in the wined3d path either.
This eliminates the following warning:
010c:fixme:dxgi:wined3d_swapchain_desc_from_dxgi Ignoring alpha mode 0.
See the msdn docs for DXGI_ALPHA_MODE here:
https://learn.microsoft.com/en-us/windows/win32/api/dxgi1_2/ne-dxgi1_2-dxgi…
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2235
Removing WINED3D_RS entries from state tables and moving stubs to wined3d_device_apply_stateblock.
--
v2: wined3d: Move the WINED3D_RS_SUBPIXEL stub to wined3d_device_apply_stateblock.
wined3d: Move the WINED3D_RS_ZVISIBLE stub to wined3d_device_apply_stateblock.
wined3d: Move the WINED3D_RS_LASTPIXEL stub to wined3d_device_apply_stateblock.
wined3d: Move the WINED3D_RS_PLANEMASK stub to wined3d_device_apply_stateblock.
wined3d: Move the WINED3D_RS_ROP2 stub to wined3d_device_apply_stateblock.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2192
I suspect you're already aware of this, but wined3d_texture_reduction_mode_from_d3d11() should probably use D3D11_DECODE_FILTER_REDUCTION. Somewhat relatedly, the definition of D3D11_DECODE_IS_COMPARISON_FILTER will need to adjusted, or wined3d_texture_compare_from_d3d11() will return incorrect results.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2246#note_24991
Using a dedicated exit jmpbuf and removing the need for assembly
routines.
When Wine handles an exception in unix code, we return to user mode by
jumping to the last syscall frame. This can leave some pthread cancel
cleanups registered, in the pthread internal linked list, and at the
same time later overwrite the stack frame they were registered for.
In the same way, jumping to the exit frame on thread exit or abort, can
also leave some cleanup handlers registered for invalid stack frames.
Depending on the implementation, calling pthread_exit will cause all the
registered pthread cleanup handlers to be called, possibly jumping back
to now overwritten stack frames and causing segmentation faults.
Exiting a pthread normally, by returning from its procedure, or calling
exit(0) for the main thread doesn't run pthread_exit and doesn't call
cleanup handlers, avoiding that situation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52213
### Additional note:
For robustness, we should probably try to execute these cleanup handlers
when unwinding the stack frames, as we would otherwise leave pthread
objects in a potential problematic state (like a mutex locked, etc).
It is however hard to do so when the handlers are registered from some C
code: pthread C implementation is done by calling some internal pthread
functions to register the handlers, and they aren't registered as
standard unwind handlers.
Only pthread_cancel and pthread_exit can unwind and call / unregister
the C handlers, but interrupting that procedure, for instance calling
setjmp / longjmp from withing our own handler isn't supported.
From C++ code, pthread cleanup handlers are registered through C++ class
constructors / destructors, and it would then be possible to partially
unwind and call them at the same time.
--
v9: ntdll: Remove now unnecessary arch-specific exit frame.
ntdll: Avoid calling pthread_exit on thread exit.
ntdll: Return entry and suspend from server_init_process_done.
ntdll: Create a pthread for the main thread.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1088
SetInputType tests will randomly failed after PATCH 3 (It was OK in PATCH 2). I spend many time on figuring out why. And I found a weird thing: If I comment out the compare_nv12() in check_dmo_output_data_buffer_(), the test failures will be gone.
I can't think out the reason. I don't understand why compare_nv12() in check_dmo_output_data_buffer_() affects SetInputType tests. And I don't want to waste too much time on the test stuff. Implementing the decoder is more important, so I marked the failed tests as flaky.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2247
--
v2: vkd3d-shader/hlsl: Allow case-insenstive names for shader objects types.
vkd3d-shader/hlsl: Initial support for string constants.
vkd3d-shader/hlsl: Use unsigned type for "dword" alias.
vkd3d-shader/hlsl: Support case-insensitive lookup for selected builtin types.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/101
The Optimize property tells msado15 to create index maps
for lookups in Recordset Find. Just store the value for
now until Find is implemented.
This property only appears on a Field when created from a real database connection. Just Appending of a Column doesn't give it this property. Currently this is the only Property that is set/query for that I found during testing.
--
v2: msado15: Support "Optimize" in Properties get_Item
https://gitlab.winehq.org/wine/wine/-/merge_requests/2244
This is what it looks like:
**v1**

**v2**

--
v6: winecfg: Add an option to enable WinRT app dark theme.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2183
The Optimize property tells msado15 to create index maps
for lookups in Recordset Find. Just store the value for
now until Find is implemented.
This property only appears on a Field when created from a real database connection. Just Appending of a Column doesn't give it this property. Currently this is the only Property that is set/query for that I found during testing.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2244
I was mainly after the issue fixed by the second patch but stomped on another one while testing that and that one looks even more unfortunate to me.
1. When connect() is used on blocking socket and fails for whatever reason, next connect() will make a new independent connection attempt (both on Windows and Unix). In non-blocking mode however (and Unix sockets are always in non-blocking mode in Wine) on Linux the next connect() will always return an error (unlike Windows which will make a new connect attempt if the previous one completed and failed). So in Wine now even for blocking socket connect() will fail if previous attempt failed and return WSAECONNABORTED. The error returned by Linux connect() will be ECONNABORTED if getsockopt(SO_ERROR) was called on the socket after connect completed with failure, and true connect() fail error if getsockopt wasn't called.
2. connect() on blocking socket times out after ~21sec on Windows and after ~130 sec on Linux. That is the case when peer doesn't actively reject connection but just never replies anything. That is, client sent SYN and never heard back. So much longer timeout leads to what is seen as hang on exit in one game, but probably more important that it affect much more in various apps provoking timeouts or huge delays not just on exit.
I did not find a way to set connect() timeout for socket on Windows. That difference mostly corresponds to number of SYN send retries. That is 7 on Linux by default and 4 on Windows (the delay between attempts starts from 1s and is doubled on each next attempt). There is TCP_SYNCNT socket option (Linux specific now, unfortunately) which allows to set the number of retries. Setting that to 4 yields 32 sec timeout (vs 21 sec on Windows). The remaining difference is probably due to different amount of time waited after last SYN is sent. There is also TCP_USER_TIMEOUT parameter which allows to effectively set the delay exactly, but it might interfere with SO_KEEPALIVE somehow and I hope that 32 vs 21 is not that critical already as 130 vs 21 and probably we can avoid complicating the thing with it.
--
v5: server: Set TCP SYN count on sockets.
server: Retry socket connection on ECONNABORTED error.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2215