On Wed Jun 26 07:26:50 2024 +0000, Zhiyi Zhang wrote:
> This looks correct at first glance. Do you have an application affected
> by this? It seems to me changing this only reduces some time and -1 will
> be returned if it's the last item.
Yes, I have. It fails on asserting return value of sending LVM_GETNEXTITEM message. I agree about aftereffect of this fix. Anyway, for me it doesn't make sense to handle ahead of time incorrect item (== infoPtr->nItemCount).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5909#note_74482
Previously it was assumed that synchronous I/O fills the 64-bit IOSB, and
asynchronous I/O fills the 32-bit IOSB.
As the ntdll:wow64 tests show, this is incorrect. I/O on an overlapped handle,
whether it is synchronous or not, fills the 32-bit IOSB, and I/O on a
non-overlapped handle always fills the 64-bit IOSB.
The first half is important, since completion can be signaled before we even
return from the initial I/O call [NtReadFile() etc.] Filling the IOSB after
signaling completion is the cause of bug 56389. This patch series fixes that.
The second discrepancy does not cause any bugs, as far as I can see, and is
a bit harder to fix anyway. It is therefore not addressed by this patch series.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56389
--
v2: ntdll: Always fill the 32-bit iosb for overlapped handles, for regular read/write.
ntdll: Always fill the 32-bit iosb for overlapped handles, in set_async_direct_result().
ntdll: Always fill the 32-bit iosb for overlapped handles, in file_complete_async().
https://gitlab.winehq.org/wine/wine/-/merge_requests/5926
--
v4: mmdevapi/tests: Add test for capturing render loopback.
winepulse.drv: Implement pulse_get_loopback_capture_device().
winepulse.drv: Factor out wait_pa_operation_complete().
mmdevapi: Stub AUDCLNT_STREAMFLAGS_LOOPBACK support.
mmdevapi: Adjust timing after main loop start in client_Initialize().
https://gitlab.winehq.org/wine/wine/-/merge_requests/5870
Previously it was assumed that synchronous I/O fills the 64-bit IOSB, and
asynchronous I/O fills the 32-bit IOSB.
As the ntdll:wow64 tests show, this is incorrect. I/O on an overlapped handle,
whether it is synchronous or not, fills the 32-bit IOSB, and I/O on a
non-overlapped handle always fills the 64-bit IOSB.
The first half is important, since completion can be signaled before we even
return from the initial I/O call [NtReadFile() etc.] Filling the IOSB after
signaling completion is the cause of bug 56389. This patch series fixes that.
The second discrepancy does not cause any bugs, as far as I can see, and is
a bit harder to fix anyway. It is therefore not addressed by this patch series.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56389
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5926
This is part X of cmd engine rewrite.
This serie:
- tackles some other variable expansion issues,
- attaches redirections to CMD_NODE (where it belongs)
(eg. "> foo (IF 1==1 echo a)" is a valid command),
- preparing for next serie.
Next serie will activate he updated lexer and parser.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5932
IIUC atexit isn't exported by ucrtbase, but still exists (maybe as a builtin) and is resolved to a module-local symbol which can be used to register functions executed on module process detach. It is called implicitly by C++ compilers to register static destructors.
--
v3: include: Define __cpuid(ex) as intrinsics when _MSC_VER is defined.
include: Don't import atexit when building with ucrtbase.
include: Guard rpcndr.h DECLSPEC_UUID definition.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5915
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.
--
v2: winegstreamer: Set MAX_THREADS to 4 for i386.
winegstreamer: Use thread_count to determine 'max-threads' value.
winegstreamer: Provide thread_count to init_gstreamer.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5923
Zhiyi Zhang (@zhiyi) commented about dlls/comctl32/listview.c:
> {
> if ((infoPtr->uView == LV_VIEW_LIST) || (infoPtr->uView == LV_VIEW_DETAILS))
> {
> - while (nItem < infoPtr->nItemCount)
> + while (nItem < infoPtr->nItemCount - 1)
This looks correct at first glance. Do you have an application affected by this? It seems to me changing this only reduces some time and -1 will be returned if it's the last item.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5909#note_74440
On Wed Jun 26 07:15:20 2024 +0000, Ilia Docin wrote:
> To reproduce it, I moved gripper left and right to hide some buttons,
> then brought it back. On the first image chevron didn't disappear as
> expected. On the second one chevron went away as I applied fix.
Do you have a link to the software you used to demonstrate?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5706#note_74439
Zhiyi Zhang (@zhiyi) commented about dlls/comctl32/rebar.c:
> lpBand->rcChild.top, lpBand->rcChild.right + CHEVRON_WIDTH,
Please also change the commit message title to "comctl32/rebar: Hide chevron if rebar's band is resized back to full size with gripper.". Note the dot at the end of the title.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5706#note_74438
Mostly race condition fixes.
"winegstreamer: Do waits for samples on stream-specific work queues." works around a Gstreamer bug that I'll try to write a minimal reproducer for and submit to their bug tracker. For now, doing sample waits actually concurrently works around the problem.
"winegstreamer: Fixate caps in autoplug_continue_cb." so far I've only seen relevant when the source is a uridecodebin (in Proton), but I though it couldn't hurt to upstream it too.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5917
This commit replaces the SampleGrabberSink with a dedicated Video Sink,
referred to as the Simple Video Renderer (SVR).
This brings it more inline with Windows and provides the benefit of
having direct access to the IMFSample, removing the need to copy the
sample data.
--
v2: mfmediaengine: Implement SVR.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5924
If the script cache was already freed before ScriptTextOut() runs and
hence the sfnt member is not available, use the definition from
init_script_cache() to conditionally apply the ETO_GLYPH_INDEX flag.
--
v3: gdi32/uniscribe: Ensure the cache is initialised.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5893
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.
--
v28: 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 pages (SEC_LARGE_PAGES, MEM_LARGE_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.
--
v27: 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 pages (SEC_LARGE_PAGES, MEM_LARGE_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
IIUC atexit isn't exported by ucrtbase, but still exists (maybe as a builtin) and is resolved to a module-local symbol which can be used to register functions executed on module process detach. It is called implicitly by C++ compilers to register static destructors.
--
v2: include: Define __cpuid(ex) as intrinsics when _MSC_VER is defined.
include: Don't import atexit when building with ucrtbase.
include: Guard rpcndr.h DECLSPEC_UUID definition.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5915
--
v3: server: Remove now unnecessary active_hooks from replies.
win32u: Remove now unnecessary thread info active_hooks cache.
win32u: Read the active hooks count from the shared memory.
server: Update the active hooks bitmaps when hooks are added / removed.
server: Move hooks struct initialization within add_hook.
server: Keep a reference on the desktop the hook are registered for.
server: Create a thread message queue shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5912
--
v2: server: Remove now unnecessary active_hooks from replies.
win32u: Remove now unnecessary thread info active_hooks cache.
win32u: Read the active hooks count from the shared memory.
server: Update the active hooks bitmaps when hooks are added / removed.
server: Move hooks struct initialization within add_hook.
server: Keep a reference on the desktop the hook are registered for.
win32u: Use the shared memory to get the thread message queue handle.
server: Move thread thread message queue handle to the shared memory.
server: Create a thread message queue shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5912
Stub Implementations of UIViewSettings and InputPaneStatics. This will reduce the FIXME clutter of missing UIViewSettings class implementation in .NET applications esp: Paint .Net
--
v4: windows.ui: Add stub IInputPaneStatics implementation.
windows.ui: Add stubs for UIViewSettings class.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5314
This is a series of commits tackling dead key state handling and scan code to vkey mapping improvements (especially for French and German keyboards).
* https://gitlab.winehq.org/mzent/wine/-/commit/6c5c90b746cc341049eec216e3bb9…: Simplifies the logic a bit there and also correctly null-terminates dead keys in ToUnicodeEx
* https://gitlab.winehq.org/mzent/wine/-/commit/a05e2fc5068a22cae94bc800b4972…: Windows does not do it and some applications misbehave with this, fully fixed later in https://gitlab.winehq.org/mzent/wine/-/commit/7cf1f6a00f17b0626126448f77a1c…
* https://gitlab.winehq.org/mzent/wine/-/commit/4bd96932139a22f2c3b1311e44c43…: MSDN states single keys are always uppercased there.
* https://gitlab.winehq.org/mzent/wine/-/commit/bac8e97d7e6a7494672d76f5fc586…: There is a bug in `CFStringCompare` with the flags used there currently, resulting in the comparison of the identical buffers "ß" and "ß" to be false. In any case `UCCompareText` behaves correctly and is much faster there.
* https://gitlab.winehq.org/mzent/wine/-/commit/bac5f485a09fbddd39efb8f2c0d87…: I think this was an accidental mistake there, going through all modifiers first per symbol almost always results in the wrong match being made. The logic is adjusted there now to be similar to the other iterations involving `char_matches_string`.
* https://gitlab.winehq.org/mzent/wine/-/commit/ffde55df4ae3f6d53198839c58356…https://gitlab.winehq.org/mzent/wine/-/commit/a453d0d4c89c59c3e1ba6c24d2d0f…: Adds additional symbol vkey mappings (now completely maps a German Macintosh and PC keyboard correctly). There are still some minor defects with the French layout (around the ú region), however changing the symbol mapping there will cause issues with other layouts I think, since the wrong match happens very early there in the priority in these cases. With this change at least the number row is now behaving correctly. Additionally the French Macintosh keyboard layout is further complicated by the "=" key being next to right shift, which is in conflict with pretty much any other keyboard layout. To fix this properly would require a partial rewrite of the heuristic being used or a new approach, but most likely more of a long term project.
* https://gitlab.winehq.org/mzent/wine/-/commit/7cf1f6a00f17b0626126448f77a1c…: Gives dead keys friendly names in `GetKeyNameFriendlyText`, just like Windows does. I tried to be as exhaustive as possible, but if there are any missing the mapping can be easily extended.
All in all the incorrect scan code to vkey mapping is usually not that tragic, since an application would need to be aware of the layout and have its own mapping of scan codes of each (FFXIV does this though). The French layout corrections are now "good enough" to behave correctly for all the hotbar slots being assigned there with these changes now though.
--
v7: winemac.drv: Give dead keys a friendly name in GetKeyNameText.
winemac.drv: Add additional German symbol vkeys.
winemac.drv: Resolve symbol vkeys first without modifiers.
winemac.drv: Use UCCompareText in char_matches_string.
winemac.drv: Uppercase single keys in GetKeyNameText.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5319
This is a series of commits tackling dead key state handling and scan code to vkey mapping improvements (especially for French and German keyboards).
* https://gitlab.winehq.org/mzent/wine/-/commit/6c5c90b746cc341049eec216e3bb9…: Simplifies the logic a bit there and also correctly null-terminates dead keys in ToUnicodeEx
* https://gitlab.winehq.org/mzent/wine/-/commit/a05e2fc5068a22cae94bc800b4972…: Windows does not do it and some applications misbehave with this, fully fixed later in https://gitlab.winehq.org/mzent/wine/-/commit/7cf1f6a00f17b0626126448f77a1c…
* https://gitlab.winehq.org/mzent/wine/-/commit/4bd96932139a22f2c3b1311e44c43…: MSDN states single keys are always uppercased there.
* https://gitlab.winehq.org/mzent/wine/-/commit/bac8e97d7e6a7494672d76f5fc586…: There is a bug in `CFStringCompare` with the flags used there currently, resulting in the comparison of the identical buffers "ß" and "ß" to be false. In any case `UCCompareText` behaves correctly and is much faster there.
* https://gitlab.winehq.org/mzent/wine/-/commit/bac5f485a09fbddd39efb8f2c0d87…: I think this was an accidental mistake there, going through all modifiers first per symbol almost always results in the wrong match being made. The logic is adjusted there now to be similar to the other iterations involving `char_matches_string`.
* https://gitlab.winehq.org/mzent/wine/-/commit/ffde55df4ae3f6d53198839c58356…https://gitlab.winehq.org/mzent/wine/-/commit/a453d0d4c89c59c3e1ba6c24d2d0f…: Adds additional symbol vkey mappings (now completely maps a German Macintosh and PC keyboard correctly). There are still some minor defects with the French layout (around the ú region), however changing the symbol mapping there will cause issues with other layouts I think, since the wrong match happens very early there in the priority in these cases. With this change at least the number row is now behaving correctly. Additionally the French Macintosh keyboard layout is further complicated by the "=" key being next to right shift, which is in conflict with pretty much any other keyboard layout. To fix this properly would require a partial rewrite of the heuristic being used or a new approach, but most likely more of a long term project.
* https://gitlab.winehq.org/mzent/wine/-/commit/7cf1f6a00f17b0626126448f77a1c…: Gives dead keys friendly names in `GetKeyNameFriendlyText`, just like Windows does. I tried to be as exhaustive as possible, but if there are any missing the mapping can be easily extended.
All in all the incorrect scan code to vkey mapping is usually not that tragic, since an application would need to be aware of the layout and have its own mapping of scan codes of each (FFXIV does this though). The French layout corrections are now "good enough" to behave correctly for all the hotbar slots being assigned there with these changes now though.
--
v6: winemac.drv: Give dead keys a friendly name in GetKeyNameText.
winemac.drv: Add additional German symbol vkeys.
winemac.drv: Resolve symbol vkeys first without modifiers.
winemac.drv: Use UCCompareText in char_matches_string.
winemac.drv: Uppercase single keys in GetKeyNameText.
winemac.drv: Do not append " dead" to dead keycodes in GetKeyNameText.
winemac.drv: Handle length of dead keycodes in ToUnicodeEx correctly.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5319
--
v2: widl: Respect u and l modifiers in expressions.
widl: Use struct integer for the aNUM and aHEXNUM tokens.
widl: Store the hexadecimal flag inside of the expr_t union.
widl: Do not allow "lu" as an integer suffix.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5906
--
v3: mmdevapi/tests: Add test for capturing render loopback.
winepulse.drv: Implement pulse_get_loopback_capture_device().
winepulse.drv: Factor out wait_pa_operation_complete().
mmdevapi: Stub AUDCLNT_STREAMFLAGS_LOOPBACK support.
mmdevapi: Adjust timing after main loop start in client_Initialize().
mmdevapi: Store device_name as a pointer in struct audio_client.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5870
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.
--
v25: 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 pages (SEC_LARGE_PAGES, MEM_LARGE_PAGES).
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
If the script cache was already freed before ScriptTextOut() runs and
hence the sfnt member is not available, use the definition from
init_script_cache() to conditionally apply the ETO_GLYPH_INDEX flag.
--
v2: uniscribe: Update ETO_GLYPH_INDEX flag even if script cache is freed.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5893
Instead of accessing the surface with macdrv_get_surface_display_image.
--
v9: 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.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5798
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.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5923
This commit replaces the SampleGrabberSink with a dedicated Video Sink,
referred to as the Simple Video Renderer (SVR).
This brings it more inline with Windows and provides the benefit of
having direct access to the IMFSample, removing the need to copy the
sample data.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5924
The `viewWillDraw` warning was introduced recently in ceefcca7ad4cf8dee0dd1344b22b90d6e2344973 ("Update OpenGL context immediately after the window content view is visible.").
For the other one, `CGWindowListCreateImageFromArray()` is insane and takes a CFArray of window numbers (`CGWindowID`/32-bit signed integers) expanded to pointer size (*not* boxed in CFNumber). At some point clang started warning about this:
```
../dlls/winemac.drv/cocoa_window.m:2344:32: warning: cast to 'const void *' from smaller integer type 'CGWindowID' (aka 'unsigned int') [-Wint-to-void-pointer-cast]
2344 | const void* windowID = (const void*)(CGWindowID)window.windowNumber;
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5922
Mostly race condition fixes.
"winegstreamer: Do waits for samples on stream-specific work queues." works around a Gstreamer bug that I'll try to write a minimal reproducer for and submit to their bug tracker. For now, doing sample waits actually concurrently works around the problem.
"winegstreamer: Fixate caps in autoplug_continue_cb." so far I've only seen relevant when the source is a uridecodebin (in Proton), but I though it couldn't hurt to upstream it too.
--
v2: winegstreamer: Handle Gstreamer pipeline flushes gracefully in the media source.
winegstreamer: Ignore an assert in wg_parser.
winegstreamer: Don't only accept segment events when streams are enabled.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5917
--
v2: ntdll: Buffer pagemap reads in fill_working_set_info().
ntdll: Fill range of output in fill_working_set_info().
ntdll: Limit vprot scan range to the needed interval in get_working_set_ex().
ntdll: Iterate views instead of requested addresses in get_working_set_ex().
https://gitlab.winehq.org/wine/wine/-/merge_requests/5907
With [`VK_EXT_device_address_binding_report`](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_device_address_binding_report.html) we can get [debug_util](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/ht… callbacks used to track memory bindings. Since it's the host's implementation that starts the callback we have to be sure that we have a way of converting it to the client side's variant before it's added to the handle map - i.e. we don't know the host handle at that time yet.
This is [used by vkd3d-proton](https://github.com/HansKristian-Work/vkd3d-proton/pull/1962). Requires Mesa with https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28649.
before (note the missing BIND for VkDevice which actually means `VkDeviceMemory`):
```
vkd3d-proton % VKD3D_TEST_FILTER=create_placed_resource_size VKD3D_CONFIG=fault VKD3D_DEBUG=trace ~/src/wine/build/wine ./tests/d3d12.exe 2>&1 | grep vkd3d_address_binding_callback
trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkImage || VA ffff800100200000 || size 000000000019a000.
trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkImage || VA ffff800100200000 || size 000000000019a000.
trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkDevice || VA ffff800100200000 || size 0000000001000000.
232285.553:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
232285.553:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
232285.553:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkDevice || VA ffff800100200000 || size 0000000001000000.
```
after:
```
% VKD3D_TEST_FILTER=create_placed_resource_size VKD3D_CONFIG=fault VKD3D_DEBUG=trace ~/src/wine/build/wine ./tests/d3d12.exe 2>&1 | grep vkd3d_address_binding_callback
232338.036:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkDevice || VA ffff800100200000 || size 0000000001000000.
232338.036:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkImage || VA ffff800100200000 || size 000000000019a000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkImage || VA ffff800100200000 || size 000000000019a000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkDevice || VA ffff800100200000 || size 0000000001000000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkDevice || VA ffff800100200000 || size 0000000001000000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkDevice || VA ffff800100200000 || size 0000000001000000.
```
[The spec guarantees](https://registry.khronos.org/vulkan/specs/1.3-extensions/html/v… the following:
> An application can receive multiple callbacks if multiple VkDebugUtilsMessengerEXT objects are created. A callback will always be executed in the same thread as the originating Vulkan call.
As of TLS I went with a suggestion from IRC:
```
<ivyl_> There's an issue with how we handle callbacks related to VK_EXT_debug_utils and VK_EXT_debug_report. In wine_vkAllocateMemory() we call device->funcs.p_vkAllocateMemory() which may execute callback.
<ivyl_> At this point we still don't have handle mapping added because we don't know what host_memory handle will be.
<ivyl_> AFAIU there's a spec guarantee that callback will be executed in the same thread as the call causing it, so I was thinking about maybe keeping `memory` in a tls (if enable_wrapper_list) and using that?
<ivyl_> but that's I don't see any precedent of using thread local storage on the unix side
<ivyl_> tls value would be short-lived in such case - only for the duration of the call to `device->funcs.p_vkAllocateMemory()`
<jacekc_> we usually use teb on unix side, see ntuser_thread_info
```
--
v4: winevulkan: Make device memory wrapper available in callbacks.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5658
IIUC atexit isn't exported by ucrtbase, but still exists (maybe as a builtin) and is resolved to a module-local symbol which can be used to register functions executed on module process detach. It is called implicitly by C++ compilers to register static destructors.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5915
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
--
v5: 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 is part IX of cmd.exe' parse engine rewrite.
It does some code cleanup and factorization for reading next line of input.
It tidies up parse time variable expansion and
starts beefing up the new parser.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5913
Additional tests reveal that RTL_QUERY_REGISTRY_DIRECT does work with
non-string default values, it just requires a pointer to the value and
it doesn't infer the size automatically. That means that the same code
can be used to handle both default and non-default values.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5911
Additional tests reveal that RTL_QUERY_REGISTRY_DIRECT does work with
non-string default values, it just requires a pointer to the value and
it doesn't infer the size automatically. That means that the same code
can be used to handle both default and non-default values.
--
v2: ntdll: Don't special-case default values in RtlQueryRegistryValues.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5911