Repository navigation
Conversation
Same as pr/shell32-folder-path-cache (on since text13). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Shitiz Garg <mail@shitiz.me>
…itor size Path of Exile 2's borderless fullscreen creates a framed (WS_OVERLAPPEDWINDOW) window of its saved size plus the frame, then removes the frame with SWP_NOSIZE. The frameless window is all client, the game saves that client size, and the next launch adds the frame again: 1440x900 grew by 8x34 a launch to 1504x1156 on a 1440x900 desktop, which Madeira then showed shrunk with black bars. On Windows the framed window never gets past the monitor-sized maximum track size, so the size never creeps. With MADEIRA_SNAP_BORDERLESS=1, when a top-level window loses WS_CAPTION and WS_THICKFRAME while at least as large as the primary monitor in both dimensions (and not exactly its size), it is moved and sized to the monitor. Child windows, windows that keep a frame and smaller windows are untouched. Off by default. Tested on an iPhone: the window stayed at desktop size across launches and the bars were gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Shitiz Garg <mail@shitiz.me>
Games release SRW locks and signal condition variables far more often than anything waits on them. Path of Exile 2 makes about a million RtlWakeAddressAll/Single calls a second against a few thousand waits, and every wake took its futex bucket's spinlock, a cache line bounced between all the game's threads for nothing. Each bucket now counts its queued waiters in the 4 bytes of padding after the lock, so struct futex_queue stays 24 bytes and keeps matching the unix side's shared table (struct ios_shared_futex_queue). A waiter increments the count under the lock before it compares the value, and decrements it when it leaves the queue (timeout, mismatch or wake). A waker stores, issues a full barrier and reads the count: zero means no waiter can have passed its compare, so it returns without the lock. Otherwise it takes the locked path as before. The unix side's ios_shared_futex_wake only alerts threads and never removes entries, so it needs no change; every PE ntdll build that queues on the shared table must carry this change (they are all built from this tree). Tested on an iPhone in every session since 4 Nov 2026 (Path of Exile 2, Steam): no hangs seen. The same waiter-count protocol, used by an x64 wake fast path we keep out of tree, passed a multi-threaded lost-wake stress test on the host (and failed it with the barrier removed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Shitiz Garg <mail@shitiz.me>
D3D12 games ship Microsoft's x64 dxcompiler.dll next to their exe and compile shaders with it at run time, emulated. Path of Exile 2's compile threads then made 0.5-1.2M combase crossings a second. Madeira's iOS loader never replaces an app-folder image with a builtin, so WINEDLLOVERRIDES cannot swap it. With MADEIRA_DXC_NATIVE=1, a load of dxcompiler.dll by name or by full path searches system32 only, where the bundle's ARM64EC build of the same DXC release is linked (build/dxc-arm64ec in Madeira), like the existing madeira_force_builtin_dll names. Without the variable nothing changes. Needs the Madeira change that builds and bundles the ARM64EC dxcompiler.dll. Tested on an iPhone: the [dxc-native] line appears, the loaded image is the ARM64EC build, and the game's own dxcompiler.dll and dxil.dll are no longer loaded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Shitiz Garg <mail@shitiz.me>
With MADEIRA_XESS_METALFX=1, libxess.dll resolves to Madeira's builtin in system32 (from the bundle's arm64ec-windows), which answers XeSS with MetalFX temporal upscaling, instead of the game's own Intel DLL. The iOS loader never replaces an image from the application folder with a builtin, so WINEDLLOVERRIDES cannot do it: Path of Exile 2 loaded its 74 MB x64 libxess with libxess=b, and with libxess= too. Path of Exile 2 loads it by full path, so a full path to libxess.dll is matched by its base name. Unset, nothing changes. Madeira's side is its xess-metalfx commit. Signed-off-by: Shitiz Garg <mail@shitiz.me> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
codex/wine-runtime-consolidation(1918b11) ←Dragooon:duo-all(5 commits, 8a404df; 4 files changed, 191 insertions, 1 deletion)codex/dxmt-upstream-build-portpins. Onmadeira-lgplthis PR would repeat those two and conflict with the atomic yield-option change.Impact
No run compared this branch with an unmodified wine at matched content, so this PR claims no overall figure. Measured on an iPhone with Path of Exile 2, per change:
MADEIRA_DXC_NATIVE=1the game's x64 dxcompiler.dll and dxil.dll are no longer loaded, and the 0.5-1.2M combase crossings a second from its compile threads are gone.Commits
aa3311c94e6shell32: cache the base path of shell folders per (folder, flags). SHGetFolderPathAndSubDirW keeps the expanded base path per (CSIDL, type) for the calling user. The subpath, existence check and CSIDL_FLAG_CREATE still run every call. The cache clears when shell32 writes a folder location. A program that edits the Shell Folders keys directly mid-session would see the old path until then.3b0f9272853win32u: opt-in snap of a top-level window that drops its frame at monitor size. When a top-level window loses WS_CAPTION and WS_THICKFRAME while at least monitor-sized (and not exactly that size), it is moved and sized to the monitor.MADEIRA_SNAP_BORDERLESS=1turns it on.33433b51fd5ntdll: RtlWakeAddress* skip the bucket spinlock when nobody waits in it. A waiter count in the bucket's padding; struct futex_queue stays 24 bytes and matches the unix side's shared table.078c295114cntdll: MADEIRA_DXC_NATIVE=1 loads dxcompiler.dll from system32.8a404df8193ntdll: MADEIRA_XESS_METALFX=1 loads libxess.dll from system32. The iOS loader never replaces an image from the application folder with a builtin, so WINEDLLOVERRIDES cannot do it; a full path to libxess.dll is matched by its base name.Defaults
Left out
[reg-poll]/[wait-note]probes and an ntdll wake census: investigation logging.ios_x64_fastblock at PEB->SparePointers[1] and decoding of patched export thunks). The stub patcher itself is not going upstream.Other branches
codex/wine-11.20-mobileconflicts with the futex fast path (dlls/ntdll/sync.c) and the borderless snap (dlls/win32u/window.c). Both need porting when that rebase lands.Testing
🤖 Generated with Claude Code