Mainly promoting single object components to variables for SM 5.0's RDEF block and lowering combined samplers to separate sampler+texture objects for SM 4.
Following patches (including prepending uniform copies resource components within struct parameters) in:
https://gitlab.winehq.org/fcasas/vkd3d/-/commits/master6c
--
v2: vkd3d-shader/hlsl: Don't allocate all texture registers for synthetic separated samplers.
vkd3d-shader/hlsl: Lower combined samplers to separate sampler and texture objects for SM4.
vkd3d-shader/hlsl: Separate tracking of sampler_dim and usage for object components.
vkd3d-shader/hlsl: Introduce hlsl_new_synthetic_var_named().
vkd3d-shader/hlsl: Check is_uniform instead of HLSL_STORAGE_UNIFORM when validating object refs.
tests: Add lowering combined samplers tests.
vkd3d-shader/hlsl: Handle resource components individually for SM 5.0.
vkd3d-shader/tpf: Introduce struct extern_resource.
vkd3d-shader/hlsl: Allow derefs to provide the data_type.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/209
It is really useful to see at a glance what function is
segfaulting/crashing here when debugging games/apps.
This code is generated, and when generating WineVulkan against different
Vulkan spec versions, etc it may be misleading that the Line: referred
to by the assert dialog does not match what is generated locally on
a different machine for the same Wine version/commit.
Signed-off-by: Joshua Ashton <joshua(a)froggi.es>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2983
To be merged after !2907.
--
v6: wineoss: Use mmdevapi's AudioClient's GetService.
winecoreaudio: Use mmdevapi's AudioClient's GetService.
winealsa: Use mmdevapi's AudioClient's GetService.
winepulse: Move AudioClient's GetService into mmdevapi.
winepulse: Lock sessions in AudioClient's GetService.
wineoss: Use mmdevapi's session_wrapper_create.
winecoreaudio: Use mmdevapi's session_wrapper_create.
winealsa: Use mmdevapi's session_wrapper_create.
winepulse: Move session_wrapper_create into mmdevapi.
winepulse: Always initialize ref to 1 in session wrapper.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2908
This uses a new hardware message with Wine internal WM_WINE_CLIPCURSOR message, to notify the foreground window of ClipCursor calls, or resets. It could possibly have used posted messages, like is done to request the desktop to release the clipping rectangle but I figured that a hardware message could be appropriate and is possibly the preferred mechanism to notify the foreground window.
We use QS_RAWINPUT for convenience here, as to automatically release the hardware message, and because this message is somewhat low-level. It could be anything, and maybe QS_MOUSEMOVE, but we'd have to then manually call accept_hardware_message from win32u.
The desktop posted message is kept, as there's no guarantee that the foreground window will be processing its hardware messages when we need, and/or that the desktop window is foreground.
--
v2: winex11: Remove now unnecessary ClipCursor forwarding to foreground thread.
win32u: Asynchronously apply or reset ClipCursor from the hardware message.
server: Queue a hardware WM_WINE_CLIPCURSOR message to the foreground thread.
server: Use a separate helper to merge WM_MOUSEMOVE messages.
server: Use the helper to reset the clip rect when the desktop size changes.
win32u: Add a reset parameter to WM_WINE_CLIPCURSOR and driver ClipCursor.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2981
To be merged after !2907.
--
v5: wineoss: Use mmdevapi's AudioClient's GetService.
winecoreaudio: Use mmdevapi's AudioClient's GetService.
winealsa: Use mmdevapi's AudioClient's GetService.
winepulse: Move AudioClient's GetService into mmdevapi.
winepulse: Lock sessions in AudioClient's GetService.
wineoss: Use mmdevapi's session_wrapper_create.
winecoreaudio: Use mmdevapi's session_wrapper_create.
winealsa: Use mmdevapi's session_wrapper_create.
winepulse: Move session_wrapper_create into mmdevapi.
winepulse: Always initialize ref to 1 in session wrapper.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2908
This fixes some upside-down videos in Secret of Mana. The game plays a NV12 video using MF session and EVR, then calls GetCurrentImage to get the frame RGB data and display it itself.
--
v3: evr: Respect RGB format stride in GetCurrentImage.
evr/tests: Test IMFVideoDisplayControl_GetCurrentImage orientation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2883
To be merged after !2907.
--
v4: wineoss: Use mmdevapi's AudioClient's GetService.
winecoreaudio: Use mmdevapi's AudioClient's GetService.
winealsa: Use mmdevapi's AudioClient's GetService.
winepulse: Move AudioClient's GetService into mmdevapi.
wineoss: Use mmdevapi's session_wrapper_create.
winecoreaudio: Use mmdevapi's session_wrapper_create.
winealsa: Use mmdevapi's session_wrapper_create.
winepulse: Move session_wrapper_create into mmdevapi.
wineoss: Set session wrapper reference count correctly on creation.
winecoreaudio: Set session wrapper reference count correctly on creation.
winealsa: Set session wrapper reference count correctly on creation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2908
On my Nvidia GeForce GTX 1050 Ti this test is not passing because of considerably different numeric results.
As Giovanni pointed out, this is because my GPU uses the fine derivate and not the coarse derivate to implement ddx() and ddy().
Testing both ddx_coarse()|ddy_coarse() and ddx_fine()|ddy_fine() on the WARP driver shows that both these derivates are the same in coordinates where both X and Y are even, i.e. the first pixel of each 2x2 quad. So the test was modified to only probe on these coordinates.
The new expected values were obtained from running the test using the WARP driver, and ulps adjusted for my GPU.
However, this MR is marked as a draft because I would like to know if the test passes on other GPUs.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/199
TODO: Fall back to `#undef WITH_SIMD` build if nasm/yasm is not found.
JPEG decoding became much slower after a6ac035a7454c92bec367b2cd3021f8b98d4d807 because Wine no longer used the host libjpeg, which was usually provided by libjpeg-turbo. Use libjpeg-turbo in Wine instead of plain libjpeg.
This adds a dependency on nasm or yasm to compile the i386/x86_64 assembly code.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2956
This uses a new hardware message with Wine internal WM_WINE_CLIPCURSOR message, to notify the foreground window of ClipCursor calls, or resets. It could possibly have used posted messages, like is done to request the desktop to release the clipping rectangle but I figured that a hardware message could be appropriate and is possibly the preferred mechanism to notify the foreground window.
We use QS_RAWINPUT for convenience here, as to automatically release the hardware message, and because this message is somewhat low-level. It could be anything, and maybe QS_MOUSEMOVE, but we'd have to then manually call accept_hardware_message from win32u.
The desktop posted message is kept, as there's no guarantee that the foreground window will be processing its hardware messages when we need, and/or that the desktop window is foreground.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2981
Windows 10 [received support](https://devblogs.microsoft.com/commandline/af_unix-comes-to-window… for AF_UNIX sockets in Insider Build 17063. This merge request adds basic support for AF_UNIX sockets to ws2_32 and wineserver.
Of particular note is the difficulty in handling `sun_path`. Most of the functions that allow for translating Windows paths to Unix paths are not accessible from ws2_32. I considered the following options:
* Pass the Windows path to wineserver and do the conversion there.
* This is, as far as I can tell, not possible without major rearchitecting. wineserver does not have functions to translate Windows paths to Unix paths, for obvious reasons.
* Obtain the current working directory of the requesting process and temporarily change directories to there.
* This only handles relative paths and fails for absolute paths, UNC paths, etc.
* Conditionally change directories based on whether the path is relative or not.
* This is error-prone and wineserver does not have the requisite functions to do this cleanly.
I ultimately decided to pass the translated Unix path to wineserver, which changes directories to `dirname(path)`. It then provides `bind` and `connect` with `basename(path)`. This is not threadsafe, but wineserver is not (currently) multithreaded.
Abstract sockets are supported by this patch.
--
v14: ws2_32/tests: Add test for AF_UNIX sockets.
server + ntdll/unix: Move getpeername() implementation to server.
server: Introduce error when attempting to connect() to abstract AF_UNIX sockets.
server: Allow for deletion of socket files.
ws2_32: Add support for AF_UNIX sockets.
ntdll/unix: Add support for AF_UNIX sockets to multiple functions.
ws2_32: Add afunix.h header.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2786
4.18+ Linux kernels remove support for IPX but keep SOL_IPX defined, which
causes compilation errors as wine unconditionally uses IPX structures if
this is the case. Instead check for IPX_MTU to determine IPX support as it is
defined within the ipx.h header itself.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2965
> It is not a matter of no-confidence, although I could argue that being told that my statements are non-sensical in several occasions isn't a great way to build confidence.
I suspect I know at least one of the occasions you're referring to, and I'd like to apologize for that. It's never been my intent to demean or insult, and I'm sorry for having done so anyway. I will try to be more mindful of my language in the future.
> I took maintainership of the wg_transform code, not just because I wrote most of it, but also in order to help with the bandwidth, and avoid bothering two persons on every single change. I believe I have taken every comment into account very carefully, and haven't bypassed your review or Nikolay's for MF related things, on any meaningful change.
I appreciate the wish to reduce my workload, and I will gladly agree that my reviews have been acknowledged. As I've stated, though, I would still like the opportunity to perform those reviews on any winegstreamer changes.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2901#note_34600
Windows 10 [received support](https://devblogs.microsoft.com/commandline/af_unix-comes-to-window… for AF_UNIX sockets in Insider Build 17063. This merge request adds basic support for AF_UNIX sockets to ws2_32 and wineserver.
Of particular note is the difficulty in handling `sun_path`. Most of the functions that allow for translating Windows paths to Unix paths are not accessible from ws2_32. I considered the following options:
* Pass the Windows path to wineserver and do the conversion there.
* This is, as far as I can tell, not possible without major rearchitecting. wineserver does not have functions to translate Windows paths to Unix paths, for obvious reasons.
* Obtain the current working directory of the requesting process and temporarily change directories to there.
* This only handles relative paths and fails for absolute paths, UNC paths, etc.
* Conditionally change directories based on whether the path is relative or not.
* This is error-prone and wineserver does not have the requisite functions to do this cleanly.
I ultimately decided to pass the translated Unix path to wineserver, which changes directories to `dirname(path)`. It then provides `bind` and `connect` with `basename(path)`. This is not threadsafe, but wineserver is not (currently) multithreaded.
Abstract sockets are supported by this patch.
--
v12: ws2_32/tests: Add test for AF_UNIX sockets.
server: Introduce error when attempting to connect() to abstract AF_UNIX sockets.
server: Allow for deletion of socket files.
ws2_32: Add support for AF_UNIX sockets.
ntdll/unix: Add support for AF_UNIX sockets to multiple functions.
ws2_32: Add afunix.h header.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2786
Indexing with non-constants offsets requires relative addressing in SM4. In assembly, this is written like in the following example:
```
x1[r1.x + 3]
```
The first part of this patch series only includes support for indexing vectors with non-constant indexes.
Following patches in https://gitlab.winehq.org/fcasas/vkd3d/-/commits/nonconst-offsets-3.
---
Non-constant indexing of vectors cannot be implemented with relative addressing in SM4 because this
indexation cannot be performed at the level of register-components, only whole registers.
Mathematical operations must be used instead.
For floats, the native compiler seems to index an identity matrix, to
get the i-th column, and then proceedes to compute the dot product
between that column and the vector. For ints, bit operations seem to be
performed.
While probably less efficient, this implementation complies with the
type-checking at the IR level and when writing bytecode.
--
v4: vkd3d-shader/hlsl: Support non-constant vector indexing.
vkd3d-shader/hlsl: Lower dot for non-float types.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/207
The D3D12 swapchain code is currently quite messy, probably because it was originally designed around the direct usage of the Vulkan swapchain images, then the support for user buffers was added, and the original design was later phased out. Currently the internal state can be divided in two different sets of objects: the "D3D12 side", which is visible to the `IDXGISwapChain` client and must be preserved at all times (except on the client's request, i.e., when `UpdateBuffers()` is called) and the "Vulkan side" which is private and can be destroyed and recreated more or less transparently (in case the Vulkan swapchain goes out of date or some settings are updated).
This MR begins the process of de-intertwining the helpers that act on one or the other sides, so that the structure of the code is made clearer. The full patch set is at https://gitlab.winehq.org/giomasce/wine/-/commits/chianti.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2930
This is to prevent NULL pointers when creating a TextService with no rows in it.
This NULL pointers doesn't happen when creating a richedit windows, because
it sets an empty text when the richedit window procedure handles the WM_CREATE event.
--
v4: riched20: Call ME_UpdateRepaint instead of editor_ensure_visible in set_selection.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2941
This is to prevent NULL pointers when creating a standalone text service
that doesn't have any text set and then using functions like EM_SETSEL.
This NULL pointers doesn't happen when creating a richedit windows, because
it sets an empty text when the richedit window procedure handles the WM_CREATE event.
--
v3: riched20: Check if row is null in editor_ensure_visible.
riched20: Return NULL if no row is found in row_from_cursor.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2941