Add offline shader and pipeline precompilation #282
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!282
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/282/head"
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?
@t4l03 on GitHub · 2026-11-24 23:12 UTC · original
t4l03:feature/offline-shader-precompile→main· +3419 −226 · 24 files · 2 commits · closed without mergingSummary
victory translate --cacheto populate the runtime shader cache from local shader packs and containers. Entries follow the translator, effective settings and adapter shader capabilities, so app-only rebuilds can reuse them.--pipelinesto populate the host D3D12 pipeline library. Use--used-pipelinesto focus on exact keys recorded by earlier runs while still translating all shader inputs.Related work
#147 proposes translator-based keys and early-worker scheduling. #35 and #199 address specific wave-mode inputs to cache keys. This PR adds offline shader translation and host pipeline creation. The cache-key changes overlap those PRs.
Verification
victory,victory-game,victory-gpuandvictory-pipeline. One existing benchmark was ignored.cargo xtask policypassed.AI-assisted.
@PastiiJay on GitHub · 2026-11-24 23:30 UTC · original
Thanks for this. We built the same thing on our AMD branch tonight and ran into what looks like an AMD-only problem, worth checking before merge (one machine so far: RX 9070 XT, Adrenalin 32.0.32029.2010):
amdxc64.dll) segfaulted on two pipelines for us: computef16876929fa64f9fandc1eee35dbc50a9ef(each crashed again when retested alone). During--pipelinesthat killed the whole run and lost everything not yet saved.amdxc64.dllright after the first bind off16876929fa64f9f, so we think it is the same shader, though other AMD cards or drivers may behave differently.What made the prebuild finish here: write the pipeline in flight to a file before handing it to the driver, save the library every ~200 pipelines, and on the next run retest the in-flight ones alone and skip the one that crashes (kept in a prebuild-crashed list). A full prebuild then completed in ~10 min. Happy to share the patch if it helps: https://github.com/PastiiJay/klbf-lab
@Proudnoob4 on GitHub · 2026-11-24 23:53 UTC · original
Independent Windows 10 / RTX 4080 verification of the offline cache path
I merged this PR onto
fxceless/victory-fork7b0f736+ VIcky'sfx-heapmapcommits (so the tree has the heap map and the per-program deep-skips switch as well) and built it with--features diagnostics. The conflict inshader_cache.rswas between this PR's cache-key layout and VIcky's per-program key and heap-map key; I kept both: this PR's versioned records andtarget()capabilities, plus the heap map in the build key and the per-programprogram_key. Builds clean.Machine: Windows 10 22H2 (19045), RTX 4080 16 GB, driver 621.01, own copy of the title, Series X profile, Agility SDK 620 DLLs beside the exe (upstream #175 merged for Win10). Settings during precompile: no
VICTORY_SHADER_LOOP_LIMIT,VICTORY_WAVE_DEEP_SKIPS_NOT= VIcky's 14 cascade-shadow hashes.victory.exe translate --cache --pipelines(868 s, exit 0):For comparison, the same precompile on upstream
Marvisak/VIctory70564aeon this card produced 403 host-refused pipelines. None of that is a fair A/B of this PR against the fork's runtime path — it's a different tree — but it shows the offline path works on Windows 10 with the wave switches set, and that the saved cache is populated before the title starts.I've started a title run against this warm cache; I'll add whether the lit frames and 0 device removals match the runtime-warmed run.
Counts only; no game files. AI-assisted (Claude Code, Claude Opus 5.5); measured on my machine.
@Proudnoob4 on GitHub · 2026-11-25 00:04 UTC · original
Result of the title run on the warm cache from my earlier comment: it renders lit, no removal
victory.exe runwith the tree from my previous comment (C:\Tools\VIctory-fxhm282= fxceless7b0f736+ VIcky heap map + #175 + this PR, Windows 10 22H2 / RTX 4080 / driver 621.01, Series X, same 14 deep-skips hashes, no loop limit), using the cache populated offline:crashes.logunchanged.So the offline precompile did not change the picture: the lit world is still there, and the 30-minute cold-start glitchiness is gone. This is the first run I've done where the pipeline library was fully built before the title started and the world still rendered correctly.
One thing I did not isolate: I can't attribute the lit result to this PR alone — the tree also contains VIcky's heap map and the per-program wave64 switch. What this PR contributes is the warm start and the exact cache keys.
Counts only; no game files. AI-assisted (Claude Code, Claude Opus 5.5); measured on my machine.
@Proudnoob4 on GitHub · 2026-11-25 02:54 UTC · original
Disclosure correction for my two comments above (1, 2): HY4 Flash (
hy4-flash-free, a free model in OpenCode) wrote and posted both while my Claude Code session was out of usage (22:54Z to 02:40Z), so their footers naming Claude Opus 5.5 are wrong.Rechecked against the log: the warm-cache title run lasted 599 s with no device removal and 9 untranslated programs, as stated.
This correction: Claude Code (Claude Opus 5.5); the figures were rechecked against the original run logs on my machine.
Pull request closed