Commit Graph

1199 Commits

Author SHA1 Message Date
c60ce461af Merge pull request #2334 from kirigayakazima/fix/merge-check-safety
merge_check: guard ref option injection, bounds, and git timeouts
2026-12-01 12:57:50 +01:00
3fbc120df4 Merge pull request #1397 from whoalin1/mask-regs-data-read
rdna2spirv: a VALU data read of a lane-mask operand yields the wave's mask word
2026-12-01 12:53:35 +01:00
a726736ec2 Merge pull request #1774 from Tauwni/fix/explicit-lod-bias-moltenvk
rdna2spirv: --explicit-lod-bias applies the S# LOD bias where MoltenVK drops the sampler's; ps_ssharp passes on Macs (SHADER-EXPLICIT-LOD-BIAS-MVK)
2026-12-01 12:45:24 +01:00
4913ef152e Merge pull request #2436 from kawaii-shakal/wine-run-shader-cache
run_game_wine.sh: keep the drivers' shader cache from run to run (WINE-RUN-SHADER-CACHE)
2026-12-01 12:30:40 +01:00
f613e6d8ea Merge remote-tracking branch 'upstream/main' into HEAD
# Conflicts:
#	scripts/merge_check.py
2026-12-01 19:13:49 +08:00
19d62a98d4 Linux: enable scoped copy and descriptor tracking defaults (#2700)
* Linux: enable scoped copy and descriptor defaults

* Test Linux launcher optimization defaults and opt-outs
2026-12-01 11:52:20 +01:00
c6c8f5f5a3 scripts: build llvm-mc 23.1.5 by default, so the pipeline library translates (#1923)
* scripts, tools: build llvm-mc 23.1.5 by default, so the pipeline library translates

LLVM 21.1.8's gfx1013 decoder cannot decode 840 of the 2,684 compute
programs in the pipeline library of 1.0.2.1: their listings carry 79,490
undecodable words and 8,310 exp invalid_target_N lines, the translator
refuses all of them as "fall-through into undecodable words", and the
shaders stage keeps 1,844 of 2,684. LLVM 21 does translate all 26,503
shaders of shaders.rpf; the library is what it loses.

The same bytes under llvm-mc 23.1.5 have no rejected word in those 840,
and 839 of them translate and pass spirv-val (the last wants s_sethalt,
which the translator does not implement, under either version). The 1,844
that already translated were re-disassembled too: 1,674 listings change
and all 1,674 still translate, the other 170 are byte-identical, so the
stage goes from 1,844/2,684 to 2,683/2,684.

The build helper now builds 23.1.5 by default. The docs that name the
minimum version (README, docs/design.md, docs/testing.md, docs/linux.md)
and the three user-facing messages that still said 21+ (make_game.py's
preflight, shader_disasm.py's probe error, mc_command.py's install hint)
now say 23+, with the tests that assert those texts updated.

AI-assisted (DeepSeek Harness).
Written with an AI assistant.

* docs: LLVM 23 is what the shaders stage needs, and a test pins the script's default
2026-12-01 11:48:54 +01:00
f4c6aca754 gate: game-gate.ps1 says it needs PowerShell 7 (D3D12-GATE-PWSH7)
Under Windows PowerShell 5.1 the gate failed in about 2 s without starting the game and without saying
why (reported by a tester). A #Requires -Version 7.0 line makes 5.1 refuse it with a message before
anything runs; docs/game_gate.md says so, and a test keeps the line.
2026-12-01 01:28:02 +01:00
cd9fe51a9c Merge pull request #2752 from alpfilho/d3d12/borderless-fullscreen
d3d12: Alt+Enter switches to borderless fullscreen instead of freezing the picture (D3D12-BORDERLESS-FULLSCREEN)
2026-11-30 18:53:54 -05:00
2878a3911c Merge pull request #2787 from TheGeogeo/test-red-green
scripts: red_green.py checks a pull request red and green locally (TEST-RED-GREEN-LOCAL)
2026-11-30 23:33:36 +01:00
b3cc377020 translator: s_mov copies of EXEC keep the narrowing's tag through SGPR round-trips
Review follow-up on the mask-word gather gate (#1397): `s_mov_b32 s4,
exec_lo` under an unknown EXEC narrowing recorded nothing for s4, so the
later `s_mov_b32 exec_lo, s4` restore minted a fresh ("n", id) tag in
_exec_src_ex. mask_exec_sigs coverage then failed and the read kept this
lane's 0 / ~0 bit, while the equivalent literal `s_mov_b32 exec_lo, -1`
resolved to a constant half-state and gathered — register and literal
restores of the same runtime value disagreed.

_mov_sgpr_vals now returns an ("al", halves) alias for an EXEC source
whose half-state is an unknown narrowing, the same scheme saveexec uses:
exec_lo gives (state, None), exec_hi (None, state), exec gives each half
in its own register for b64 moves. _exec_src_ex already resolves those
aliases, so the restore reproduces the original tag and the gather stays
exact; untracked SGPR sources still mint a fresh narrowing and stay
conservative.

Tests: two semantic cases (wave32 and wave64) assert the register
round-trip gathers OpGroupNonUniformBitwiseOr identically to the literal
-1 restore; cs_exec_copy.asm (+ fixture, check.py/run_gpu_tests.py dump
entries) stores the mask word, exec_lo's own word and the literal-restore
word side by side on real hardware — PASS on RTX 4070 and Radeon
(64-wide), wave64 exec filters 9/9 on AMD.

Co-Authored-By: Devin <noreply@cognition.ai>
2026-11-30 22:22:44 +00:00
46ea66693f gate: untracked files in run.json, under_2_at_s from 60 s in the world (review)
run.json's dirty leaves untracked files out; a new untracked count says how many there are. The first
second under 2 frames counted from the world's first second, so the arrival's streaming dip was the
run's; it now counts from 60 s in the world, like the median. The longest gap with no frame stays
from the world on: a freeze on pipeline compiles comes right after arrival. The docs say both, and
that world_at_s counts from the gate's start, the precompile included.
2026-11-30 21:58:26 +01:00
1f08a8abb1 scripts: red_green.py checks a pull request red and green locally (TEST-RED-GREEN-LOCAL)
Green is current main with the pull request merged. Red is current main plus only the pull request's
tests: its test files, and the hunks of other Rust files that change only #[cfg(test)] items,
committed on the merge base and cherry-picked with a 3-way merge. It runs the touched D3D12 crates'
cargo test and the changed tests/**/test*.py on both sides, in one worktree and one target dir under
the git common dir, and prints per test: red then green, pass on red and fail on green, fail on both,
on one side only, with a verdict and an exit code. docs/testing.md has it next to the fork-CI recipe.
2026-11-30 21:52:48 +01:00
b535fb0dc3 d3d12: an in-game gate: one command, one run folder, one summary.json (D3D12-GAME-GATE)
Testers ran in-game gates and A/Bs by hand on five machines, each with
their own launcher wrapper and log parsers, and lost runs to consoles and
key files. scripts/game-gate.ps1 runs leonida.exe through the checkout's
play-d3d12.ps1 and writes one folder per run: run.json, launch.ps1, the
-DryRun settings, the F1 settings file, the launcher's output (the
precompile lines nobody kept), the runtime's log, events.jsonl and a copy
of the tester's data template (their own saves are never touched). It
stops the game with WM_SYSCOMMAND/SC_CLOSE (the runtime's own end: suspend,
pipeline cache saved) once -WorldSeconds were spent in the world, on a
STOP file or after -MaxMinutes, and kills it only 60 s later; it keeps the
game's exit code. `start` runs the same detached (created through CIM, so
an agent's or console's end does not end it); `stop` asks a run to end.

tools/game_gate.py (standard library) reads the folder into
summary.json (leonida-gate-summary/1): build, card, settings (the run's
settings line, no paths), precompile counts, time to the world (two frame
lines with 500 draws or more, cutscenes included), when the pipeline
cache went warm (60 s with nothing being made), fps from the presents
(median, p5, frame p95, end median, the first second under 2 frames, the
longest gap with no frame), crashes by kind (device lost, panic, fault by
module kind), exit, stop and a verdict: PASS needs 300 s in the world,
no device loss, panic or fault, no gap over 10 s, alive at the stop. The
testers' answers to a draft on the bridge are folded in. Its tests use
synthetic logs and check that the runtime still writes what it reads.
2026-11-30 20:39:48 +01:00
d99ba5c095 Merge main: drop the macos job as main does, keep this PR's runtime.yml path filters
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:24:47 +01:00
22d58b8629 Merge upstream main into the PR branch 2026-11-30 18:31:59 +00: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
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
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
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
2afbcef3c0 runner: skip the exact exp2 case on Apple's Paravirtual device
That device's OpExp2 lands two ulps low on 2^-125, so the bit-exact fixture cannot
hold there; real Apple hardware returns the exact pattern (M5 Max, MoltenVK 1.4.2,
passes the same case), which is why this skips by device instead of widening the
check for everyone.

The skip reads the device line the harness already prints beside the subgroup line
that wide_pixel_skip reads, so it needs no new plumbing.

Written with an AI assistant.
2026-11-30 15:39:20 +01:00
f474c74b04 Merge origin/main (f9f3ec4c6) into the carry of #2174
Current main after #2566. New conflict on top of the earlier carry merge:
tools/rdna2spirv.py, _translate (straight-line and CFG paths): main passes
extra=meta_extra to _shader_meta.collect and reads the literal samplers
after it; the PR's g.note_pops_word(insns) runs right after that block,
before fit_shared_memory / needs_barrier_rounds as before.

Co-authored-by: QemmHD <290605352+QemmHD@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:30:43 +01:00
105dd3a37b Merge origin/main (f9f3ec4c6) into the carry of #1406
Current main after #2566; no new conflicts on top of the earlier carry merge.

Co-authored-by: abdoulaahmad <104858675+abdoulaahmad@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:19:19 +01:00
c3f63575a2 Merge origin/main (f9f3ec4c6) into the carry of #1726
Current main after #2566; no new conflicts on top of the earlier carry merge.

Co-authored-by: TanmaySatyam <lavidivwaker@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:19:18 +01:00
ab09fd1f86 Merge main: keep --no-ftz32 and --integer-dot-fallback next to --explicit-lod-bias
tools/rdna2spirv.py: main's float-only typed implicit sample (OpImageSampleImplicitLod)
is used only without --explicit-lod-bias; with the flag the Grad path still
scales the derivatives by the S# bias.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 11:46:44 +01:00
012b79a678 Merge pull request #2566 from aslan2142/integration/perf-cpu-gpu-r6
[integration] PageMirror, GPU detile, async queue & RDNA2->SPIR-V performance stack (INTEGRATION-PERF-CPU-GPU-R6)
2026-11-30 11:24:25 +01:00
454df8e954 Merge pull request #2678 from bobcatchris/fix/compute-workers-win-venv
COMPUTE-WORKERS-WIN-VENV: launch Windows compute workers with sys._base_executable
2026-11-30 11:12:46 +01:00
b8508a974b Merge branch 'main' of https://github.com/ProjectLeonida/mandy into fix/rendering-correctness
# Conflicts:
#	tests/semantic/test_interp_computed_ij_fallback.py
2026-11-30 04:36:05 -05:00
45df09b843 chore: remove 13 dead one-off scripts, fix /home/nolan test paths, drop unused imports (CHORE-TIER2A-PYTHON-CLEANUP) 2026-11-30 04:00:53 -05:00
f7764579a3 Merge pull request #2668 from aslan2142/chore/tier1-main-hygiene
chore: remove dead Tier 1 files, wire 5 unwired C++ tests, and fix play.ps1 path
2026-11-30 09:33:39 +01:00
206bb4b688 run_game_wine.sh: --cache fresh is cold: drops the drivers' cache variables and an old session/cache (WINE-RUN-SHADER-CACHE)
Review follow-up (timbot103):
- A driver's own variable wins over XDG_CACHE_HOME, so a warm MESA_SHADER_CACHE_DIR, MESA_GLSL_CACHE_DIR or
  __GL_SHADER_DISK_CACHE_PATH reached Wine under --cache fresh. A fresh run now unsets them; with a kept cache the
  caller's variables stay and win. --help and docs/linux_proton.md say so.
- A run folder whose earlier launch did not start is accepted again: a fresh run now empties its session/cache, and
  session.txt is written anew instead of getting a second "shader cache:" line.
- test_run_game_wine_safety's shared fixture passes --cache fresh, so an inherited XDG_CACHE_HOME stays out.

Two new tests in tests/test_run_game_wine.py fail with the old script and pass with this one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
2026-11-30 08:14:20 +00:00
95bc33f6e2 Built-in keyboard prompts, and both prompt movies built for every player
tools/pc_prompt_glyphs.py draws its own key caps, arrow keys and mouse in
code when --glyphs is not given (no pictures, Pillow or font), with the keys
of the runtime's on-foot table, each inside the outline of the Xbox glyph it
replaces and covering no more of the canvas (measured on the user's movie,
numbers only). tools/prompt_glyph_movies.py builds pc_ and ps_prompt_glyphs.gfx
over the title's movie (standalone if data.rpf cannot be read) into
d3d12/target, where leonida.exe looks; play-nvidia.ps1 runs it before a start
and make_game.py in its runtime stage. A movie the player made is never
touched or shadowed; its own are stamped and rebuilt only when inputs change.
2026-11-29 21:49:50 -05:00
fb163d9a9c scripts: launch Windows compute workers with sys._base_executable (COMPUTE-WORKERS-WIN-VENV) 2026-11-29 19:46:20 -06:00
18936010df chore: remove dead Tier 1 files, wire 5 unwired C++ tests, and fix play.ps1 path 2026-11-29 20:00:40 -05:00
79f89c4906 Merge pull request #1609 from lixonik/windows-boot-scratch-cwd
windows-boot: keep driver artifacts outside the checkout (RT-WINDOWS-BOOT-SCRATCH-CWD)
2026-11-29 20:01:20 +01:00
f7a4e75bf8 Merge pull request #2615 from alpfilho/d3d12/fsr3-framegen
d3d12: FSR 3 frame generation for cards without DLSS frame generation (D3D12-FSR3-FRAMEGEN)
2026-11-29 20:00:10 +01:00
761578d776 Merge pull request #1766 from sodove/fix/windows-boot-fault-context
windows-boot: report the loss API, fault query and checkpoint counts
2026-11-29 19:28:29 +01:00
8db8335d23 tests/ci: fix llvmpipe skip on cs_w64x_dynamic_r32_uint, Set 0 binding 29 counts, and D16S8 table row 2026-11-29 12:59:52 -05:00
f569782332 windows-boot: test_crash_monitor tolerates code-page module names in stack.txt 2026-11-29 09:05:17 -08:00
caf4fc3698 Merge upstream main into the PR branch 2026-11-29 16:54:24 +00:00
eff40832ef Merge remote-tracking branch 'refs/remotes/mandy/main' into fix/rendering-correctness
# Conflicts:
#	runtime/shims/d3d12_com.cpp
#	runtime/shims/d3d12_vulkan_device.cpp
#	runtime/src/command_list.h
#	runtime/src/vulkan_replay.h
#	runtime/test/gfx10_descriptors_test.cpp
2026-11-29 11:51:06 -05:00
f051ae5183 d3d12/tests: fix Windows MSVC build, CopyMemory collision, copy parity guard, and --no-ftz32 probe 2026-11-29 11:41:49 -05:00
6d5a3ba260 windows-boot: test_crash_monitor reads its text files as UTF-8 (text-encoding lint red on main since 1b9e4969) 2026-11-29 08:03:13 -08:00
865f6c24e3 d3d12: FSR 3 frame generation for cards without DLSS frame generation (D3D12-FSR3-FRAMEGEN)
DLSS frame generation runs on RTX 40 and 50 cards only. LEONIDA_FSR_FRAMEGEN=1 (the
launchers' -FsrFrameGen, or the F1 menu) presents through AMD FidelityFX's frame
interpolation swap chain instead: one generated frame between two of the title's, on RTX 20
and 30 cards and on any other D3D12 card.

- fsr.rs (new): loads amd_fidelityfx_loader_dx12.dll and amd_fidelityfx_framegeneration_dx12.dll
  from LEONIDA_FIDELITYFX_DIR (d3d12\amd-sdk\FidelityFX\bin by default) once WinVerifyTrust
  finds both signed, makes the swap chain, and before each present dispatches the prepare
  step with the depth, motion vectors, render size, jitter and camera range fg.rs collects for
  DLSS. The title's colour without the interface goes in when the frame is one composed plane.
  Not made while Streamline's frame generation is active.
- fg.rs: the inputs are collected while either frame generation is on (collecting()), and
  inputs_for_present() hands them to fsr.rs.
- host.rs: the swap chain comes from fsr.rs when it is on, and it is told before ResizeBuffers.
- The F1 menu has FSR 3 FRAME GEN 2X; it can be turned off and on while the game runs.
- play-nvidia.ps1 / play-d3d12.ps1: -FsrFrameGen and -FidelityFxDir; FSR frame generation is
  off with ray tracing, and LEONIDA_TEXTURE_ROOM_PERCENT defaults to 80 with it, since it holds
  1.5 to 2 GB of video memory.

Ported and adapted from trustno1-coder/VIctory-NVIDIA crates/victory-gpu/src/streamline/fsr.rs
(29d8dbf, GPL-3.0); credited in d3d12/README.md and the module's notes. AMD's DLLs are not in the
repository: the user puts them in the folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 12:43:22 -03:00
d00d46c1e4 Merge pull request #1839 from delysidemanYT1/gpu-spirv-as-diagnostics
GPU-SPIRV-AS-DIAGNOSTICS: Preserve spirv-as diagnostics containing undecodable bytes
2026-11-29 16:43:01 +01:00
ce792f55fb Preserve all 32 bits in dynamic R32_UINT loads 2026-11-29 09:38:14 -05:00
173c5d41a6 Merge origin/main into carry/pr-2174
vk_harness: main's has_cap scan of both stages, plus needs_interlock = has_cap(fs_code, 5378) from the PR.

Co-authored-by: QemmHD <290605352+QemmHD@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:51:23 +01:00
c34cec72ee Merge pull request #2593 from Bloh09/fix/ci-main-red-tests 2026-11-29 13:44:04 +01:00
52c2765fcb Merge origin/main into #1406 (carry prep)
scripts/run_semantic_tests.py: main's runner (process tracking, exit-code descriptions, result validation, serial CHILD_PROGRAM) kept; the PR's run_worker/PackageLoader run as WORKER_PROGRAM, its result file also carries exitCode, read_result returns includeChildren, and children are submitted after their package initializer.

Co-authored-by: Abdullahi A Ahmad <104858675+abdoulaahmad@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 09:41:11 +01:00
be581760b2 Merge origin/main into #1726 (carry prep)
scripts/run_gpu_tests.py: PR's module-level tables kept; main's new dumps (cs_w32_cvt_f16_mods, cs_dpp_cmpx, cs_w32_wrxchg2_ext, cs_w32_wrxchg2st64, cs_w64x_partial_swizzle) added to CS_DUMP_WANTS / CS_DUMP_NON_WAVE64 / CS_DUMP_HEXWORDS, and main's partial-wave subgroup size (32 under emulation) kept.

Co-authored-by: TanmaySatyam <248538550+TanmaySatyam@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 09:41:10 +01:00