- From VIctory (make.rs:154-223), which loads into the world:
- the per-frame wait defaults to 12 s for each kind, not 500 ms;
- while a world loads, a shorter budget still waits up to 4 s for a graphics and 12 s for a
compute pipeline, until LEONIDA_PIPELINE_GATE_S (120) seconds of that are spent.
The passes that unpack a world's models run once, and a dropped one stays missing.
Both kinds together stay under the title's 30 s hang watchdog (the cap is now 12 s).
- startup_trace: an access violation writing to address 0 (the title's watchdog fatal) dumps
every other thread's stack, once, to the trace and to stderr. The thread that stalled is one
of those, not the one that faults. Run 104 hit the watchdog at 366 s with the 500 ms budget,
and its trace held only the watchdog thread's stack.
pipeline_queue_test and d3d12_async_pipeline_test pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The title's watchdog thread checks once a second that the main loop stamped its progress (a QPC
time written from the frame update and the wait loops) and, after 30 checks without one, writes to
address 0 on purpose. The runtime log shows that as an access violation writing 0x0, which earlier
runs had read as a device loss. With the per-frame pipeline wait at 600 s, a world-load run stopped
drawing at 180 s and the title wrote to 0 at 211 s. A larger budget is now cut to 10 s, with a line
in the log.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from VIctory's pipeline/make.rs and pipeline/library.rs (GPL-3.0-or-later, Marvisak and
contributors, DexNom fork). The title creates ~60,000 PSOs in its first 20 s; compiled at creation,
its first CreateComputePipelineState held the main thread until the title's 30 s hang detector fired.
- Creation checks the description and the translator's index (program hash and entry, bindless,
mesh limits, code base, workgroup memory, the module file) and returns. The module, the layout and
the pipeline are made by a worker (src/pipeline_queue.h: half the logical processors, 2 to 8,
below normal priority). The SPIR-V is read at creation only where a check on it could refuse the
PSO on this device; the game's index lists the capabilities, so on the RTX 4060 Ti no module is
read at creation.
- SetPipelineState starts the build and waits while the frame's budget lasts
(LEONIDA_PIPELINE_WAIT_MS, 500 per frame and kind, one window the threads share, never for a
pipeline held over 3 s / 10 s). A draw, mesh draw, dispatch or indirect dispatch recorded without
a made pipeline is dropped and counted, logged once a second; the list stays valid. Frames are the
console frame clock's (slot 80); the title's device is bounded from its creation. A device of no
title (PC interface, tests) waits for the build until a frame begins, so nothing drops there.
- The early list: keys of the PSOs a run bound, in early-pipelines.txt beside pipeline_cache.bin
(or LEONIDA_EARLY_PIPELINES), started at creation on the next run, depth-only first.
- The title's device reads the 57 MB index on a thread from its creation (about 3.5 s).
Tests: pipeline_queue_test (no GPU: the frame window, queue order, a retired job, drops, the early
list's file) and d3d12_async_pipeline_test (RTX 4060 Ti: 192 PSOs created in ~15 ms, all draws
dropped and counted while held, all drawn once made; the early list written and read back; console
slot 86 makes the stream PSO). vk_pipeline_paths measures monolithic, pipeline-library and
shader-object compiles of translated pixel shaders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>