- draw.rs: LEONIDA_BATCH_HEAP_READS is on unless set to 0. stores_bound
already says no of every store through a picked view, so the extra rule
only kept batches from staying open past programs that read through
picked views: the 934 CS_RaytracingResolve dispatches a frame (and the
meshlet culling passes, which store their records through views their
binds declare and now end a batch for those records alone).
- findings.md: the measurements; switches.md regenerated (with the
switches of the main commits merged before).
Standing at the waterside save, Series X, 1,080 to 1,440 lines, no
generated frames: 175 to 186 batch passes a frame against 928 (run d311
against d275, LEONIDA_BATCH_WHY), 8 of them ended for stores not declared
(793 before). By turns of 4 s (run d310, 53 phases): the frame's median
-2.11 +-0.69 ms, means -1.86 +-0.86, the card busy -3.67 +-0.43, the
submitting thread +0.48 +-0.73. Timing run (d312): the card's timed work
60.5 ms a frame against 63.2. Recorded tour (d313, 520 frames): 37 frames
with one-frame cells, 67 cells, all in fast turns, at the low end of the
tours before; terrain, foliage, the house and the player drawn.
AI-assisted (Claude). Tested on RTX 4060 Ti 16 GB, driver 616.64: the runs
above; the batched clamp's WARP tests; cargo check with and without
diagnostics.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Exclude v_readfirstlane from --mesh-native-wave32 until per-use uniformity
analysis proves the source wave-uniform (with ms_native_readfirstlane.asm
and test_mesh_native_wave32.py regression test + docs/design.md update).
- Lower SPIRV_OPT_LARGE_BYTES from 750 KiB to 512 KiB so library/lib_cs_03245
and siblings use the safe SSA pass set instead of --scalar-replacement=0
(avoiding NVIDIA 590.48.01 compiler SIGSEGV during warmup).
AI-assisted.
Review of the first version: a value that differs from the last start's command line was taken for the user's new
choice. That lost an explicit flag on the first start after an upgrade, never let the same flag typed again win, and
dropped a menu value the command line never mentioned when leonida-launch.txt lacked the key. The menu file was also
rewritten before the history, so a failed history write had already lost a saved choice.
Now the rule follows what the user typed:
- A switch typed for this start wins over the menu's saved value of each setting it makes. The menu file drops that
value, so F1 shows the command line's. scripts\play-d3d12.ps1 passes the switches typed there as -Typed, so its
Series X default and -Lowest 1080 leave the menu's choice standing. A start by hand counts its own switches, and
-More wins like a typed switch.
- Every other setting keeps the menu's value.
- The menu's SAVE AND RESTART adds -MenuRestart to the switches it replays (LEONIDA_MENU_ARGS), so there the menu's
values, saved after those switches, win.
leonida-launch.txt is gone. The menu file is written to a temporary file and moved over the old one, and only when a
value leaves it. If that fails, the start runs with the command line's values and the file stays whole.
Tests: 10 cases, among them the same switch typed again, an untyped default, a setting no switch makes, the restart,
a start by hand, -More and a menu file that cannot be written.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
play-nvidia.ps1 applied leonida-settings.txt (what F1 saved) over the command line at every start. An empty value
there removed what the command line set, so a later -Resolution, -Dlss or -SeriesS was lost without a word.
Now leonida-launch.txt (git-ignored) keeps what the last start's command line made:
- A setting this command line makes otherwise than that start's did wins. The menu file drops its value, so F1
shows and saves the new one.
- A setting it makes as before keeps the menu's value, the newer choice.
- Each start says which values came from the menu and which the command line replaced.
- A dry run writes neither file.
The F1 menu gets the native render scale (1, which -Resolution makes at the output's height) and the dynamic
resolution's lowest scale (LEONIDA_RENDER_SCALE_MIN, from -Lowest).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- draw.rs: with LEONIDA_INDIRECT_BATCH=4 a program that picks buffer views from
the heap by an index it computes ended every batch of indirect records, even
when every store it makes goes through views its bind declares (it may only
read through the picked ones). stores_bound already says no of a store
through a picked view, so with LEONIDA_BATCH_HEAP_READS=1 such a program is
asked like any other. The 1,004 CS_RaytracingResolve hit programs are of that
kind, and the batch count a frame (900 to 1,000) follows their 934
dispatches. Off by default until measured; nameable in LEONIDA_AB. The
LEONIDA_BATCH_WHY line names 16 programs, not 8.
- indirect/batch.rs: the pass read the job table's count, then the job, then
the budget by an atomic or, then charged it by compare and exchange: four
trips to memory one behind the other, about 930 passes a frame. The count,
the experiments' bits, the job and the budget are read together now, and a
pass whose jobs fit in one group and all fit in what is left of the budget
(it is then the only group charging it, after every earlier shader write)
adds them with one atomic it does not wait for. Otherwise it charges as
before. What it writes and charges is the same.
AI-assisted (Claude). Tested on RTX 4060 Ti 16 GB, driver 616.64: the batched
clamp's WARP and card tests (budget charging, cut dispatches, the clamp of one
execution against the batch).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A depth texture with a stencil plane has two host twins that shaders write through unordered access: the
colour twin and the depth plane's (`resource::twin_plane_resource`). The title's unordered access barrier
on the texture was put on the colour twin alone, so a pass reading what was written through the depth plane
could read it unfinished, or the frame before's. The tiled lighting writes its material classes that way,
and the deferred lighting then shaded tiles with the wrong class: a dark patch with blocky edges on a wall.
The barrier is now on both twins.
After KyleS98/VIctory-Neo d533ce6, taken there from sub-north/Subsystem 664d7ec6 ("Wait for a depth plane's
twin in a UAV barrier", GPL-3.0); its tracer (gtport646, RTX 4090) saw the patch in 2 launches of 5 before
and in none of 25 after.
AI-assisted (Claude). Tested on RTX 4060 Ti 16 GB, driver 616.64: type-checked; a recorded tour after it
(the patch is too rare to count out in one).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
findings.md: LEONIDA_HOST_FLOAT in timing runs (d294 51.82, d306 51.81 ms of the card's timed work a frame; the
first run after compiling its pipelines, d303, 54.51, the driver's background compiles), left on; LEONIDA_AMBIENT_NEAR
not shown to be needed here (runs d304, d305), left off; the clamp pass waiting only for its record buffers (run
d302) no quicker. switches.md regenerated (LEONIDA_HOST_FLOAT, LEONIDA_AMBIENT_NEAR).
AI-assisted (Claude). Tested on RTX 4060 Ti 16 GB, driver 616.64: runs d302 to d306 (Series X profile, 1440p
output, dynamic resolution from 1080 lines, frame generation off).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>