This is the first set of patches in an effort to create more generic image loading/conversion code that can eventually be shared.
--
v3: d3dx9: Preserve the contents of unaligned compressed destination surfaces.
d3dx9: Split off image decompression into a helper function.
d3dx9: Split D3DXLoadSurfaceFromMemory functionality into a separate function.
d3dx9: Use base image pointer when decompressing source image.
d3dx9/tests: Add more tests for misaligned compressed surface loading.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5202
It feels a bit weird storing and playing MIDI control events directly in seqtrack. I originally thought they were stored as curve items, but curve items would generate `DMUS_CURVE_PMSG`, but these MIDI control events are played verbatim as `DMUS_MIDI_PMSG`.
--
v2: dmime: Handle MIDI control events in MIDI files.
dmime: Parse note on/off events and generate a seqtrack.
dmime/tests: Call the correct QueryInterface function for DirectMusic track.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5221
This part mainly includes a compilation pass to turn non-float operations into float operations, inserting the corresponding casts on the operands and result, and writing casts from bool to float as MOV.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/671
The only leftover field is SM1-specific, and I don't too much about how it's used, so I'm leaving it aside for now. It seems, however, that it could be moved directly to the parser (it seems to be only used for parsing and scanning).
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/680
~~This applies on top of !656, the last three commits belong here.~~
--
v11: vkd3d-shader/ir: Sort each loop by block label.
vkd3d-shader/ir: Dump the loops in the control flow graph.
vkd3d-shader/ir: Keep track of loops by header block.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/662
--
v5: vkd3d-dxbc: Add an option to re-emit the shader with the correct checksum.
vkd3d-dxbc: Add an option to ignore checksum.
vkd3d-shader/dxbc: Add flag to ignore the DXBC checksum.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/582
At some point I would like to have an assembler for TPF, so that it's easier to write and modify tests. This is a first step in that direction, fixing some kind of format for serializing signatures in the comment at the beginning of the assembler code. I'm not decided yet on all details, so take this as an RFC for the moment.
--
v11: tests: Test emitting the signature.
vkd3d-compiler: Add an option to emit the signature when disassembling.
vkd3d-shader/d3d-asm: Support emitting the shader signature.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/553
This is the third part of a larger serie of four parts to cover module loading
and debug info file lookup in dbghelp. This third part covers:
- searching some sub directories of search-path elements
- better support of various forms of module name
- change the order of module lookup (improves performance in some games)
- various corner case fixes
Note: some modifications require new todo marks in the tests, as the full fix
will require changing other areas that would make the change too large.
The large serie of four parts resolves all the todo:s.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5248
This MR introduces support for OpenGL in the Wayland driver.
Since the MR started to become somewhat long I have left some things for a subsequent part 13.2:
* wgl(Get)SwapIntervalEXT (which means everything is vsync-ed at the moment)
* wglShareLists
* wglCreateContextAttribsARB
* Fix for some apps appearing translucent in certain compositors (typically when fullscreen).
Missing features not planned to be part of the 13.x MRs:
* Offscreen rendering through pbuffers or pixmaps, since Wayland EGL doesn't support them (perhaps we can simulate with FBOs instead?).
* Front buffer rendering. Again Wayland EGL doesn't support this, and certainly not in the form needed (i.e., the surface should be available for additional rendering with GDI). In the experimental branch I implemented a workaround that seemed to work for many cases, but will need to revisit and reevaluate options. IIRC, the most common case I have seen for this is when using wined3d/gl for older (Direct)2D games, so perhaps we can find a better solution at that layer.
* Child window rendering (this needs infrastructure in Wayland driver core which will enable both GL and Vulkan rendering in child windows).
* Cross-process rendering.
Thanks!
--
v4: winewayland.drv: Handle resizing of OpenGL content.
winewayland.drv: Implement wglSwapBuffers.
winewayland.drv: Implement wglMakeCurrent and wglMakeContextCurrentARB.
winewayland.drv: Implement OpenGL context creation.
winewayland.drv: Implement wglSetPixelFormat(WINE).
https://gitlab.winehq.org/wine/wine/-/merge_requests/5177
Based on [a patch](https://www.winehq.org/mailman3/hyperkitty/list/wine-devel@winehq.or… by Jinoh Kang (@iamahuman) from February 2022.
I removed the need for the event object and implemented fast paths for Linux.
On macOS 10.14+ `thread_get_register_pointer_values` is called on every thread of the process.
On Linux 4.14+ `membarrier(MEMBARRIER_CMD_GLOBAL_EXPEDITED, ...)` is used.
On x86 Linux <= 4.13 and on other platforms `madvise(..., MADV_DONTNEED)` is used, which sends IPIs to all cores causing them to do a memory barrier.
--
v13: ntdll/tests: Add basic NtFlushProcessWriteBuffers test.
https://gitlab.winehq.org/wine/wine/-/merge_requests/741
At some point I would like to have an assembler for TPF, so that it's easier to write and modify tests. This is a first step in that direction, fixing some kind of format for serializing signatures in the comment at the beginning of the assembler code. I'm not decided yet on all details, so take this as an RFC for the moment.
--
v10: tests: Test emitting the signature.
vkd3d-compiler: Add an option to emit the signature when disassembling.
vkd3d-shader/d3d-asm: Support emitting the shader signature.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/553
It feels a bit weird storing and playing MIDI control events directly in seqtrack. I originally thought they were stored as curve items, but curve items would generate `DMUS_CURVE_PMSG`, but these MIDI control events are played verbatim as `DMUS_MIDI_PMSG`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5221
This also bumps the minimum supported version of macOS to 10.12 to unconditionally assume the ulock syscalls are present.
As discussed with @Gcenx this shouldn't be an issue, as the current minimum support version of 10.8 does not work anyways at the moment with only 10.10+ being useable and even then virtually no-one using wine on versions < 10.12 (and also being unsupported by the prebuilt binaries).
Bumping to 10.12 would also have the side-benefit of allowing some cleanup of deprecated functions or legacy codepaths (like `mach_continuous_time` vs `mach_absolute_time` and probably much more).
In my testing ulock futexes are about 2x faster for synchronization than kevents. Using the syscall wrappers here should provide protection against changing syscall numbers, and given that ulock is also directly used by libc++, the probability of an incompatible API change here is basically zero imo.
By default ulock is also process-private, similar to the current linux implementation, cross-process synchronization would require darwin 19+ (macOS 10.15+) with `UL_COMPARE_AND_WAIT_SHARED`.
The diff is a bit bigger than it actually is in effect, since https://gitlab.winehq.org/mzent/wine/-/commit/28a8a991c165f0d37dbf78ca3cdee… is only moving some code around and not actually changing anything.
--
v3: ntdll: Implement futex_wait() and futex_wake_one() on macOS.
ntdll: Simplify futex interface from futex_wake() to futex_wake_one().
https://gitlab.winehq.org/wine/wine/-/merge_requests/5237
Tests show that injected input indeed wait on LL-hooks to be processed. However real hardware input isn't normally sent by the processes themselves like Wine does, and it is unnecessary to wait for the LL-hooks to be processed. The applications threads should instead return from the ProcessEvent call when input is received, and process their hooks later as needed, or do some other tasks application might expect them to.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5245
This also bumps the minimum supported version of macOS to 10.12 to unconditionally assume the ulock syscalls are present.
As discussed with @Gcenx this shouldn't be an issue, as the current minimum support version of 10.8 does not work anyways at the moment with only 10.10+ being useable and even then virtually no-one using wine on versions < 10.12 (and also being unsupported by the prebuilt binaries).
Bumping to 10.12 would also have the side-benefit of allowing some cleanup of deprecated functions or legacy codepaths (like `mach_continuous_time` vs `mach_absolute_time` and probably much more).
In my testing ulock futexes are about 2x faster for synchronization than kevents. Using the syscall wrappers here should provide protection against changing syscall numbers, and given that ulock is also directly used by libc++, the probability of an incompatible API change here is basically zero imo.
By default ulock is also process-private, similar to the current linux implementation, cross-process synchronization would require darwin 19+ (macOS 10.15+) with `UL_COMPARE_AND_WAIT_SHARED`.
The diff is a bit bigger than it actually is in effect, since https://gitlab.winehq.org/mzent/wine/-/commit/28a8a991c165f0d37dbf78ca3cdee… is only moving some code around and not actually changing anything.
--
v2: ntdll: Implement futex_wait() and futex_wake() on macOS.
ntdll: Use USE_FUTEX to indicate futex support.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5237
First part of Proton shared memory series. The full branch can be seen at https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories.
--
v23: win32u: Use the desktop shared data for GetCursorPos.
server: Move the last cursor time to the desktop session object.
server: Move the cursor position to the desktop session object.
win32u: Open desktop shared objects from session mapping.
server: Allocate shared session object for desktops.
win32u: Open the global session shared mapping.
include: Add ReadNoFence64 inline helpers.
server: Create a global session shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3103
On Tue Mar 5 20:50:52 2024 +0000, Jeffrey Smith wrote:
> As the documentation states that the updated region _may_ be larger than
> the specified region, this seemed safer.
Yeah, but I don't really want to trust that programs are following the letter of the documentation either, especially with an API this old. I'd rather at least test exact values, even if we have to mark them todo.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5161#note_63598
On Tue Mar 5 19:10:38 2024 +0000, Zebediah Figura wrote:
> Any reason not to test the exact values?
As the documentation states that the updated region _may_ be larger than the specified region, this seemed safer.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5161#note_63597
On Tue Mar 5 19:10:37 2024 +0000, Zebediah Figura wrote:
> Can there be multiple updates? You mention the possibility of "at least"
> one update in your tests; should we be storing an array instead?
Multiple calls to ForceUpdate seem entirely reasonable.
This was part of trying to keep things simple for the implementation and effectively have a single dirty-rectange.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5161#note_63596
On Tue Mar 5 19:10:31 2024 +0000, Zebediah Figura wrote:
> Where do these fail?
- The first fails on the testbot (XP/2003) with result DDERR_CANTLOCKSURFACE.
- The second fails on a local box on Win10 (with a native d3drm.dll copied in) - the color returned from get_surface_color is always 0x00ff00ff.
FWIW, the `test_update_surfaces*` tests _do_ run properly on a local box of mine, running XP bare-metal.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5161#note_63595
On Tue Mar 5 19:10:30 2024 +0000, Zebediah Figura wrote:
> Not a big deal, but in the future I'd like to avoid this, and just
> always check the actual hr value.
Oops, that must've been left over from a copy-paste.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5161#note_63594
This MR introduces support for OpenGL in the Wayland driver.
Since the MR started to become somewhat long I have left some things for a subsequent part 13.2:
* wgl(Get)SwapIntervalEXT (which means everything is vsync-ed at the moment)
* wglShareLists
* wglCreateContextAttribsARB
* Fix for some apps appearing translucent in certain compositors (typically when fullscreen).
Missing features not planned to be part of the 13.x MRs:
* Offscreen rendering through pbuffers or pixmaps, since Wayland EGL doesn't support them (perhaps we can simulate with FBOs instead?).
* Front buffer rendering. Again Wayland EGL doesn't support this, and certainly not in the form needed (i.e., the surface should be available for additional rendering with GDI). In the experimental branch I implemented a workaround that seemed to work for many cases, but will need to revisit and reevaluate options. IIRC, the most common case I have seen for this is when using wined3d/gl for older (Direct)2D games, so perhaps we can find a better solution at that layer.
* Child window rendering (this needs infrastructure in Wayland driver core which will enable both GL and Vulkan rendering in child windows).
* Cross-process rendering.
Thanks!
--
v3: winewayland.drv: Handle resizing of OpenGL content.
winewayland.drv: Implement wglSwapBuffers.
winewayland.drv: Implement wglMakeCurrent and wglMakeContextCurrentARB.
winewayland.drv: Implement OpenGL context creation.
winewayland.drv: Implement wglSetPixelFormat(WINE).
winewayland.drv: Implement wglDescribePixelFormat.
winewayland.drv: Implement wglGetProcAddress.
winewayland.drv: Implement wglGetExtensionsString{ARB,EXT}.
winewayland.drv: Initialize core GL functions.
winewayland.drv: Add skeleton OpenGL driver.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5177
> 1. Check how multiple ForceUpdate / Clear calls influence the returned list of rectangles
> 2. Check which d3drmdevice interface is passed to the update callbacks
I would kind of rather check both of these things. I don't want to go in the wrong direction with the implementation.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5161#note_63582
> Documentation for `ForceUpdate` states that "The system might update any region that is larger than the specified rectangle, including possibly the entire window". While native seems to use a sort of dirty-rectangle approach, for this MR, I am simply dirtying the entire surface. If someday someone did want to more-closely match the behavior of native, much can be learned from the rectangles passed to the update callbacks.
Yeah, I can't say I'm thrilled about this. It doesn't seem like it should be that hard to implement more granular rects, at least for the cases covered here, and assuming that rects are indeed granular.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5161#note_63581
On Tue Mar 5 19:10:33 2024 +0000, Zebediah Figura wrote:
> It'd be nice to rename these parameters to left/right/top/bottom.
Eh, I guess D3DRECT fields are called this. Still, I find the clearer names mildly preferable wherever possible.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5161#note_63580
> Documentation for `ForceUpdate` states that "The system might update any region that is larger than the specified rectangle, including possibly the entire window". While native seems to use a sort of dirty-rectangle approach, for this MR, I am simply dirtying the entire surface. If someday someone did want to more-closely match the behavior of native, much can be learned from the rectangles passed to the update callbacks.
Yeah, I can't say I'm thrilled about this. It doesn't seem like it should be that hard to implement more granular rects, at least for the cases covered here, and assuming that rects are indeed granular.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5161#note_63579
Zebediah Figura (@zfigura) commented about dlls/d3drm/device.c:
> device->width = desc.dwWidth;
> device->height = desc.dwHeight;
>
> + device->needs_update = FALSE;
> +
The device is zero-initialized, so I don't think this hunk is necessary.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5161#note_63576
Zebediah Figura (@zfigura) commented about dlls/d3drm/d3drm_private.h:
> IDirect3DRM *d3drm;
> IDirectDraw *ddraw;
> IDirectDrawSurface *primary_surface, *render_target;
> - IDirectDrawClipper *clipper;
This should ideally be a separate patch.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5161#note_63575
This also bumps the minimum supported version of macOS to 10.12 to unconditionally assume the ulock syscalls are present.
As discussed with @Gcenx this shouldn't be an issue, as the current minimum support version of 10.8 does not work anyways at the moment with only 10.10+ being useable and even then virtually no-one using wine on versions < 10.12 (and also being unsupported by the prebuilt binaries).
Bumping to 10.12 would also have the side-benefit of allowing some cleanup of deprecated functions or legacy codepaths (like `mach_continuous_time` vs `mach_absolute_time` and probably much more).
In my testing ulock futexes are about 2x faster for synchronization than kevents. Using the syscall wrappers here should provide protection against changing syscall numbers, and given that ulock is also directly used by libc++, the probability of an incompatible API change here is basically zero imo.
By default ulock is also process-private, similar to the current linux implementation, cross-process synchronization would require darwin 19+ (macOS 10.15+) with `UL_COMPARE_AND_WAIT_SHARED`.
The diff is a bit bigger than it actually is in effect, since https://gitlab.winehq.org/mzent/wine/-/commit/28a8a991c165f0d37dbf78ca3cdee… is only moving some code around and not actually changing anything.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5237
More details here: https://devblogs.microsoft.com/oldnewthing/20181206-00/?p=100415
However it does not mention that `PAGE_NOACCESS` and `PAGE_READONLY` still result in an error on Windows, which is properly implemented in this MR.
Only `WriteProcessMemory` offers this "service", `NtWriteVirtualMemory` will fail on non-writeable and executable regions (and already does so, except for the the mach server backend, which needs https://gitlab.winehq.org/wine/wine/-/merge_requests/4826 to also behave correctly here).
--
v3: kernelbase: Flush instruction cache when necessary in WriteProcessMemory.
kernelbase: Allow WriteProcessMemory to succeed on PAGE_EXECUTE_READ.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5222
--
v2: wined3d/nvrc: Remove now redundant WINED3D_TSS_RESULT_ARG handlers.
wined3d/nvrc: Move alpha op application to nvrc_apply_draw_state().
wined3d/nvrc: Remove now redundant STATE_SAMPLER handlers.
wined3d/nvrc: Move color ops from nvrc_colorop() to nvrc_apply_draw_state().
wined3d/nvrc: Move FFP bumpenv constant loading to nvrc_apply_draw_state().
wined3d/nvrc: Move TEXTUREFACTOR constant loading to nvrc_apply_draw_state().
https://gitlab.winehq.org/wine/wine/-/merge_requests/5171
--
v27: vkd3d-shader: Force enable all extensions, features and Vulkan 1.1.
vkd3d: Use long number format in vkd3d_tls_key_set_value().
vkd3d-shader/dxil: Emit a specific warning for explicit wave size.
vkd3d-shader/dxil: Emit a specific warning for RT acceleration structs.
vkd3d-shader/spirv: Implement the UNPACK_4X8 instruction.
vkd3d-shader/dxil: Implement DX intrinsic Unpack4x8.
vkd3d-shader/spirv: Implement the PACK_4X8 instruction.
vkd3d-shader/dxil: Implement DX intrinsic Pack4x8.
vkd3d-shader/dxil: Add a second pre-pass for AnnotateHandle.
vkd3d-shader/dxil: Implement DX intrinsics Dot4AddI8Packed and Dot4AddU8Packed.
vkd3d-shader/spirv: Introduce DP4_I8 and DP4_U8 instructions.
vkd3d-shader/spirv: Handle the ORD and UNO instructions.
vkd3d-shader/dxil: Support FCMP_ORD and FCMP_UNO for CMP2.
tests/shader-runner: Add a test for FCMP_ORD (is ordered).
vkd3d-shader/spirv: Support bool comparisons.
vkd3d-shader/dxil: Support scalar ALLOCA.
vkd3d-shader/dxil: Handle resource handle creation in a pre-pass.
vkd3d-shader/dxil: Emit an error for mesh, amplification and library shaders.
vkd3d: Enable KHR_fragment_shader_barycentric.
vkd3d-shader/dxil: Support the barycentrics register type.
vkd3d: Enable EXT_shader_image_atomic_int64.
vkd3d-shader/spirv: Support 64-bit UAV atomics.
vkd3d-shader/dxil: Implement DX intrinsic WaveQuadReadLaneAt.
vkd3d-shader/dxil: Implement DX intrinsic WavePrefixOp.
vkd3d-shader/dxil: Ignore "llvm.lifetime.*" intrinsics.
vkd3d-shader/dxil: Implement DX intrinsic AnnotateHandle.
vkd3d-shader/dxil: Implement DX intrinsic CreateHandleFromBinding.
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/vkd3d/-/merge_requests/648
Since Yousician's last update, it was throwing an error when initialising audio output. Unfortunately I don't have access to the old version, but they seem to have dropped win<10 support, and are using only IAudioClient3_InitializeSharedAudioStream. They also use IDeviceTopology to get the type of the first output connector.
This is the bare minimum I needed to get it working.
--
v20: mmdevapi: add stub for IDeviceTopology
https://gitlab.winehq.org/wine/wine/-/merge_requests/3554
This is the first set of patches in an effort to create more generic image loading/conversion code that can eventually be shared.
--
v2: d3dx9: Preserve the contents of unaligned compressed destination surfaces.
d3dx9: Split off image decompression into a helper function.
d3dx9: Split D3DXLoadSurfaceFromMemory functionality into a separate function.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5202
--
v3: win32u: Add support for sending and receiving WM_POINTER* messages.
server: Add support for sending and receiving WM_POINTER* messages.
mouhid.sys: Send WM_POINTER* messages on contact updates.
dinput/tests: Test the WM_POINTER* message parameter values.
win32u: Use a custom struct hid_input for NtUserSendHardwareInput.
win32u: Use NtUserCallHwndParam interface for __wine_send_input.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5193
Overriding the SDL_VIDEODRIVER variable (for Wayland support as an example)
on the Linux side can lead to some games under Wine failing to load (so treat
those variables as special).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5231
This is the second part of a larger serie of four parts to cover module loading
and debug info file lookup in dbghelp.
This second part covers:
- new tests about SymLoadModule flags and options
- separating PDB file loading from trying to find the PDB file matching
the requested lookup parameter
Note: some modifications require new todo marks in the tests, as the full fix will
require changing other areas that would make the change too large.
The large serie of four parts resolves all the todo:s.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5233