victory: run makes the title's shaders and pipelines before it starts, with a progress window (once; kept on disk) #2907
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2907
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2907"
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?
@0xkn0wh3r3 on GitHub · 2026-11-25 23:38 UTC · original
0xkn0wh3r3:tools/startup-prebuild→main· +840 −8 · 12 files · 3 commits · opentranslate --cache --pipelinesmakes every shader and pipeline a title can ask for, but only when someone runs it. Otherwise the first runs translate shaders at first use, so draws wait, and make pipelines on worker threads, so draws are dropped meanwhile. That happens again after every translator change.With this PR,
run --executemakes them itself, before the title starts, with a progress window. It does nothing on later starts unless something changed.What
Which files. The title's
shaders.rpf, its executable and its DLLs: the files the README'stranslate --cache --pipelinesline names (startup::shader_files).Done once, kept on disk. The shader cache and the pipeline library keep the work, as before. A stamp in the cache folder (
prebuild/<title dir hash>.txt) records what was finished:victory_gpu::adapter_identity).A start with nothing new reads the stamp and goes on at once.
The work. What isn't done runs on a thread of its own, using the existing code (
translate::warm,prebuild::run).How long the title waits is set by
VICTORY_PREBUILD:shaders(default)alloffPipelines the title doesn't wait for are made behind it on half the processor's threads. Their progress shows in the window caption, after the frame rate (new
victory_gpu::set_caption_status).Progress window (
splash): plain GDI on its own thread, since the GPU is busy with the work. Four times a second it shows:Esc, or closing the window, starts the title at once; the rest goes on behind it.
How progress reaches it.
translate::report, which both halves already use for their console progress lines, also feeds a smallprogressstate, and their summary lines go into its log.Tests
progress: progress line and time-left estimate, durations, the log keeping its last lines.startup:VICTORY_PREBUILDmodes;splash: the window's lines, and the window opening and closing on its own thread. That test caught a crash: GDI was given empty text for blank lines.cargo test -p victory: 23 passed.cargo clippy -p victory --all-targetsand-p victory-gpu --all-targetsare clean, with and without--features diagnostics.Not verified
VICTORY_PREBUILD=allavoids the overlap.@alexandruiulian201-bot on GitHub · 2026-11-25 23:48 UTC · original
The CI failure is because
apps/victory/Cargo.tomladdedwindows-syswithout updatingCargo.lock, and CI runs with--locked.Note: running
cargo check --workspace(orcargo update --workspace) will add just thewindows-sysentry forvictoryinCargo.lockwithout bumping unrelated dependency versions (avoidcargo generate-lockfile)@0xkn0wh3r3 on GitHub · 2026-11-26 00:05 UTC · original
@fuzeofficlal thanks, that was a real hang. Fixed in
69a0d48a: the wait is nowstartup::ready(mode, work.is_finished(), shaders_done), so the title starts once the worker has ended for any reason, including a panic, or once its shaders are done in the default mode. The new testthe_title_starts_when_the_work_is_over_or_its_shaders_are_donecovers both. The earlier CI failure was a missingCargo.lockupdate, fixed in2710e9c8.@Marvisak on GitHub · 2026-11-26 02:19 UTC · original · edited 2026-11-26 07:23 UTC
Automated triage for the maintainers.
Thanks for the reply. The offer to make the prebuild opt-in (
VICTORY_PREBUILD=on) is noted. Thewindows-sysdependency and whether the launcher owns the prebuild step are still the maintainer's decision, so the verdict stays needs work: needs the maintainer's decision.CI: passing.
Generated by Claude Code
@0xkn0wh3r3 on GitHub · 2026-11-26 06:42 UTC · original
Understood: the
windows-sysdependency and whether the launcher should own the prebuild step and its window are your call. If you'd rather not change the default, I can make the prebuild opt-in (VICTORY_PREBUILD=on) sorun --executebehaves as before unless asked.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.