The launcher's logic, without a window:
- config: a versioned settings file in the user's configuration folder;
missing, broken or newer files give the defaults.
- repo: the repository found by --repo or by walking up to make_game.py;
the executable's name from the version manifests.
- commands: make_game.py's check and build (python -I -u, python3 off
Windows) and the loader as docs/boot.md section 2 runs it, on Windows
and through gta6rt.sh and Wine on Linux; each setting's flag or
environment variable (--stages, --wav, --full-check, --jobs,
--wave64-emulate, LEONIDA_VK_DEVICE, LEONIDA_VK_VALIDATION,
LEONIDA_UNIMPLEMENTED, gta6rt --trace-d3d12 and --overlay).
- output: make_game.py's log lines to a build's stages, and @@stage,
@@progress, @@eta, @@check, @@done and @@error lines if it prints them.
- state: the primary action (Check, Build, Play or Cancel), why it's
blocked, and the status line; "not bootable yet" reads as an
explanation.
- process: a command's output read on background threads; cancelling
ends its process tree. Tested with a stand-in shell script.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new Cargo package in launcher/ for a desktop launcher. src/ui/ is its
UI kit: the design language's tokens (colors, type, spacing, radii,
motion, glow), the theme, text roles, fonts and focus model, and the
widgets the window shows, each with its states, focus and keys: button
(with a large variant), text field and its editing rules, checkbox,
choice, switch, toggle group (draggable), loader, progress, status chip,
scroll area, sidebar list, settings groups, form, the window's own
decorations, the folded window, and the window's state with a theme
crossfade and a LEONIDA_WINDOW_FRAME switch.
Two palettes, Sunset dark and light, come from the logo's pixels. Its
light orange and dark purple are the two colours: orange the main and
purple the secondary in light, the other way round in dark; every glow
takes the secondary. Tests check every ink on every surface at 4.5:1.
The window's rounded corners use iced_wgpu's public primitive API, with
rounded quads where the renderer can't draw it. On Windows, where stock
iced can't present a transparent window, the frame asks for Windows 11's
rounded corners and draws its line at their radius.
The four fonts the text roles use are embedded with their SIL Open Font
License texts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
runtime/test/vk_test_device.h: the PR's filterMinmaxImageComponentMapping
query and main's shaderOutputViewportIndex feature were added at the same
place; both are kept.
Co-authored-by: Zilumz1 <221744236+Zilumz1@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A draw whose host pipeline is not made queues it at the back of the
requested list, and its frame then waits for it up to the frame's budget.
On the first visit to the world about 1,700 pipelines were queued at once,
562 of them took over a second each, and with the launcher's 10 s budget
every frame waited the whole budget for a pipeline a thousand others stood
before, then dropped its draws anyway: 0.35 fps for three and a half
minutes (RTX 3080, 8 workers).
A new queue state, AWAITED, sits between REQUESTED and MAKING. When a frame
starts waiting for a pipeline that is still in the queue, the entry moves
to the front of its list (passes over the screen in theirs), after those
awaited before it, so the next free worker makes it. It moves at most once,
is never claimed twice, and WAITING does not count it again; makes already
running are not interrupted. LEONIDA_PIPELINE_AWAIT_FIRST=0 keeps the order
asked.
Frames on a cold cache still wait up to the frame's budget: the waits now
succeed, so a frame may spend its budget on several pipelines it then draws
instead of one it drops. The budget setting bounds that, as before.
- Panel: frame times of 10 s or more (the launcher's pipeline budget) made
the percentile line longer than 40 columns, and the panel cut it without
a sign ("MAX 10000" showed as "MAX 100"). Times from 10 s up are shown in
whole seconds ("10S"); the test covers 10 s, 100 s and 10 min.
- The first line's pipelines made a second and residency waits counted
everything since the process started: the meter now starts from the
totals at the first present.
- "queued" was queued or being made: the log says so, the panel says
PIPES PENDING.
- The nearest-rank test covers 95% of 100 frames, where a float ceil would
take the 96th.
- The note is info, not a warning: the launcher sets the cap by default on
PCs under 48 GB, so it shows on every one without resizable BAR.
- It names the real condition (GPU upload heaps: resizable BAR, and a
Windows and driver that offer them), as the doc comments do.
- mapped_windows asks for support only when a cap is set, so its "off" case
is the one the code takes, and the test checks that support is not asked.
- The launcher's history comment and the README say "unless the card has
under 6 GB" (an unknown size counts as large).
- The paired form takes a group of several console waves where every s_barrier is one each wave
passes once whichever way it goes (emit::barriers_on_every_way: the block dominates every end
and is in no loop); its LDS accesses are then fenced instead of waiting for the group, and it
lowers ds_read2st64/ds_write2st64, the atomics with the old value back and ds_cmpst_rtn_b32.
CS_DefragHeap_ComputeRelocations (02384a60fda6f2d0), dropped every frame before, now runs.
- A program named in LEONIDA_PAIRED_FOR takes the paired form before its own translation, so
the launcher's names reach the five programs that move the heap's blocks (they copy
overlapping 1 KB blocks, and in 32-lane halves one half stored over what the other had not
read yet: white blotches there). The launcher names all six.
- LEONIDA_DUMP_SIZE=<w>x<h>[,..]: only targets of those sizes are saved with
LEONIDA_DUMP_TARGETS (a frame renders some 380 targets, 61 at the screen's size; saving all
took 11 s a frame).
- docs/findings.md: what a timeline of three frames shows (the card idle 22 ms a frame behind
DirectStorage, texture refreshes and the submitting thread; 76 ms a frame of waits for the
guards' lock).
After voidopcode/vilocity add4873 (GPL-3.0-or-later).
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64: the paired-form tests (18,
those that run on the card included) and a new one for groups of several waves; a warm-up
start and a recorded tour (runs d46, d47): the relocations and the mover in use translated
and bound, only the two particle programs refused, no removed device.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/rdna2spirv.py: main's d16 "destination is also read" check (now
DST_ALSO_READ, plus buffer_load_format_d16_hi_x) gains the PR's flat_load_
prefix. docs/design.md: main's 8/16-bit global row is kept and the PR's
"Flat memory" row follows it.
Co-authored-by: tiagonogueiraa-bit <360313680+tiagonogueiraa-bit@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in the x_memory_order docstring (tools/rdna2spirv.py): main already
ignores ds_nop (80417b9c4), so the PR's part still new is ordering
image_sample, image_gather4 and image_bvh; its docstring is kept. The PR's
parity test probe gains x_one_lane, which main's Gen.x_memory_order reads.
Co-authored-by: totonii <totonicontato@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Picture:
- Cutscene faces with only their eyes and teeth since the LDS bounds: the 25 face programs
(the face network's operations, the normals rebuilt from blend shapes) keep their LDS
accesses unbounded, by name and in the cache's key (LEONIDA_LDS_BOUNDS_EXEMPT; trustno1-coder
9eb44fa6, Victorywillbeours222). Six of them run in the waterside tour.
- Copies and resolves into textures the title fills go back into title memory once their list
has run, only the subresources written and of them the 4 KiB pages that change
(LEONIDA_COPY_BACK, on; voidopcode/vilocity ee93826): a view the title places over that
memory was made from bytes the copy never reached (faces in blocks of colour, clothes in
another texture's). 9,216 copies (52 MB) in a run of 8 minutes; by turns the frame's median
-0.33 +-0.50 and +0.34 +-0.25 ms.
- A list's prelude leaves out its upload of a texture another list wrote on the host GPU and
submitted first (LEONIDA_UPLOAD_GUARD; trustno1-coder e530c003, aventureroestelar-source),
noted only while the texture is still the title's.
- A texture asked for as reserved (levels on demand) is no longer cut from the pool, where it
was never reserved and was made whole again (aki-gta6/aki-runtime ad214cd, KeethSmith).
- The launcher names all 33 programs the chain gave an approximate form in LEONIDA_PAIRED_FOR
(timing runs d39: 1.98 ms of card a frame against 2.31 for the eleven before; tours d37, d38
with nothing broken), and keeps device-removed data to the faulting address (d35: the card
83 % busy against 89 % with breadcrumbs, the frames alike).
Shader translator (one re-translation): global stores count as UAV writes for early depth
(trustno1 788fe236); a sum of high halves is not taken for a wave reduction (Bebrik229); SDWA
sign-extended selects; mesh loops leave at their own exit at the limit instead of a `ret`
(LEONIDA_MESH_LOOP_EXITS, trustno1 6bbb6bca); readers indexed once per lowering (trustno1
7cc0d153, 101Leafy); raw FSSM records (XDAT 0x0c) read (fuzeofficial, via MiniVI 96e788c7).
Submitting thread, by turns of 4 s standing (runs d41, d43):
- Two lock passes, off by default (`=1` on): slot writes past the heap's lock of placed views
(LEONIDA_SPANS_QUICK; Belobug a284ca7 via readmet3xt 96dfd9bb8, trustno1 #1937) and the
texture queue's lock spared by marks (LEONIDA_QUEUE_MARKS; readmet3xt-lab b377071). Here no
one waited for those locks: the submitting thread +0.12 to +0.30 ms a frame with them.
`crate::asked!` is `toggled!` off by default.
- 8 parts joined against 2 (LEONIDA_JOIN_PARTS_AB): with 8 the frame -3.09 +-0.51 and -3.03
+-0.26 ms, so the launcher's 8 stays. The write-watch asking joined across 8 MiB against
256 KiB (LEONIDA_ASK_GAP_KB, _AB): with 8 MiB the card -1.08 +-0.50 and -1.14 +-0.22 ms busy.
AI-assisted (Claude). Tested on an RTX 4060 Ti, driver 616.64: the named unit tests of each
port (shader 12, gpu 11, texback and resource 36), a warm-up start (the same three programs
refused as before, no device removed), the turns above and recorded tours.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
d3d12_vulkan: without Resizable BAR, textures and staging buffers leave the BAR window to the arena; tile heaps prefer VRAM (RT-ALLOC-NO-REBAR-RETRIES)
Apply published_mode(out_file) to temporary listing before atomic replacement,
and restore write permission (0o600) before unlinking in finally block
when replace fails, preventing Windows PermissionError [WinError 5] and
stranded temporary files.
agent: yes
AI-assisted: yes
Apply published_mode(asm/spv) to temporary files before atomic replacement,
and restore write permission (0o600) before directory cleanup in exception block
when replace fails, preventing Windows PermissionError [WinError 5] and
stranded temporary files.
agent: yes
AI-assisted: yes
Apply published_mode(spv) to temporary staged SPV before atomic replacement,
and restore write permission (0o600) before directory cleanup in exception block
when replace fails, preventing Windows PermissionError [WinError 5] and
stranded temporary files.
agent: yes
AI-assisted: yes
Apply published_mode(out) to staged manifest file before atomic replacement,
and restore write permission (0o600) before TemporaryDirectory cleanup in
exception block when replace fails, preventing Windows PermissionError [WinError 5]
and stranded temporary files.
agent: yes
AI-assisted: yes
Apply published_mode(path) to temporary cache file before atomic replacement,
and restore write permission (0o600) before unlink in exception block when
replace fails, preventing Windows PermissionError [WinError 5] and stranded
temporary cache files.
agent: yes
AI-assisted: yes
The frame-rate line gives a mean over the last second or more, and the F3
panel only the longest frame, so a run with smooth frames and a few
multi-second stalls looks like a slow one, and the stalls do not show.
host/frametime.rs keeps every presented frame's time. With the frame-rate
line, every five seconds, it logs one line: the median, 95th and 99th
percentiles (nearest rank), the longest frame, how many took over 100 ms
and over a second, and beside them host pipelines queued and made a second,
waits for new memory to be resident per frame, and the commit the system has
left. The panel shows the last line's numbers and the pipeline wait per
frame. Pure parts are unit-tested.