perf(vk): warm listed compute pipelines on Most #1567
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
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/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1567
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:perf/listed-compute-preparation"
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?
Type: perf · Risk: medium · Tested on: CachyOS Linux, RTX 3090 · Needs: Windows and AMD gameplay coverage
TL;DR
A fresh installation using Most now asks the graphics driver to build compute pipelines seen in gameplay. In the first cold comparison, the shader-program phase fell from 226.8 seconds to 128.7 seconds. Both runs translated the full seed and retained every compute shader variant.
Breakdown
Why
Most already builds graphics pipelines based on gameplay observations. A first preparation nevertheless asked the driver for 9,927 compute pipelines. The narrower selection already has precedent on Mesa Intel in #426.
What changed
gpu/vk/vk_draw.cppshare the same compute selection. Every translated texture variant of a selected program is warmed.Measurements
Verdict: The first cold run saved 98.1 s (43.3%) in the shader-program phase. Total cold preparation took 516.7 s on main and 453.7 s on the change (63.0 s, 12.2% faster). The queue flagged system CPU pressure on the changed run. Treat this pair as preliminary while the interleaved repetitions run.
Hardware: AMD Ryzen 9 7900X, 32 GB RAM, GeForce RTX 3090, NVIDIA 620.70.06, CachyOS Linux.
Scene: Builder shader preparation for a fresh install, offscreen, before the title.
Method: One cold probe per side. Separate empty application and driver caches, same local game seed and shipped state list, same base packs, exclusive timing queue and 12 usable CPU threads. Wall time is the shell timer around the game, excluding queue time. The graphics and final compute pass took 288.8 s on main and 323.2 s on the changed run.
How to reproduce: In a private runtime with empty game and driver caches, run
./longshot --prepare-shaders --compile-shaders mostunderscripts/job_queue.py run <name> --mode timing. Compare thevk: preparedsummaries.7daafa7a1deb9770Flags and settings
RX_VK_COMPILE_SHADERS=mostRX_VK_PRECOMPILE_COMPUTESallrestores full compute coverageTesting
Tested: The game's actual shader preparation on NVIDIA/Linux. Focused tests exercise both warming paths, overrides and marker compatibility. The initial full suite reported 35 failures on both the branch and main. Rechecking with the build toolchain and Vulkan headers.
Not tested: Windows, AMD, Intel hardware and first-use latency for an unlisted dispatch.
Must be tested:
Risks
What could break: A compute program missing from the shipped and learned lists must create its driver pipeline on first dispatch. Its translated shader remains available.
Turning it off: Set
RX_VK_PRECOMPILE_COMPUTES=allwhen preparing and launching.Compatibility: Existing translated program caches and graphics pipeline notes remain readable. A Builder rechecks older warm markers when their compute coverage is unknown.
Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.docs/tested/for each new measured run (format indocs/tested-configurations.md).tests/that reads changed source updated in this PR, not weakened.Tested in game: CachyOS Linux, RTX 3090, NVIDIA 620.70.06: ran the game executable with --prepare-shaders --compile-shaders most from empty Longshot and driver caches. The changed shader-program phase finished in 128.7 s, translating 38,809 programs with zero failures and retaining all 9,927 compute variants.
Both cold probes reached @@done shaders and built 32,655 noted graphics pipelines. Total wall time was 516.7 s on main and 453.7 s on the change. The timing queue flagged CPU pressure during the changed run, so the description labels this first pair preliminary.
WIP: perf(vk): warm listed compute pipelines on Mostto perf(vk): warm listed compute pipelines on MostData points from a Steam Deck OLED and an RTX 5090. Both are single passes on seeded or warm driver caches, so they're observations, not a measured cold-install speedup.
Steam Deck OLED / RADV, main
430eef4f, Most79d4a143log: 9,689 computes from 4,059 programs, a 287.1 s shader-program phase and a 10.2 s cache pass.79d4a143control also spent ~89 s in load at create (110.6 s total), so that fallback build was already there before this PR. That does NOT establish that this PR has no start-up or first-dispatch regression.430eef4flaunch peaked at 11,208 MiB (about 10.9 GiB). That isn't unique physical or GPU memory.Windows / RTX 5090, Most
Follow-up on the Field admission refusals: the recurring “1 jobs queued” pattern aligns with the renderer’s scheduled glibc heap check/trim (
mallinfo2/malloc_trim), which also exists on544229a2; window alignment explains why it was sampled in some runs and not others. It is not evidence of a newly translated Field shader. Our original admission decisions and exclusions are unchanged; separate program-census refusals remain, so there is still no admitted Field comparison pair.