[GH #150] First minutes: 3 096 pipelines and 28.7 s of texture refresh, measured #150
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Zettrox/ztrx. Originally posted by Logan-Gaillard on 2026-11-25T14:58:58Z.
Where the first minutes go, measured on one 300 s run (
69cb, this repo, i7/U7 hybrid laptop, RTX 5070 Laptop 8 GB,90b529f+ local work).Two separate costs, not one:
first bind)Totals: 3 096 pipelines created, 28.7 s of texture refresh accumulated over 160 samples, and the frame time settles around 400 ms once both are done. The world entry is therefore two bursts: shader/pipeline creation around the 90 s mark, then texture preparation from 100 to 200 s.
What we already know about the second burst (measured by @1mlesc, cross-checked by @AlexisLRC):
TextureQueue::dueserves entries already looked at before new ones, and the pass takes at most 4 096 of them, so while more than 4 096 slots wait with nothing mapped, no new slot is looked at. That starves the new ones; it does not create the backlog.What is not established, and should not be assumed: how many of the unmapped slots are actually sampled by a draw. The counter counts every slot the title wrote into its view heap, and the pass never consults the frame's draws. A counter "slots read by a draw and without mapped memory" would settle it.
Next steps on our side: a run with
VICTORY_TEXTURE_NO_WAIT=1(to size the 1 199 ms wait), and making the per-frame staging budgets configurable in this repo — they exist in victory-fork asVICTORY_TEXTURE_STAGE_MB,VICTORY_TEXTURE_STAGE_MSandVICTORY_TEXTURE_CATCHUP, but are constants here. On the pipeline side we are checking whether creation happens on the submission thread.Credits: @1mlesc (textures, the 50 004/18.7 GB measurement, the queue-order analysis), @AlexisLRC (protocol review, and the observation that our ztrx builds had none of the texture fixes), PC1 (timeline, screenshots metric, bench).
Imported from Zettrox/ztrx. Originally posted by Logan-Gaillard on 2026-11-25T15:00:42Z.
Follow-up from the same logs, and it sharpens the number above: the 2 054 pipelines in one 20 s window are translations, not creations.
The run reports its own counters:
hits=0means the shader cache was cold for that build, so all 3 096 shaders were translated from GFX10 to DXIL during the first ninety seconds. A run on the same executable a few minutes later reportshits=3181 misses=0. The pipeline burst is therefore a cold-cache burst, and it costs about a minute and a half of the load every time a new binary is built — which, during a day of iteration, is every time.Being cold for a build is by design: the cache key is the BLAKE3 of the executable plus the translation settings (
victory-gpu/src/shader_cache.rs), so a rebuilt translator never serves an old translation. That part is right.What was not right is that the bench and the interactive launcher used two different cache directories:
%LOCALAPPDATA%\victory\cache(default)D:\GTA666\.victory\cacheSo a build tested all afternoon still started cold the moment it was played: the bench's translations were written where the player never looks. Fixed on our side by pointing the runner at the same directory as the launcher (
VICTORY_CACHE_DIRin the runner's environment, one line). After that, a build a test has run opens withhits=3xxx misses=0instead of re-translating.Worth noting for anyone reading counters: most of those 3 248 MB are entries for older binaries, which an executable-hash key can never reuse. Not a leak — dead weight that can be dropped whenever the disk matters.
No claim of a frame-time win here: the same work still happens once per build. The win is that it now happens during a test instead of during the first minute of play.