After an X11 event handler queues messages to another thread, TRUE should be returned and eventually
propagated to X11DRV_ProcessEvents().
When FALSE is always returned in xrandr14_device_change_handler(), a possible hang can happen for
the desktop message queue as follows:
1. The explorer.exe calls GetMessageW() -> NtUserGetMessage() -> wait_objects() -> wait_message().
2. In wait_message(), user_driver->pProcessEvents() gets called in the desktop window thread to
handle RRNotify events and calls xrandr14_device_change_handler() -> display_mode_changed(FALSE)
-> send_message(get_desktop_window(), WM_DISPLAYCHANGE, ...) -> desktop_window_proc() ->
send_message_timeout() -> send_client_message() -> process_message() -> broadcast_message() ->
send_message_timeout() -> send_client_message() -> process_message() -> send_inter_thread_message()
-> wait_message_reply() -> a server set_queue_mask() with skip_wait being 1 -> wake_mask and
changed_mask are set to 0.
3. In wait_message(), user_driver->pProcessEvents() returns FALSE from xrandr14_device_change_handler().
So wait_message() continues to call NtWaitForMultipleObjects().
4. Now NtWaitForMultipleObjects() hangs for INFINITE timeout because wake_mask and changed_mask
for the message queue are set to 0 so the thread is not woke up.
The hang is sensitive to message ordering and only happens in this specific case so it's hard to
reproduce with tests. I believe some of the past test timeouts on TestBots can be attributed to this
bug.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5890
> I don't want to be a blocker but to be honest I'm a bit annoyed with the idea of having to rewrite the patches I am trying to upstream with transform media types.
I'm going to delay making changes to wg_transform until you upstream your transform patches. I can concentrate on implementing the frontside first. So I'll simply remove patch 3,4,5 in this MR for now.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5879#note_73808
On Wed Jun 19 15:58:14 2024 +0000, Elizabeth Figura wrote:
> > Can we add an encoder element without changing all this code? It
> doesn't look like you need all the complicated converter sequence, maybe
> only a videoconvert (do you even need one?).
> Yeah, in general the idea that we'd want the same sequence for decoding
> and encoding is probably wrong. E.g. for decoding we may want
> deinterlace, but we certainly don't want that for encoding. It's
> probably better to handle them separately.
Yeah, we can make things easy for encoder for now, only creating encoder element.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5879#note_73807
LLVM 17 or 18 no longer allow non-private labels to appear between
.cfi_startproc/endproc when targeting Mach-O.
Similar fixes as in commit 295d521b11644fb76c36854336b13c2155bb7d79.
Since this is needed for 2 out of 4 architectures, would it be better to do it for all 4 and then modify the shared `__wine_syscall_dispatcher_return()` prototype?
--
v2: ntdll: Make __wine_syscall_dispatcher_return a separate function to fix Xcode 16 build errors.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5871
I have been instructed by CodeWeavers, on behalf of the CodeWeavers and Wine
leadership, to resign my position as winegstreamer maintainer.
This comes because I have, for technical reasons, rejected or requested changes
to several winegstreamer patches. While these technical objections have not been
responded to, it is believed, in this case, committing patches tested against a
wide range of games, and avoiding a difference against the Proton project,
outweighs all technical problems I may potentially find.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5886
Instead of accessing the surface with macdrv_get_surface_display_image.
--
v7: winemac: Remove unnecessary surface_clip_to_visible_rect.
winemac: Remove now unnecessary cocoa window surface pointer.
winemac: Push window surface image updates to the main thread.
winemac: Create window surface CGImageRef on surface flush.
winemac: Create a provider for the surface and a HBITMAP wrapping it.
winemac: Remove unused macdrv_get_surface_display_image copy_data parameter.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5798
Instead of accessing the surface with macdrv_get_surface_display_image.
--
v6: winemac: Clip the surface rectangles to the virtual screen rect.
winemac: Remove unnecessary surface_clip_to_visible_rect.
winemac: Remove now unnecessary cocoa window surface pointer.
winemac: Push window surface image updates to the main thread.
winemac: Create window surface CGImageRef on surface flush.
winemac: Create a provider for the surface and a HBITMAP wrapping it.
winemac: Remove unused macdrv_get_surface_display_image copy_data parameter.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5798
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56698
--
v9: quartz/tests: Test that avi_decompressor_source_qc_Notify does not deadlock if called from a foreign thread during IMemInput_Receive.
quartz: Allow concurrent calls to AVI decoder qc_Notify and Receive.
msvfw32/tests: Test that Cinepak rejects unsupported output types.
iccvid: Reject unsupported output types.
quartz/tests: Add Cinepak test to avi splitter.
winegstreamer: Make AVI splitter use end of previous frame if the current frame doesn't have a timestamp.
winegstreamer: Implement AM_MEDIA_TYPE to wg_format converter for Cinepak video.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5744
For all mach vm operations this removes the task suspend and resume, which are not needed.
This uses `mach_vm_read_overwrite` to read into a caller-specified buffer, saving the `mach_vm_deallocate` call (bringing all read operations down to 1 syscall from 4).
The only alignment restriction on `mach_vm_write` according to the original CMU documentation is that data is
> [pointer to page aligned in array of bytes] An array of data to be written.
(In practice it also works with arbitrary addresses on macOS, but it probably doesn't hurt to follow the original specifications here).
The only other reference that these read/writes should be page-aligned is from the GNU Hurd documentation
> The current implementation requires that address, data and data_count all be page-aligned. Otherwise, KERN_INVALID_ARGUMENT is returned.
which I assume was the reason why this was originally done (plus it sounds to me like they will fix that in the future and 4fe19777 already broke GNU Hurd support anyways, if that was supposed to be working).
Also this includes the missing mach part of 5b1f3b14, which was only applied to the ptrace backend, and together with the `write_process_memory` rework, this gets rid of all fixmes in mach.c
--
v6: server: Simplify mach write_process_memory.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4826
> Can we add an encoder element without changing all this code? It doesn't look like you need all the complicated converter sequence, maybe only a videoconvert (do you even need one?).
Yeah, in general the idea that we'd want the same sequence for decoding and encoding is probably wrong. E.g. for decoding we may want deinterlace, but we certainly don't want that for encoding. It's probably better to handle them separately.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5879#note_73748
On Tue Jun 18 21:28:01 2024 +0000, Jacek Caban wrote:
> Current func info is more than (id,iid) carrier, it would only make
> things more confusing to reuse it as an opaque with constrains like
> that. We could introduce a new struct, if needed.
Well yes but wouldn't it be an implementation detail on mshtml side?
By new struct do you mean one in `func_info_t` and then passing its
address out to jscript? (so a single pointer, rather than filling
(id,iid) on jscript side)
I'm asking because it's easier to just use a single pointer around in
jscript (and even check it for NULL if, for instance, it's not a
function but a custom prop).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5444#note_73737
For all mach vm operations this removes the task suspend and resume, which are not needed.
This uses `mach_vm_read_overwrite` to read into a caller-specified buffer, saving the `mach_vm_deallocate` call (bringing all read operations down to 1 syscall from 4).
The only alignment restriction on `mach_vm_write` according to the original CMU documentation is that data is
> [pointer to page aligned in array of bytes] An array of data to be written.
(In practice it also works with arbitrary addresses on macOS, but it probably doesn't hurt to follow the original specifications here).
The only other reference that these read/writes should be page-aligned is from the GNU Hurd documentation
> The current implementation requires that address, data and data_count all be page-aligned. Otherwise, KERN_INVALID_ARGUMENT is returned.
which I assume was the reason why this was originally done (plus it sounds to me like they will fix that in the future and 4fe19777 already broke GNU Hurd support anyways, if that was supposed to be working).
Also this includes the missing mach part of 5b1f3b14, which was only applied to the ptrace backend, and together with the `write_process_memory` rework, this gets rid of all fixmes in mach.c
--
v5: server: Simplify mach write_process_memory.
server: Use mach_vm_read_overwrite in get_selector_entry.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4826
Killsquad sends a MESessionClose at various times depending on user input. It always expects a MESessionClosed event and will wait indefinitely if not received. There are currently a number of scenarios where we don't report the MESessionClose event. This MR attempts to fix that.
--
v5: mf: Handle an error during Media Session Close.
mf: Handle MediaSession Close when state is SESSION_STATE_RESTARTING_SOURCES.
mf/tests: Add additional tests for MESessionClosed event.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5584
This is the current proton thread priority implementation by @rbernon rebased for upstream with a few `#ifdef`s added since AFAIK Linux is the only operating system where threads have a unique PID which can be used to set niceness on.
~~I also ran `./tools/make_requests` on https://gitlab.winehq.org/mzent/wine/-/commit/6705d3481be0409f7e971c1d2c7a3… as well and `autoconf` on https://gitlab.winehq.org/mzent/wine/-/commit/d7bafe40c411753662b2ad97148a6… (which does blow up the line count a bit).~~
A few tiny changes ~~(with the ready variable for example)~~ are in anticipation for Part 2, which also adds Mach thread priorities and recalculates thread priorities on process priority change.
Since this is a rather large MR, I hope the split here is appropriate ~~(with the second part being slightly smaller)~~, but I think logically it makes the most sense here.
--
v15: server: Check wineserver privileges on init with -20 niceness.
server: Use setpriority to update thread niceness when safe.
ntdll: Set RLIMIT_NICE to its hard limit.
server: Introduce new set_thread_priority helper.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4551
This MR extends the `wgl_pixel_format` struct with extra fields required to implement `wglGetPixelFormatAttribivARB` in opengl32.dll. I have added only fields that are relevant to the current needs of the drivers. The default implementation will be used automatically if the driver populates the extra fields, which this MR does for the winex11 driver.
The new winex11 implementation tries to remain faithful to the previous behavior in terms of error handling and fallbacks. To achieve this the `wgl_pixel_format` extra fields can be marked as invalid in order for the default implementation to return errors accordingly. Note, however, that error handling around `glXGetFBConfigAttrib` is not very consistent (e.g., the parts of `describe_pixel_format` dealing with PIXELFORMATDESCRIPTOR generally disregard errors).
The MR also adds a default implementation for `wglGetPixelFormatAttribfvARB` which piggy-backs on the integer variant of this function, and removes the need for the corresponding code in the drivers. Note that we could potentially remove this function completely from `struct opengl_funcs` (i.e., place it in `manual_win_functions` in `make_opengl`), but it seems the pattern is to maintain a complete list of extension functions (and wined3d also populates the field internally, although it doesn't seem to do anything with it).
Finally, the `winex11.drv/opengl.c` file contains a mix of coding styles. I chose to be consistent with the style of the closest context (e.g., the function) I was making changes/additions in.
--
v3: winex11: Use default wglGetPixelFormatAttribivARB implementation.
winex11: Pass wgl_pixel_format to describe_pixel_format.
winex11: Update describe_pixel_format coding style.
opengl32: Add default implementation for wglGetPixelFormatAttribfvARB.
opengl32: Add default implementation for wglGetPixelFormatAttribivARB.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5844
This is in preparation for the mach thread id rework, which requires 64 bit there (and incidentally also stops truncating the FreeBSD one).
There wasn't any direct usage of `__int64` in the sever protocol before, so I added a new typedef and a new `dump_int64()` function (not sure if needed per se though).
--
v7: ntdll: Remove unneeded FreeBSD codepath in get_unix_tid().
server, ntdll: Use 64 bit for unix thread id.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5047
The last commit fixes glitches in Horizon Zero Dawn with vsync on, for reasons stated in the comment there.
The wined3d implementation already blocks the client's call to `Present()` when `vkAcquireNextImageKHR()` blocks, so is roughly equivalent to this when frame latency and buffer count are equal. It has a frame latency implementation which unblocks after calling `vkQueuePresentKHR()`, rather than waiting for its execution to complete. I think the d3d12 implementation is supposed to do the latter, though using `KHR_present_wait` may be unnecessary overkill. Waiting on queue execution comes with a performance cost either way, so without a compelling reason for a strict implementation, something similar to wined3d makes sense.
Another potential issue is after the call to `ID3D12CommandQueue_Signal()` in `d3d12_swapchain_present()`, the client is free to enqueue more commands when `Present()` returns, so by the time the signal is executed and the swapchain worker blits the image and calls `vkQueuePresentKHR()`, these commands are not necessarily enqueued immediately after the `Signal()`. This may not always be harmless.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5830
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).
--
v4: kernelbase: Flush instruction cache in WriteProcessMemory.
kernelbase: Allow WriteProcessMemory to succeed on PAGE_EXECUTE and PAGE_EXECUTE_READ.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5222
For all mach vm operations this removes the task suspend and resume, which are not needed.
This uses `mach_vm_read_overwrite` to read into a caller-specified buffer, saving the `mach_vm_deallocate` call (bringing all read operations down to 1 syscall from 4).
The only alignment restriction on `mach_vm_write` according to the original CMU documentation is that data is
> [pointer to page aligned in array of bytes] An array of data to be written.
(In practice it also works with arbitrary addresses on macOS, but it probably doesn't hurt to follow the original specifications here).
The only other reference that these read/writes should be page-aligned is from the GNU Hurd documentation
> The current implementation requires that address, data and data_count all be page-aligned. Otherwise, KERN_INVALID_ARGUMENT is returned.
which I assume was the reason why this was originally done (plus it sounds to me like they will fix that in the future and 4fe19777 already broke GNU Hurd support anyways, if that was supposed to be working).
Also this includes the missing mach part of 5b1f3b14, which was only applied to the ptrace backend, and together with the `write_process_memory` rework, this gets rid of all fixmes in mach.c
--
v4: server: Simplify mach write_process_memory.
server: Use mach_vm_read_overwrite in get_selector_entry.
server: Use mach_vm_read_overwrite in read_process_memory.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4826
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56769
--
v4: quartz/tests: Test that avi_decompressor_source_qc_Notify does not deadlock if called from a foreign thread during IMemInput_Receive.
quartz: Allow concurrent calls to AVI decoder qc_Notify and Receive.
msvfw32/tests: Test that Cinepak rejects unsupported output types.
iccvid: Reject unsupported output types.
quartz/tests: Add Cinepak test to avi splitter.
winegstreamer: Make AVI splitter use end of previous frame if the current frame doesn't have a timestamp.
winegstreamer: Implement AM_MEDIA_TYPE to wg_format converter for Cinepak video.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5846
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56698
--
v8: quartz/tests: Test that avi_decompressor_source_qc_Notify does not deadlock if called from a foreign thread during IMemInput_Receive.
quartz: Allow concurrent calls to AVI decoder qc_Notify and Receive.
msvfw32/tests: Test that Cinepak rejects unsupported output types.
iccvid: Reject unsupported output types.
quartz/tests: Add Cinepak test to avi splitter.
winegstreamer: Make AVI splitter use end of previous frame if the current frame doesn't have a timestamp.
winegstreamer: Implement AM_MEDIA_TYPE to wg_format converter for Cinepak video.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5744
Rémi Bernon (@rbernon) commented about dlls/winegstreamer/wg_transform.c:
> - {
> - gst_caps_unref(parsed_caps);
> - parsed_caps = gst_caps_ref(src_caps);
> - }
> -
> - if (!(element = find_element(GST_ELEMENT_FACTORY_TYPE_DECODER, parsed_caps, sink_caps))
> - || !append_element(transform->container, element, &first, &last))
> - goto out;
> - break;
> -
> - case WG_MAJOR_TYPE_AUDIO:
> - case WG_MAJOR_TYPE_VIDEO:
> - break;
> - case WG_MAJOR_TYPE_UNKNOWN:
> - GST_FIXME("Format %u not implemented!", input_format.major_type);
> + if (!transform_create_transcoder(transform, src_caps, &input_format, &first, &last))
Can we add an encoder element without changing all this code? It doesn't look like you need all the complicated converter sequence, maybe only a videoconvert (do you even need one?).
I don't want to be a blocker but to be honest I'm a bit annoyed with the idea of having to rewrite the patches I am trying to upstream with transform media types.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5879#note_73696
LLVM 17 or 18 no longer allow non-private labels to appear between
.cfi_startproc/endproc when targeting Mach-O.
Similar fixes as in commit 295d521b11644fb76c36854336b13c2155bb7d79.
Since this is needed for 2 out of 4 architectures, would it be better to do it for all 4 and then modify the shared `__wine_syscall_dispatcher_return()` prototype?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5871
On Tue Jun 18 16:34:50 2024 +0000, Emil Velikov wrote:
> Does the wine (pre)loader unload things on `exit()` or perhaps the
> dependency on ntdll.so and(?) win32u.so, makes that impossible?
> Either way, as you said there are bigger concerns than this one dlhandle.
Well for instance the user driver is never unloaded, and it links and uses symbols from win32u directly, so neither of them will be unloaded.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5835#note_73682
Adds the registry key
HKEY_CURRENT_USER\\Software\\Wine\\Wayland Driver\\rawinput
witch allows mouse raw input. This makes it easier
to calculate the same sensitivity in different games,
use sensitivity calculators, and easily change values
when changing mouse DPI and do not depend on the compositor or OS.
For example, you want to set the sensitivity to half as much,
but sensitivity curves in libinput are more difficult
to calculate than mouse sensitivity in the games.
Implementation of ideas written in the comments: https://gitlab.winehq.org/wine/wine/-/merge_requests/4698
--
v4: winewayland.drv: Add mouse rawinput support
server: Add send_hardware_message flags for rawinput translation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5869
This MR extends the `wgl_pixel_format` struct with extra fields required to implement `wglGetPixelFormatAttribivARB` in opengl32.dll. I have added only fields that are relevant to the current needs of the drivers. The default implementation will be used automatically if the driver populates the extra fields, which this MR does for the winex11 driver.
The new winex11 implementation tries to remain faithful to the previous behavior in terms of error handling and fallbacks. To achieve this the `wgl_pixel_format` extra fields can be marked as invalid in order for the default implementation to return errors accordingly. Note, however, that error handling around `glXGetFBConfigAttrib` is not very consistent (e.g., the parts of `describe_pixel_format` dealing with PIXELFORMATDESCRIPTOR generally disregard errors).
The MR also adds a default implementation for `wglGetPixelFormatAttribfvARB` which piggy-backs on the integer variant of this function, and removes the need for the corresponding code in the drivers. Note that we could potentially remove this function completely from `struct opengl_funcs` (i.e., place it in `manual_win_functions` in `make_opengl`), but it seems the pattern is to maintain a complete list of extension functions (and wined3d also populates the field internally, although it doesn't seem to do anything with it).
Finally, the `winex11.drv/opengl.c` file contains a mix of coding styles. I chose to be consistent with the style of the closest context (e.g., the function) I was making changes/additions in.
--
v2: winex11: Use default wglGetPixelFormatAttribivARB implementation.
winex11: Pass wgl_pixel_format to describe_pixel_format.
winex11: Update describe_pixel_format coding style.
opengl32: Add default implementation for wglGetPixelFormatAttribfvARB.
opengl32: Add default implementation for wglGetPixelFormatAttribivARB.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5844
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.
--
v23: ntdll: Use PAGEMAP_SCAN to implement get_working_set_ex, if available.
kernel32: Add tests for large page mapping support.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
On Fri Jun 7 14:39:29 2024 +0000, Gabriel Ivăncescu wrote:
> I see, if you look at it that way it makes sense to use IID, yeah (I was
> thinking of the functions as complete separate entities rather than
> interface implementations).
> I still think it's slightly better to just pass/store func_info_t as a
> container though—it's not just the args but everywhere else we need to
> store it (like in ProxyFunction as I mentioned), now it's one less field
> to worry about. And besides, if we ever do need to change it at some
> point later, it will be much easier without affecting call sites.
Current func info is more than (id,iid) carrier, it would only make things more confusing to reuse it as an opaque with constrains like that. We could introduce a new struct, if needed.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5444#note_73651
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.
--
v22: ntdll: Use PAGEMAP_SCAN to implement get_working_set_ex, if available.
kernel32: Add tests for large page mapping support.
ntdll: Support creating and mapping files backed by large pages (SEC_LARGE_PAGES).
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
Since `EVENT_SYSTEM_MINIMIZESTART` and `EVENT_SYSTEM_MINIMIZEEND` are implemented now (thanks to Esme), this is implementing visibility change events using them. We have to keep track of the browsers to iterate all the documents from the hook.
Note that I tried to refcount the per-thread hook and add it only when necessary (on a visiblity change listener), since it can slow down the entire prefix.
--
v3: mshtml: Implement visibilitychange event.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5861
Since `EVENT_SYSTEM_MINIMIZESTART` and `EVENT_SYSTEM_MINIMIZEEND` are implemented now (thanks to Esme), this is implementing visibility change events using them. We have to keep track of the browsers to iterate all the documents from the hook.
Note that I tried to refcount the per-thread hook and add it only when necessary (on a visiblity change listener), since it can slow down the entire prefix.
--
v2: mshtml: Implement visibilitychange event.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5861
First part of Proton shared memory series. The full branch can be seen at https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories.
--
v42: 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 the desktop shared object in NtUserSetThreadDesktop.
server: Return the desktop object locator in (get|set)_thread_desktop.
server: Allocate shared session object for desktops.
include: Add ReadNoFence64 inline helpers.
server: Create a global session shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3103
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.
--
v21: ntdll: Use PAGEMAP_SCAN to implement get_working_set_ex, if available.
kernel32: Add tests for large page mapping support.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
Adds the registry key
HKEY_CURRENT_USER\\Software\\Wine\\Wayland Driver\\rawinput
witch allows mouse raw input. This makes it easier
to calculate the same sensitivity in different games,
use sensitivity calculators, and easily change values
when changing mouse DPI and do not depend on the compositor or OS.
For example, you want to set the sensitivity to half as much,
but sensitivity curves in libinput are more difficult
to calculate than mouse sensitivity in the games.
Implementation of ideas written in the comments: https://gitlab.winehq.org/wine/wine/-/merge_requests/4698
--
v3: winewayland.drv: Add mouse rawinput support
server: Add send_hardware_message flags for rawinput translation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5869
Adds the registry key
HKEY_CURRENT_USER\\Software\\Wine\\Wayland Driver\\rawinput
witch allows mouse raw input. This makes it easier
to calculate the same sensitivity in different games,
use sensitivity calculators, and easily change values
when changing mouse DPI and do not depend on the compositor or OS.
For example, you want to set the sensitivity to half as much,
but sensitivity curves in libinput are more difficult
to calculate than mouse sensitivity in the games.
Implementation of ideas written in the comments: https://gitlab.winehq.org/wine/wine/-/merge_requests/4698
--
v2: winewayland.drv: Add mouse rawinput support
https://gitlab.winehq.org/wine/wine/-/merge_requests/5869
Adds the registry key
HKEY_CURRENT_USER\\Software\\Wine\\Wayland Driver\\rawinput
witch allows mouse raw input. This makes it easier
to calculate the same sensitivity in different games,
use sensitivity calculators, and easily change values
when changing mouse DPI and do not depend on the compositor or OS.
For example, you want to set the sensitivity to half as much,
but sensitivity curves in libinput are more difficult
to calculate than mouse sensitivity in the games.
Implementation of ideas written in the comments: https://gitlab.winehq.org/wine/wine/-/merge_requests/4698
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5869
Adds the registry key
`HKEY_CURRENT_USER\\Software\\Wine\\Wayland Driver\\unaccelerated_pointer`
witch allows raw input. This makes it easier
to calculate the same sensitivity in different games,
use sensitivity calculators, and easily change values
when changing DPI and do not depend on the compositor or OS.
For example, you want to set the sensitivity to half as much,
and sensitivity curves in libinput are more difficult
to calculate than in the games themselves.
Based on Proton and Wine-Staging patches by @rbernon.
--
v9: winewayland.drv: Add unaccelerated pointer support
server: Add send_hardware_message flags for rawinput translation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4698
This is the first step in moving the various D3DXCreateTextureFromFileInMemory functions over to using shared code.
--
v5: d3dx9: Add support for specifying which mip level to get pixel data from to d3dx_image_get_pixels().
d3dx9: Cleanup texture value argument handling in D3DXCreateTextureFromFileInMemoryEx().
d3dx9: Add support for specifying a starting mip level when initializing a d3dx_image structure.
d3dx9: Use struct volume inside of struct d3dx_image for storing dimensions.
d3dx9: Use d3dx_image structure inside of D3DXCreateTextureFromFileInMemoryEx().
d3dx9: Refactor texture creation and cleanup in D3DXCreateTextureFromFileInMemoryEx().
https://gitlab.winehq.org/wine/wine/-/merge_requests/5801
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.
--
v18: ntdll: Use PAGEMAP_SCAN to implement get_working_set_ex, if available.
ntdll: Support mapping pages for views created with SEC_LARGE_PAGES.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
This is the part VI of the cmd engine rewrite.
It starts splitting FOR loop parsing from its execution.
This is done for numbers (/L) and filesets (/F) FOR loops.
It also extends support for delay expansion of various parts of these loops.
Next MR will tackle the tree oriented FOR loop handling.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5868
The Jet4 driver doesn't handle the DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO
property which is passed in SetProperties. On return that property is marked
as DBPROPSTATUS_NOTSUPPORTED and returns DB_S_ERRORSOCCURRED.
In this case, we dont care that isn't not supported and should allow
the DataSource to succeed.
--
v2: oledb32: When creating a Data Source, handle non fatal errors.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5864
The two tests sometimes fail on macOS and produce >8MB test reports, which fail to upload to the test results page.
--
v2: dwrite/tests: Ignore macOS specific "flip" sbix format.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5866
The Jet4 driver doesn't handle the DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO
property which is passed in SetProperties. On return that property is marked
as DBPROPSTATUS_NOTSUPPORTED and returns DB_S_ERRORSOCCURRED.
In this case, we dont care that isn't not supported and should allow
the DataSource to succeed.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5864