From the review of #2752:
- the saved frame and place are kept per window (and forgotten at WM_NCDESTROY), so a second window no longer
overwrites the first one's;
- a child window is left as it was: no borderless, and Alt+Enter goes on to it;
- the repeats of a held Alt+Enter no longer reach the title's procedure.
Three tests for those cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Publish placed shapes and reusable view entries in a lock-free paged atomic
store (`PUBLISHED`) so `view_at` and `table_r9g9b9e5_views` answer without
taking `VIEWS.read()` (skipping the table scan entirely until a placed
`R9G9B9E5` shader view is registered).
Track `Hosted::made_base` atomically alongside a shared `RwLock<Option<Made>>`
and add a per-thread 2-way `PLACED_NEAR` table in `texture_at` so `want_level`,
`host_waits`, absent `hosted` checks, and repeated placed-texture lookups
avoid exclusive mutex and shard RwLock traffic across `leonida-list-*` threads
while keeping `let_go_idle` eviction and `make_waiting` wakeups intact.
Controlled by `LEONIDA_LIST_LOCK_FAST` (on by default; `=0` restores the
locked paths).
Refs #2707
AI-assisted: yes
Alt+Enter went to DXGI's own exclusive fullscreen, for which nothing here makes the buffers
again: the picture froze and the screen stayed black. The presenter now turns DXGI's Alt+Enter
off (MakeWindowAssociation with DXGI_MWA_NO_ALT_ENTER, on the swap chain's own factory), and
the title window's procedure in lifecycle.rs handles the key itself:
- Alt+Enter takes the title's window without its frame over the whole of its monitor, and the
next one gives back its frame and its place. A held key's repeats do nothing, and the
character it makes (a beep) does not reach the title.
- Going back gives back only the frame and edge styles, so a window made borderless before it
was first shown stays shown.
- LEONIDA_FULLSCREEN=1 (the launchers' -Fullscreen, or FULLSCREEN (NO BORDER) in the F1 menu)
makes the window borderless from the start.
The swap chain is not made again: its picture is scaled to the window as before
(LEONIDA_PRESENT_SCALE). Two tests send the keys to a window of their own.
The idea is VIctory's (trustno1-coder/VIctory-NVIDIA has a borderless fullscreen); the code is
written for leonida-hle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main moved the frame meter's five-second lines into a function of their
own that may run on another thread: the frame times are logged where the
meter decides a five-second line is due, on the presenting thread, as
before. The nearest-rank test's comment said 0.95 * 100 is not 95.0 in
f64; it is: ranks are whole numbers so that no float can move one, and
the case pins the rounding direction (review).
Diagnostics builds: when LEONIDA_AB names LEONIDA_FG_TURNS, generation is off in the phases the switch is off,
as the F1 menu turns it off (its resources kept), so one run measures both sides in the same views.
AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64): builds with and without diagnostics.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A recorded tour scanned with motion taken into account has no one-frame flash in its rendered frames (only the
title's fade of the player as the camera swings into him). Through a tour the RTX 4060 Ti holds 2,715-2,730 MHz,
its memory at its most, 101 W of 165 W, the memory controller at 37 %. Every wait for earlier shader writes left
out by turns (LEONIDA_BARRIER_WAITS) takes 1.73 +-0.81 ms off a 75-115 ms frame.
AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64), Ryzen 5 7600X: runs d233, d234, d235.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The runtime and GPU test suite passes on real Apple Silicon hardware, while the hosted macos-26 paravirtual VM runner hits MoltenVK-specific failures on main. Disable the macos job in .github/workflows/runtime.yml and document it in docs/testing.md while keeping all Windows, Wine, and Linux CI jobs intact.
merzleckeier forced the schedule on Windows (#2759): with ThreadingHTTPServer's
daemon handler threads, server_close() returned while the handler still held
art.jpg, so ignore_cleanup_errors only hid it and left the file behind. With
daemon_threads = False, server_close() joins the handlers, which close their
files first; the folder's removal is strict again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FetchTests made their temporary folders with 'with', so they were removed when
the test body ended, before the cleanups stopped the test's HTTP server; on
Windows the handler thread could still hold art.jpg open and the removal failed
with PermissionError [WinError 32] (seen on #2724, #2734 and #2754). The folders
are now made with enterContext before the server, so the server stops first, and
with ignore_cleanup_errors=True.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The macOS runner's Apple Paravirtual device sometimes resolves none of the 7
timestamps (runtime run 46433144059: entries.size() == 3 failed at line 300,
before the existing guard for constant timestamps), while other runs on the
same image pass. Only on a paravirtual device and only with 0 timestamps, the
per-pipeline and interval checks are skipped and the output says so; any other
device is checked in full.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Require dword alignment in settle_twin so sub-dword typed buffer views (such as odd R16 or unaligned R8 elements) do not hand misaligned byte offsets to 4-byte-aligned rawBufferLoad, rawBufferStore, atomic, or cbuffer accesses when LEONIDA_TWIN_BIAS is enabled.
Clamp biased shader byte offsets past 0xFFFF_FFE0 to out-of-bounds 0xFFFF_FFF0 instead of wrapping 32-bit sentinel indices (u32::MAX * stride + field, x - 4 at x = 0) modulo 2^32 into the 16-byte prefix before the view, where loads read adjacent suballocation bytes and UAV writes corrupted them.
Clear stale twin bias bits in HostHeap::constant_raw_at when recycling dynamic slots, publish stride bias words before twin descriptors in mirror and make_listed, and bound twin_window byte spans to u32.
Fixes#2702
AI-assisted.
Recorded with the shown-frame capture: generated frames across the pause menu were made along stale vectors
(fixed by the resets of daa3f47a9: 6 generated frames in the menu phases against 204, the world's unchanged);
the G-buffer's motion vectors are pixels pointing back, as frame generation is told (a warp of each dumped
frame fits best at m = +1); and what ghosts in camera sweeps is the 70 to 120 ms between rendered frames.
AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64), Ryzen 5 7600X: runs d227 to d232.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
timing_wanted() looked only at the periodic line and the dev overlay, so with
LEONIDA_SUBMIT_PHASES_SECONDS=0 the frame and floor lines (on every
LEONIDA_SUBMIT_FRAME_SECONDS, 10 s by default) were printed with zero phase
times (found by merzleckeier on #2738). They read the phase times too, so they
now count as a consumer. The new test turns the periodic line off before the
first read and checks that scopes stay timed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dumped picture of a float target is scaled by its largest value and loses the sign, so it cannot say
in what units the G-buffer's motion vectors (format 34) are. Such targets (formats 33 and 34) are now also
written as <name>.bin: width and height, then each texel's two f32.
AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64): builds with diagnostics.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reaper's line counted only retired objects; landed host lists (with
their scratch chunks until reset) and lists' fronts went uncounted, so the
memory line showed a short line while they held gigabytes. Each kind is now
counted on hand-off and uncounted once dealt with. No change to when
anything is let go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With LEONIDA_FSR_UPSCALER=1 and LEONIDA_RENDER_SCALE below 1.0 on Series X (DLSS or stretch), patching the FidelityFX upscaler's maximum-size vtable slot (0x6300ba8) to its scaled-size function caused the title to present only the HUD over a black world (investigated in 0ae217ceb). Leaving that patch off by default (opt-in via LEONIDA_FSR_MAX_SCALED=1) keeps the requested render scale while drawing and lighting the world at 1706x960 -> 2560x1440.
Streamline's native swap chain gives no command queue through GetDevice (run d228: the hook was reached on
every present and every copy stopped there), so the queue the presenter made the swap chain with is used.
AI-assisted (Claude). Tested on an RTX 4060 Ti (driver 616.64): builds with diagnostics.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>