Commit Graph

18350 Commits

Author SHA1 Message Date
61666057a2 Merge pull request #2747 from OreoFR/docs/fork-ci-red-green
docs/testing: red and green of a runtime pull request on your fork's CI
2026-11-30 17:50:13 +01:00
1ad7867a2c Merge pull request #2710 from Kal0s-design/fix/wave-sections-unmatched-saveexec
d3d12 shader: find the wave sections after an unmatched saveexec (D3D12-SHADER-WAVE-SECTIONS-PAST-UNMATCHED-SAVEEXEC)
2026-11-30 17:49:56 +01:00
2a880c31da Merge pull request #2612 from TheGeogeo/d3d12-bar-windows-warning
d3d12: LEONIDA_WINDOWS_BAR_MB says once that it does nothing without resizable BAR (D3D12-BAR-WINDOWS-WARNING)
2026-11-30 17:49:40 +01:00
e957e20d62 Merge remote-tracking branch 'origin/main' into fix-2738 2026-11-30 17:47:29 +01:00
be454caa42 Merge pull request #2763 from aslan2142/ci/disable-macos-ci
ci(runtime): disable macOS CI job for now
2026-11-30 17:44:57 +01:00
6bc847d0b6 d3d12: Alt+Enter keeps each window's own place, leaves child windows alone and holds back its repeats (D3D12-BORDERLESS-FULLSCREEN)
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>
2026-11-30 13:43:07 -03:00
2bf6a3e60c Merge remote-tracking branch 'origin/main' into perf/d3d12-gpu-list-lock-contention 2026-11-30 08:41:07 -08:00
4747c76492 d3d12: lock-free view publication and shared resource reads on list threads (D3D12-GPU-LIST-LOCK-CONTENTION)
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
2026-11-30 08:41:04 -08:00
d985409b61 d3d12: Alt+Enter switches to borderless fullscreen instead of freezing the picture (D3D12-BORDERLESS-FULLSCREEN)
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>
2026-11-30 13:38:40 -03:00
c6a8f7164b Merge origin/main into d3d12-frame-time-stats
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).
2026-11-30 17:36:27 +01:00
c08ececaf1 Merge remote-tracking branch 'origin/main' into fix-2738 2026-11-30 17:29:58 +01:00
46688881e7 Merge remote-tracking branch 'origin/main' into d3d12-pipeline-wait-queue 2026-11-30 17:29:30 +01:00
08e42a5160 Merge pull request #2691 from fiestorra/fix/paravirtual-exp2-skip
runner: skip the exact exp2 case on Apple's Paravirtual device (re-opened #2641, closed by an accidental push)
2026-11-30 17:28:44 +01:00
e8257a0a91 Frame generation by turns (LEONIDA_AB=<s>,LEONIDA_FG_TURNS), to measure what it costs a rendered frame
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>
2026-11-30 11:26:40 -05:00
80355d34a8 Merge pull request #2733 from OreoFR/carry/pr-2085
reprend #2085: d3d12: one guarded copy per run of adjacent written geometry tiles (RT-GEOMETRY-READBACK-RUN-MERGE)
2026-11-30 17:25:12 +01:00
bd466f8839 Merge pull request #2730 from OreoFR/carry/pr-2362
reprend #2362: rdna2spirv: forward DPP src0 neg/abs to op readers instead of eager 32-bit modify (SHADER-DPP-F16-AND-SIGN-MODS)
2026-11-30 17:24:41 +01:00
1c78b8219e Merge pull request #2728 from OreoFR/carry/pr-65
reprend #65: rdna2spirv: translate FLAT loads and stores as global accesses
2026-11-30 17:24:22 +01:00
35e75b7a9d Merge pull request #2731 from OreoFR/carry/pr-2174
reprend #2174: rdna2spirv: seed the POPS collision word so the wait loop ends (SHADER-POPS-COLLISION-SEED)
2026-11-30 17:24:02 +01:00
ffa0f8ed4a Merge pull request #2751 from OreoFR/reaper-count
leonida-gpu: count landed lists and lists' fronts in the reaper's line
2026-11-30 17:23:33 +01:00
4bab071a92 Merge pull request #2675 from bobcatchris/fix/d3d12-loader-publish-concurrent-rename
D3D12-LOADER-PUBLISH-CONCURRENT-RENAME: tolerate Windows AccessDenied when destination already matches
2026-11-30 17:23:20 +01:00
81bb313ab6 Merge remote-tracking branch 'origin/main' into push/main-1130 2026-11-30 11:22:56 -05:00
f9b84a4245 Findings: the tour's rendered frames hold no flash; the card at full clocks and two thirds of its power; the waits are under 2 ms
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>
2026-11-30 11:22:54 -05:00
56c1619eec Merge pull request #2676 from bobcatchris/fix/d3d12-hle-apu-handle-lifetime
D3D12-HLE-APU-HANDLE-LIFETIME-AND-ALIGNMENT: track live APU handles with Arc registry and unaligned guest I/O
2026-11-30 17:21:47 +01:00
17d4795931 Merge pull request #2673 from bobcatchris/fix/d3d12-hle-xnetworking-wide-alignment
D3D12-HLE-XNETWORKING-WIDE-ALIGNMENT: read title UTF-16 pointers unaligned in xnetworking::wide
2026-11-30 17:19:19 +01:00
ae90109e79 ci(runtime): disable macOS CI job for now
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.
2026-11-30 11:18:37 -05:00
20e9dea0fe tests/test_launcher_serve: join the file server's handler threads on close, strict cleanup
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>
2026-11-30 17:16:53 +01:00
2b85ec1249 Merge commit 'a4ed2638981ff3e7b9590e618dddc382115952aa' into fix/1080-1440p-motion-blur-switch 2026-11-30 17:04:36 +01:00
f27cd4ae22 tests/test_launcher_serve: stop the file server before its folders go, and don't fail on a file still open
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>
2026-11-30 17:04:00 +01:00
a21a62af1b Merge pull request #2719 from OreoFR/carry/pr-1406
reprend #1406: Honor package load_tests hooks in the parallel semantic runner
2026-11-30 17:03:15 +01:00
a4ed263898 Merge pull request #2746 from OreoFR/reprise-1837
tools/game_run_summary: guard stdout encoding, BOM ints, OSError and RecursionError (reprend #1837)
2026-11-30 17:02:59 +01:00
e324ad55ed Merge pull request #2720 from OreoFR/carry/pr-2093
reprend #2093: spirv_opt: scalar-replace surviving static Function arrays (SHADER-SPIRV-OPT-SROA)
2026-11-30 17:02:39 +01:00
c663c2a85e Merge pull request #2724 from OreoFR/carry/pr-282
reprend #282: fix(rdna2spirv): order image_sample, image_gather4, image_bvh and ignore ds_nop in --wave64-emulate
2026-11-30 17:02:20 +01:00
ca5b392cec Merge pull request #2723 from OreoFR/carry/pr-1994
reprend #1994: rdna2spirv: extract per-lane bits for non-mask special sources in s_mov_b32 exec_hi (SHADER-EXEC-HI-SPECIAL-SRC)
2026-11-30 17:02:03 +01:00
f8c32396c1 vk_gpu_profile_test: say so and skip the per-pipeline checks when a paravirtual GPU resolves no timestamp
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>
2026-11-30 17:00:23 +01:00
c38c9e6a4f Merge pull request #2634 from fiestorra/diag/pipeline-slow-line-source
d3d12: the slow-pipeline line says where the pipeline came from, and whether its journal was written
2026-11-30 17:00:17 +01:00
5583b6ac56 Merge pull request #2632 from imShangLi/fix/d3d12-gpu-pipeline-bytecode-alignment
leonida-gpu: read the pipeline stream of the title unaligned (D3D12-GPU-PIPELINE-BYTECODE-ALIGNMENT)
2026-11-30 16:59:38 +01:00
ca191f633c Merge pull request #2626 from merzleckeier/codex/d3d12-motion-blur-f1
d3d12: preserve -MotionBlur across F1 restart
2026-11-30 16:59:10 +01:00
1cce3c89f1 Merge pull request #2624 from bobcatchris/fix/d3d12-shader-rdna-legacy-mad
D3D12-SHADER-RDNA-LEGACY-MAD: restore RDNA LEGACY lowering path in legacy_mad
2026-11-30 16:58:49 +01:00
db6c0d0afd Merge pull request #2623 from hardly-relevant/feat/d3d12-stall-trace
d3d12: save a rolling timeline after a frame stalls (D3D12-STALL-TRACE)
2026-11-30 16:58:12 +01:00
dc67b173dd Merge pull request #2620 from Param-2811/test/group-pack-timing
leonida-shader: time group packing on the card (SHADER-PACK-TIMING); GPU tests prefer the high-performance adapter
2026-11-30 16:57:08 +01:00
fe7c76d3b0 Merge remote-tracking branch 'origin/main' into fix/d3d12-twin-bias-rdna3 2026-11-30 07:50:19 -08:00
de66085aa2 fix(d3d12): guard biased raw twins against sub-dword offsets and 32-bit wrap
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.
2026-11-30 07:47:55 -08:00
3e74b0d7d3 Merge remote-tracking branch 'origin/main' into push/main-1130 2026-11-30 10:47:03 -05:00
9602e4bf4f Findings: what frame generation shows, the menu's resets, the motion vectors' units
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>
2026-11-30 10:46:52 -05:00
c13dc82a51 submit_phases: keep timing scopes for the frame and floor lines
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>
2026-11-30 16:34:27 +01:00
87061c29a0 Target dumps: two-channel half floats saved as they are too (the motion vectors' units)
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>
2026-11-30 10:31:32 -05:00
1492c0eae2 leonida-gpu: count landed lists and lists' fronts in REAPING
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>
2026-11-30 16:29:52 +01:00
55996ef0c0 Merge origin/main into perf/d3d12-shader-fast-hash 2026-11-30 09:26:37 -06:00
591bd23a71 d3d12: leave FidelityFX maximum-size vtable patch off by default
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.
2026-11-30 11:24:17 -04:00
3ba993d6f5 Shown frames: the copy goes on the presenter's queue when the swap chain names none
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>
2026-11-30 10:19:18 -05:00