Instead of going through a custom intermediate format.
--
v3: winegstreamer: Create transforms from MFVIDEOFORMAT / WAVEFORMATEX.
winegstreamer: Translate MFVIDEOFORMAT / WAVEFORMATEX directly to GstCaps in wg_transform.
winegstreamer: Translate GstCaps directly to MFVIDEOFORMAT / WAVEFORMATEX in wg_transform.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5805
I have a question for Julliard before doing additional work:
1. Why do only MR test jobs have the extra-quiet winetest option enabled?
I think it exposes test flakiness (which could be insightful in normal Wine jobs too)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5952
This saves ~1500 LoC, and at the same time allows mapping arbitrary long codec data back and forth GstCaps, which will be required to support arbitrary compressed formats. We can then for instance expose unknown codecs as Wine-specific subtypes, expose generic decoders and pass the backend GstCaps serialized in the codec data.
It makes the code simpler by unifying all frontend mappings and only requiring mapping between GstCaps and a unified set of formats. Mapping between IMFMediaType and the AM_MEDIA_TYPE formats is done using the standard MF functions and are tested and validated in mfplat tests.
--
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5615
Instead of going through a custom intermediate format.
--
v2: winegstreamer: Create transforms from MFVIDEOFORMAT / WAVEFORMATEX.
winegstreamer: Translate MFVIDEOFORMAT / WAVEFORMATEX directly to GstCaps in wg_transform.
winegstreamer: Translate GstCaps directly to MFVIDEOFORMAT / WAVEFORMATEX in wg_transform.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5805
This MR adds support for creating file mapping objects backed by large pages on Linux, by making the following changes:
## wineserver
* On Linux, `create_temp_file` will first attempt to use memfds as the backing fd. If it fails, it'll return to the current codepath, creating a temporary file in either the server or config directory.
* The created memfd will be sealed against writes, if the caller requesting the appropriate page protection flags.
* This removes the requirement that FDs be only created on filesystems/directories that aren't `noexec`.
* In the server method `create_mapping` , if large pages have been requested by the caller, hold that the calling thread's token holds `SeLockMemoryPrivilege` .
* Additionally, add `SeLockMemoryPrivilege` to the list of privileges enabled for the Administrator.
## `ntdll`
* Add `virtual_get_min_large_page_size` and its exported wrapper `wine_unix_get_min_large_page_size`.
* On Linux, the minimum page size is determined by going through `/sys/kernel/mm/hugepages`. If hugepage support was not detected, `STATUS_NOT_SUPPORTED` is returned instead. On other platforms, the older hard-coded value of 2\*1024\*1024 is returned instead.
* `NtCreateSection` will validate certain parameters if large pages are requested. Specifically, it will return STATUS_INVALID_PARAMETER if the requested mapping is not anonymous/unnamed, or the size is not a multiple of the minimum supported page size.
## `kernelbase`
* `GetLargePageMinimum` will use `wine_unix_get_min_large_page_size`.
## `kernel32/tests`
* Add new test test_large_page_file_mapping, which validates privilege enforcements and parameter validation while creating large pages backed file mapping obejcts. The tests are skipped if `GetLargePageMinimum` returns 0.
--
v34: psapi: Add tests for querying information for large pages.
ntdll: Use PAGEMAP_SCAN ioctl to implement get_working_set_ex, if available.
kernel32: Add tests for large pages support.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
This MR adds support for creating file mapping objects backed by large pages on Linux, by making the following changes:
## wineserver
* On Linux, `create_temp_file` will first attempt to use memfds as the backing fd. If it fails, it'll return to the current codepath, creating a temporary file in either the server or config directory.
* The created memfd will be sealed against writes, if the caller requesting the appropriate page protection flags.
* This removes the requirement that FDs be only created on filesystems/directories that aren't `noexec`.
* In the server method `create_mapping` , if large pages have been requested by the caller, hold that the calling thread's token holds `SeLockMemoryPrivilege` .
* Additionally, add `SeLockMemoryPrivilege` to the list of privileges enabled for the Administrator.
## `ntdll`
* Add `virtual_get_min_large_page_size` and its exported wrapper `wine_unix_get_min_large_page_size`.
* On Linux, the minimum page size is determined by going through `/sys/kernel/mm/hugepages`. If hugepage support was not detected, `STATUS_NOT_SUPPORTED` is returned instead. On other platforms, the older hard-coded value of 2\*1024\*1024 is returned instead.
* `NtCreateSection` will validate certain parameters if large pages are requested. Specifically, it will return STATUS_INVALID_PARAMETER if the requested mapping is not anonymous/unnamed, or the size is not a multiple of the minimum supported page size.
## `kernelbase`
* `GetLargePageMinimum` will use `wine_unix_get_min_large_page_size`.
## `kernel32/tests`
* Add new test test_large_page_file_mapping, which validates privilege enforcements and parameter validation while creating large pages backed file mapping obejcts. The tests are skipped if `GetLargePageMinimum` returns 0.
--
v33: psapi: Add tests for querying information for large pages.
ntdll: Use PAGEMAP_SCAN ioctl to implement get_working_set_ex, if available.
kernel32: Add tests for large pages support.
ntdll: Support allocating virtual memory, creating and mapping files backed by large/huge pages.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
This MR adds support for creating file mapping objects backed by large pages on Linux, by making the following changes:
## wineserver
* On Linux, `create_temp_file` will first attempt to use memfds as the backing fd. If it fails, it'll return to the current codepath, creating a temporary file in either the server or config directory.
* The created memfd will be sealed against writes, if the caller requesting the appropriate page protection flags.
* This removes the requirement that FDs be only created on filesystems/directories that aren't `noexec`.
* In the server method `create_mapping` , if large pages have been requested by the caller, hold that the calling thread's token holds `SeLockMemoryPrivilege` .
* Additionally, add `SeLockMemoryPrivilege` to the list of privileges enabled for the Administrator.
## `ntdll`
* Add `virtual_get_min_large_page_size` and its exported wrapper `wine_unix_get_min_large_page_size`.
* On Linux, the minimum page size is determined by going through `/sys/kernel/mm/hugepages`. If hugepage support was not detected, `STATUS_NOT_SUPPORTED` is returned instead. On other platforms, the older hard-coded value of 2\*1024\*1024 is returned instead.
* `NtCreateSection` will validate certain parameters if large pages are requested. Specifically, it will return STATUS_INVALID_PARAMETER if the requested mapping is not anonymous/unnamed, or the size is not a multiple of the minimum supported page size.
## `kernelbase`
* `GetLargePageMinimum` will use `wine_unix_get_min_large_page_size`.
## `kernel32/tests`
* Add new test test_large_page_file_mapping, which validates privilege enforcements and parameter validation while creating large pages backed file mapping obejcts. The tests are skipped if `GetLargePageMinimum` returns 0.
--
v32: psapi: Add tests for querying information for large pages.
ntdll: Use PAGEMAP_SCAN ioctl to implement get_working_set_ex, if available.
kernel32: Add tests for large pages support.
ntdll: Support allocating virtual memory, creating and mapping files backed by large/huge pages.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
without freetype, some calling return failed, so some value may not be initialized (it initialize by some failed calling and pass argument by point of it), it would cause random crash!
Signed-off-by: Fan WenJie <fanwj(a)mail.ustc.edu.cn>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5957
Signed-off-by: Fan WenJie <fanwj(a)mail.ustc.edu.cn>
when get_char_dimensions failed, width not set, width may be undefined value and cause undefined behaviour
--
v7: win32u: fix random crash without libfreetype
https://gitlab.winehq.org/wine/wine/-/merge_requests/5854
On Sat Jun 29 20:07:51 2024 +0000, Loïc Rebmeister wrote:
> @infyquest I'm happy you tried to make a fix, I'm happy you have
> interest in wine.
> > I dont need you to teach me code, Please don't make it personal.
> This ain't personal, if someone want to make a fix, they need at least
> to understand the code they send, this is the same with everyone.
> I know you wanted to do good, but this doesn't change what this code
> effectively does.
I am contributing to wine for more than 10 years. I admit that I might be wrong in understanding the code. Please try to communicate and present in a decent way as it will rub the people in a wrong way.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5771#note_74757
@infyquest I'm happy you tried to make a fix, I'm happy you have interest in wine.
> I dont need you to teach me code, Please don't make it personal.
This ain't personal, if someone want to make a fix, they need at least to understand the code they send, this is the same with everyone.
I know you wanted to do good, but this doesn't change what this code effectively does.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5771#note_74756
Please upload the code to the bug and test it. This was an attempt to fix the bug based on observations. There can be issues, with the code.
I dont need you to teach me code, Please don't make it personal.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5771#note_74751
Your pull request effectively make the code worse, as `{ L"Windows.Foundation.UniversalApiContract", 10, },` means `10` or lower.
So `{ L"Windows.Foundation.UniversalApiContract", 7, },` was already included by `{ L"Windows.Foundation.UniversalApiContract", 10, },`
But due to how `is_api_contract_present` work, it only take the first element with a name into consideration.
This is a simplified pseudo code with comments of `is_api_contract_present` to show the loop stop at first name match:
```java
boolean is_api_contract_present(String name,int version) {
for (present_contract : present_contracts) // List though all entries
if (present_contract.name == name)) // Check is name is equal
return version <= present_contract.max_major; // Check if version is lower than max_major, and return
return false; // No match found, return that we didn't found anything
}
```
Note: the `return` keyword stop code execution, and return the value.
(I'm assuming you didn't understood the code you sent there, as I'm pretty sure if you understood that code before sending it you wouldn't have opened this MR)
Further more, `Windows.Foundation.UniversalApiContract` is a dotnet 5 feature. (Source: https://github.com/madewokherd/wine-mono/issues/151#issuecomment-1232824011)
Wine (and Wine-mono) currently only support up to dotnet 4 on a clean install.
If you want I can teach you code for free so you can actually read and understand the code before you are sending it to wine upstream.
In the meantime I'll see what I can do to try to get the issue fixed.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5771#note_74750
This MR adds support for creating file mapping objects backed by large pages on Linux, by making the following changes:
## wineserver
* On Linux, `create_temp_file` will first attempt to use memfds as the backing fd. If it fails, it'll return to the current codepath, creating a temporary file in either the server or config directory.
* The created memfd will be sealed against writes, if the caller requesting the appropriate page protection flags.
* This removes the requirement that FDs be only created on filesystems/directories that aren't `noexec`.
* In the server method `create_mapping` , if large pages have been requested by the caller, hold that the calling thread's token holds `SeLockMemoryPrivilege` .
* Additionally, add `SeLockMemoryPrivilege` to the list of privileges enabled for the Administrator.
## `ntdll`
* Add `virtual_get_min_large_page_size` and its exported wrapper `wine_unix_get_min_large_page_size`.
* On Linux, the minimum page size is determined by going through `/sys/kernel/mm/hugepages`. If hugepage support was not detected, `STATUS_NOT_SUPPORTED` is returned instead. On other platforms, the older hard-coded value of 2\*1024\*1024 is returned instead.
* `NtCreateSection` will validate certain parameters if large pages are requested. Specifically, it will return STATUS_INVALID_PARAMETER if the requested mapping is not anonymous/unnamed, or the size is not a multiple of the minimum supported page size.
## `kernelbase`
* `GetLargePageMinimum` will use `wine_unix_get_min_large_page_size`.
## `kernel32/tests`
* Add new test test_large_page_file_mapping, which validates privilege enforcements and parameter validation while creating large pages backed file mapping obejcts. The tests are skipped if `GetLargePageMinimum` returns 0.
--
v31: psapi: Add tests for querying information for large pages.
ntdll: Use PAGEMAP_SCAN ioctl to implement get_working_set_ex, if available.
kernel32: Add tests for large pages support.
ntdll: Support allocating virtual memory, creating and mapping files backed by large/huge pages.
server: Use memfd to back anonymous mappings on Linux.
kernelbase: Implement GetLargePageMinimum by returning the value of LargePageMinimum in _KUSER_SHARED_DATA.
server: Set LargePageMinimum in _KUSER_SHARED_DATA on Linux.
server: Require SeLockMemoryPrivilege to create large page mappings.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
This MR adds support for creating file mapping objects backed by large pages on Linux, by making the following changes:
## wineserver
* On Linux, `create_temp_file` will first attempt to use memfds as the backing fd. If it fails, it'll return to the current codepath, creating a temporary file in either the server or config directory.
* The created memfd will be sealed against writes, if the caller requesting the appropriate page protection flags.
* This removes the requirement that FDs be only created on filesystems/directories that aren't `noexec`.
* In the server method `create_mapping` , if large pages have been requested by the caller, hold that the calling thread's token holds `SeLockMemoryPrivilege` .
* Additionally, add `SeLockMemoryPrivilege` to the list of privileges enabled for the Administrator.
## `ntdll`
* Add `virtual_get_min_large_page_size` and its exported wrapper `wine_unix_get_min_large_page_size`.
* On Linux, the minimum page size is determined by going through `/sys/kernel/mm/hugepages`. If hugepage support was not detected, `STATUS_NOT_SUPPORTED` is returned instead. On other platforms, the older hard-coded value of 2\*1024\*1024 is returned instead.
* `NtCreateSection` will validate certain parameters if large pages are requested. Specifically, it will return STATUS_INVALID_PARAMETER if the requested mapping is not anonymous/unnamed, or the size is not a multiple of the minimum supported page size.
## `kernelbase`
* `GetLargePageMinimum` will use `wine_unix_get_min_large_page_size`.
## `kernel32/tests`
* Add new test test_large_page_file_mapping, which validates privilege enforcements and parameter validation while creating large pages backed file mapping obejcts. The tests are skipped if `GetLargePageMinimum` returns 0.
--
v30: psapi: Add tests for querying information for large pages.
ntdll: Use PAGEMAP_SCAN ioctl to implement get_working_set_ex, if available.
kernel32: Add tests for large pages support.
ntdll: Support allocating virtual memory, creating and mapping files backed by large/huge pages.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
This MR adds support for creating file mapping objects backed by large pages on Linux, by making the following changes:
## wineserver
* On Linux, `create_temp_file` will first attempt to use memfds as the backing fd. If it fails, it'll return to the current codepath, creating a temporary file in either the server or config directory.
* The created memfd will be sealed against writes, if the caller requesting the appropriate page protection flags.
* This removes the requirement that FDs be only created on filesystems/directories that aren't `noexec`.
* In the server method `create_mapping` , if large pages have been requested by the caller, hold that the calling thread's token holds `SeLockMemoryPrivilege` .
* Additionally, add `SeLockMemoryPrivilege` to the list of privileges enabled for the Administrator.
## `ntdll`
* Add `virtual_get_min_large_page_size` and its exported wrapper `wine_unix_get_min_large_page_size`.
* On Linux, the minimum page size is determined by going through `/sys/kernel/mm/hugepages`. If hugepage support was not detected, `STATUS_NOT_SUPPORTED` is returned instead. On other platforms, the older hard-coded value of 2\*1024\*1024 is returned instead.
* `NtCreateSection` will validate certain parameters if large pages are requested. Specifically, it will return STATUS_INVALID_PARAMETER if the requested mapping is not anonymous/unnamed, or the size is not a multiple of the minimum supported page size.
## `kernelbase`
* `GetLargePageMinimum` will use `wine_unix_get_min_large_page_size`.
## `kernel32/tests`
* Add new test test_large_page_file_mapping, which validates privilege enforcements and parameter validation while creating large pages backed file mapping obejcts. The tests are skipped if `GetLargePageMinimum` returns 0.
--
v29: psapi: Add tests for querying information for large pages.
ntdll: Use PAGEMAP_SCAN ioctl to implement get_working_set_ex, if available.
kernel32: Add tests for large pages support.
ntdll: Support allocating virtual memory, creating and mapping files backed by large/huge pages.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
--
v2: winex11: Remove now unnecessary window surface BITMAPINFO.
winewayland: Remove now unnecessary window surface BITMAPINFO.
wineandroid: Remove now unnecessary window surface BITMAPINFO.
winemac: Remove now unnecessary driver surface BITMAPINFO.
win32u: Get rid of the unnecessary offscreen window surface struct.
win32u: Introduce a new helper to get surface color info and bits.
win32u: Pass BITMAPINFO and color bits to window surface flush.
win32u: Introduce a new helper to update layered window surface attributes.
win32u: Move layered surface attributes to the window_surface struct.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5947
This part XII of cmd engine rewrite.
This serie implements proper support for && and || command chaining operators:
- implement proper precedence parsing
- implement semantics for the operators
- for this to work, we need to have expected success/failure from commands;
this is supported here for external commands (and calling into a label or
another BAT/CMD file), but support has to be added for all builtin
commands
- that's a big mess as behaviors is far from homogeneous among the builtins:
+ some builtin set coherent success/failure vs errorlevel information
+ some report success/failure, but only set errorlevel upon failure
(keeping errorlevel from previous commands untouched),
+ some even report success (even in case of failure) yet set errorlevel
in case of failure,
- so the next series will now concentrate on testing success/failure and
errorlevel for every builtin command (sigh)
- for now, to help the transition phase, we can distinguish if a builtin
properly reports success/failure; if a builtin with success/failure
ability is used in a chaining operator, we implement the intented
behavior of the chaining operator; otherwise,
we keep old behavior (ie always execute LHS and RHS whatever the
success/failure status).
This shall be removed when all builtin commands report success/failure.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5949
This should reflect what we actually support, while still being a superset
of what native drivers actually support.
Native driver support varies, but, as the comments document, native drivers
(at least as of windows 10) support only RGB -> RGB, YUV -> RGB, and BC -> RGB
conversions. The actual formats supported are a more limited subset than exposed
(despite that the video cards should be perfectly capable of supporting more
conversions) but erring on the side of overreporting seems safer.
--
v3: wined3d: Implement wined3d_check_device_format_conversion().
https://gitlab.winehq.org/wine/wine/-/merge_requests/5816
This should reflect what we actually support, while still being a superset
of what native drivers actually support.
Native driver support varies, but, as the comments document, native drivers
(at least as of windows 10) support only RGB -> RGB, YUV -> RGB, and BC -> RGB
conversions. The actual formats supported are a more limited subset than exposed
(despite that the video cards should be perfectly capable of supporting more
conversions) but erring on the side of overreporting seems safer.
--
v2: wined3d: Implement wined3d_check_device_format_conversion().
https://gitlab.winehq.org/wine/wine/-/merge_requests/5816
This MR adds a default implementation for `wglChoosePixelFormatARB` (in opengl32.dll) which will be used automatically if the driver populates the wgl_pixel_format ARB fields. Thus winex11 automatically uses this, and this MR removes the driver internal implementation.
The second part of this MR adds `WGL_ARB_pixel_format` support for winewayland (we can move this to a separate MR, but I wanted to have another implementation to better assess the behavior).
The `wglChoosePixelFormatARB` behavior is loosely modeled after the the AMD driver as discussed in https://gitlab.winehq.org/wine/wine/-/merge_requests/5388. I tried to keep things simple to begin with, and the results I am getting in various apps/games are sensible, but please try this out so we can refine further.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5933
This is part XI of cmd engine rewrite.
This serie moves the IF and FOR instruction into the new CMD_NODE structure.
I'm fully aware it's a large change (commit #1).
It touches simultaneously at several components:
- lexer is no longer trying to handle nested instructions; this is now
handled over to parser which will take care of it in a recursive
fashion
- moving the IF and FOR instructions into CMD_NODE; this impacts the
parser and the execution part
These three parts are so tightly linked that I can't figure out a simple
way to split first commit in smaller bits.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5942
--
v4: d3d11/tests: Test UpdateSubresource() for NV12 textures.
d3d11/tests: Test NV12 textures without render target.
d3d11/tests: Do not check pitches.
d3d11/tests: Check for NV12 texture support before testing them.
d3d11/tests: Check the result of compiling HLSL shaders.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5818
This is another step towards getting render states out of wined3d_state.
The idea here is similar to the "push constant buffers" used for d3d8/9 flat
constants, and reuses the same infrastructure. That is, we pack all of the
constants directly into a wined3d_buffer which is bound directly to the
wined3d_state as a normal constant buffer. For SPIR-V this buffer is placed in
the GPU, and the shader can simply access it directly, with no renderer-specific
changes needed other than to determine the buffer's location.
Currently this buffer is still stored on the CPU for GLSL, and the contents are
pulled back from the sysmem resource pointer, instead of being pulled from
state->render_states.
Eventually, at least for Vulkan, the idea will be to write a FFP replacement
shader which takes structured data (which, given the constraints of SPIR-V, is
broadly necessary; we cannot simply upload individual named uniforms as we can
with GLSL). In fact this will take the form of an HLSL shader compiled to Shader
Model 2 bytecode. This allows us to, once again, reuse pretty much all of the
existing infrastructure and avoid writing more backend-specific code, and has
the effect that this FFP replacement works not only with SPIR-V but also with
GLSL, allowing us to eventually remove the existing GLSL FFP pipeline, and
enabling me to develop the HLSL FFP pipeline mainly using the GL renderer [which
is useful since the Vulkan renderer is still missing a few other features].
The full branch is available at [1], and passes all tests when using the GL
renderer.
[1] https://gitlab.winehq.org/zfigura/wine/-/tree/himavant8
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5815
I'm currently, very unsuccessfully, tracking down a crash on the unix side that only happens on Gitlab, and although I'm still unable to reproduce it, it then would be useful to have gdb to attach on segfault when I will.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5367
GStreamer uses _SC_NPROCESSORS_CONF to determine 'max-threads'. On the
Steam Deck, this is configured to be 16 (which is double its number
of logical cores).
_SC_NPROCESSORS_CONF also disregards a process's CPU affinity, thus it
can create more threads than is useful, which ultimately wastes memory
resources.
Using affinity to set 'max-threads' addresses both these problems.
--
v6: winegstreamer: Set MAX_THREADS to 4 for i386.
winegstreamer: Use thread_count to determine 'max-threads' value.
winegstreamer: Use process affinity to calculate thread_count.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5923
Rémi Bernon (@rbernon) commented about dlls/winegstreamer/unixlib.c:
> return STATUS_UNSUCCESSFUL;
> }
>
> + if (SUCCEEDED(NtQueryInformationProcess( GetCurrentProcess(),
> + ProcessAffinityMask, &process_mask, sizeof(process_mask), NULL )))
> + thread_count = popcount(process_mask);
> + else
> + thread_count = 0;
```suggestion:-4+0
if (!NtQueryInformationProcess(GetCurrentProcess(),
ProcessAffinityMask, &process_mask, sizeof(process_mask), NULL)))
thread_count = popcount(process_mask);
else
thread_count = 0;
```
SUCCEEDED is for HRESULT, Nt API returns NTSTATUS and we often just check that it's 0. Also note the style fixes (no space in paren here, continuation indent is 8 spaces).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5923#note_74517
GStreamer uses _SC_NPROCESSORS_CONF to determine 'max-threads'. On the
Steam Deck, this is configured to be 16 (which is double its number
of logical cores).
_SC_NPROCESSORS_CONF also disregards a process's CPU affinity, thus it
can create more threads than is useful, which ultimately wastes memory
resources.
Using affinity to set 'max-threads' addresses both these problems.
--
v3: winegstreamer: Set MAX_THREADS to 4 for i386.
winegstreamer: Use thread_count to determine 'max-threads' value.
winegstreamer: Use process affinity to calculate thread_count.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5923