A verification's only trial said "red does not build" while rustc had crashed (0xC0000005). A side whose
cargo output shows rustc or a build script ending with a Windows crash status, an internal compiler
error or a failed allocation now builds again once, and the report says so; a second crash gives the
verdict `compiler crashed` (exit 1), not `red does not build`. A test binary that crashes stays a test
result.
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.
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>
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.
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.
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.
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>
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.
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>
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>
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
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.
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>
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>
LEONIDA_RENDER_SCALE_MIN (the loader's hooks.rs) sets only the lowest scale of the
title's own upscaler (the immediate at rva 0x28f1e7e) and leaves the scale above it to
the title's dynamic resolution; a valid LEONIDA_RENDER_SCALE still holds one scale.
The launchers take it as -Lowest <height>; scripts\play-d3d12.ps1 now starts Series X
with -Lowest 1080 (a 2560x1440 output, 1080 to 1440 lines rendered) instead of
-Resolution 1440, which still holds 1440.
Same save, RTX 4060 Ti, frame generation off, two series (2026-11-29): median frame
57.0 and 59.6 ms against 66.0 and 67.9 held at 1440; the title's choice sat at its
1080 floor there. A recorded tour at the floor: no device removal, no new pipeline
refusals; the frames the scan flagged are camera turns into the sun.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>