fix(vk): the start-up bar counts the compute pipelines, not 100% through them #256
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!256
Loading…
Reference in a new issue
No description provided.
Delete branch "gab9281/Longshot:fix/startup-bar-compute"
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?
Why
On the first start after a shader preparation, the start-up screen sits at "100%, a few seconds left" for about 5 minutes (RTX 3060 Laptop), which looks like being stuck on the last shader. The bar counted only the noted pipelines, then stayed full while every compute program's pipeline was built.
What changed
precompile_warm()ingpu/vk/vk_draw.cpplists the compute programs' keys (program_cache_compute_keys()) before it starts. Both steps count on one total, the noted pipelines and then the compute pipelines, so the bar moves through the compute step instead of sitting at 100%. The work done is the same: only the count given to the bar changes.tests/test_warm_bounded.pychecks that the compute step reports its own progress against the whole. It fails on main, where it reportsprogress(total, total).Flags and settings
None.
Measurements
What changes is the number the start-up screen shows, not the time: the same pipelines are built in the same order. So the measurement is the bar's value at the start of the compute step, from the start-up log line, with the shaders' time on this PR for reference.
main:
36a12f6f(2026-11-13;precompile_warm's bar code is the same on main @514591a3, which this PR is on: main's renderer changes since, #234 and #260, are elsewhere invk_draw.cpp)this PR: fix/startup-bar-compute @ 2af5f18e (measured there;
82271725, the head now, changes only the count after a stopped noted step, which this start didn't have)Hardware: RTX 3060 Laptop (NVIDIA 620.70.06), Ryzen 7 6800H, 15 GB, CachyOS (Linux 7.3.3), KDE Wayland
Scene: the start-up screen of the first start after a preparation (
RX_VK_LOAD=create), default settingsMethod: the start-up screen's
vk: start-up: pipelines … of …log line once the noted pipelines are done, one start each, started throughgame-performanceHow to reproduce: prepare the shaders (a build with
--prepare-shaders), start the game, and watch the start-up screen andlongshot_log.txt36a12f6f29473 = 25346 noted + 4127 compute programs. The two starts had different numbers of noted pipelines (main's folder was prepared at another commit), and this start had the compute pipelines cached (11.3 s), so the times aren't compared. A run-to-run timing table wouldn't show anything: no pipeline is added or removed.
Testing
Tested:
82271725, rebased on main @514591a3with no conflict), a first start after a preparation. The start-up screen counted through the compute step to the end, with the log lines above.python -I -B tests/test_warm_bounded.pypasses, and fails on main.RX_CPM=<the CPM cache> python -I -B tests/run_all.pyat82271725(main @514591a3): 517 passed, 1 failed, 15 skipped (Windows only). The failure,tests/test_menu_i18n.py(a pt_BR text of a menu line main changed), fails on main514591a3too.Not tested:
precompile_warmisn't platform-specific). The game builds for Windows with llvm-mingw at2c2100d1(4:38, the same code on the main before); not run on Windows.Needs other testers:
None (this is the bar's count, the same on every GPU).
Screenshots
Nothing new on screen: the same start-up screen, with a percentage that keeps moving.
Risk and rollback
The progress callback gets a larger total. If the compute step is skipped (the preparation was stopped), the bar ends below 100%, as any stopped preparation does. Reverting the commit is enough.
Reviewer notes
The compute keys were already listed, after the noted pipelines; this lists them once, before.
A
/code-review(high) found 7 things:2c2100d1):total + computes_done); it now reportsdone + computes_done;total.precompile_run) already counts its notes, computes and fallbacks on one total. The time left comes from the bar's rate over the last 15 s (ProgressClock), so it slows down with the step instead of saying "a few seconds" for minutes. A weight per kind would change both paths and is a follow-up.prepare_guess) counts the computes play dispatched, not every kept one. The normal precompile has the same gap on a first start (computes_plan's "every kept one"). The bar never goes back, so at worst it holds still for a moment when the count replaces the guess. Same follow-up.Issues
None: found while testing #206 (the start-up screen "stuck on the last shader").
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
https://claude.ai/code/session_015KgSKoUqUvce5UXG89NBgi
WIP: fix(vk): the start-up bar counts the compute pipelines, not 100% through themto fix(vk): the start-up bar counts the compute pipelines, not 100% through them2c2100d1028227172508View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.