!8598 will require some more work, so I wrote a number of tests in preparation for it. There will be another MR for capturing tests.
This MR also enable 32-bit PCM samples for PulseAudio, since they're already enabled for other drivers and it's useful to have some uniformity between the drivers in order to avoid making writing todo conditions even more of a nightmare than it already is. 32-bit samples are already enabled to extensible wave formats, so it doesn't seem intentional that they were not enabled for non-extensible formats.
--
v2: mmdevapi/tests: Test extensible wave formats when rendering.
mmdevapi/tests: Test flag AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM when rendering.
mmdevapi/tests: Test flag AUDCLNT_STREAMFLAGS_RATEADJUST when rendering.
mmdevapi/tests: Check that Initialize() matches IsFormatSupported() when rendering.
mmdevapi/tests: Simplify checking IsFormatSupported() result when rendering.
mmdevapi/tests: Test more audio formats when rendering.
mmdevapi/tests: Iterate independently on sampling rates, channel counts and sample formats when rendering.
winecoreaudio.drv: Do not spam fixmes for unknown channels.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8653
--
v9: winebth.sys: Set additional properties for remote Bluetooth devices.
bluetoothapis/tests: Implement tests for BluetoothGATTGetCharacteristics.
bluetoothapis: Implement BluetoothGATTGetCharacteristics.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8556
On x86_64 macOS (real Intel/not under Rosetta), a signal delivered to a thread inside a syscall will have CS in `sigcontext` set to the kernel's selector (0x07, `SYSCALL_CS` in xnu source) instead of the user selector (`cs64_sel`: 0x2b, `USER64_CS`).
This causes crashes when running a 32-bit CEF sample or Steam: those do lots of async I/O, SIGUSR1 is received often, and `CS_sig` is `0x07` if received while in `_thread_set_tsd_base`. `get_wow_context()` later compares `SegCs` to `cs64_sel`, sees that it's different, assumes that we are in 32-bit code, and the 32-bit context is used. The top 32-bits of `RIP` and every register are stripped off, and the thread crashes when it tries to return after handling the signal.
To fix this, set `CS_sig` to `cs64_sel` unless it's set to `cs32_sel`. As far as I know, these are the only `%cs` values that Wine is expecting to see.
It appears that macOS has always done this (I tested back to 10.12), but it wasn't an issue until 3a16aabbf55be5e0416c53b498ed1d085b8d410d/!6866 started doing `_thread_set_tsd_base()` outside of a Wine/NT syscall.
--
v2: ntdll: Ensure %cs is correct in sigcontext on x86_64 macOS.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8659
On x86_64 macOS (real Intel/not under Rosetta), a signal delivered to a thread inside a syscall will have CS in `sigcontext` set to the kernel's selector (0x07, `SYSCALL_CS` in xnu source) instead of the user selector (`cs64_sel`: 0x2b, `USER64_CS`).
This causes crashes when running a 32-bit CEF sample or Steam: those do lots of async I/O, SIGUSR1 is received often, and `CS_sig` is `0x07` if received while in `_thread_set_tsd_base`. `get_wow_context()` later compares `SegCs` to `cs64_sel`, sees that it's different, assumes that we are in 32-bit code, and the 32-bit context is used. The top 32-bits of `RIP` and every register are stripped off, and the thread crashes when it tries to return after handling the signal.
To fix this, set `CS_sig` to `cs64_sel` unless it's set to `cs32_sel`. As far as I know, these are the only `%cs` values that Wine is expecting to see.
It appears that macOS has always done this (I tested back to 10.12), but it wasn't an issue until 3a16aabbf55be5e0416c53b498ed1d085b8d410d/!6866 started doing `_thread_set_tsd_base()` outside of a Wine/NT syscall.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8659
These are the first steps towards code sharing, finally :)
Patch 4 is a bit big, but it's just copying code from various source files into a single source file. I can attempt to split if if that's preferable for review purposes.
--
v3: d3dx10: Use shared d3dx code in get_image_info when possible.
d3dx9: Don't include d3dx9 header in d3dx_helpers.
d3dx9: Get rid of ID3DXBuffer usage in d3dx_helpers.
d3dx9: Move functions intended for code sharing into a separate source file.
d3dx9: Introduce d3dx_image_file_format enumeration.
d3dx9: Introduce d3dx_resource_type enumeration.
d3dx9: Replace D3DFORMAT constants with enum d3dx_pixel_format_id constants.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8490