GPU: register pipeline demand after asynchronous compilation timeout #1643
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!1643
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1643/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?
@santiago-andreiu on GitHub · 2026-11-24 20:19 UTC · original
<html>santiago-andreiu:nvidia-gpu-compatibility→main· +157 −27 · 2 files · 1 commits · closed without mergingProblem
Pipeline demand is currently recorded only when
ready()returns a successfully compiled pipeline.When a draw or dispatch exceeds the 500 ms waiting budget and the compilation worker completes afterward, the pipeline may never be registered in the early pipeline list unless another rendering operation requests it.
This can cause the same compilation delay to recur in subsequent runs.
Root Cause
Rendering demand and asynchronous compilation completion were not tracked independently. A successful compilation occurring after the waiting budget expired could therefore remain unregistered.
Implementation
Introduce independent atomic event tracking using
AtomicU8:REQUESTED: actual rendering demand has occurred.COMPILED: pipeline compilation has completed successfully.The operation that adds the second distinct event registers the pipeline through
note_used().This approach:
Supports either event ordering.
Prevents duplicate registration per
Pendinginstance.Excludes purely speculative warmups.
Excludes unsuccessful compilations.
Preserves pipeline publication through
OnceLock.Preserves the existing waiting budget, cache format and retention policy.
Modified Files
crates/victory-gpu/src/pipeline/make.rscrates/victory-gpu/src/pipeline/library.rsRegression Tests
Four CPU-only regression tests were added:
late_success_registers_demand_without_a_second_drawwarmup_registers_only_on_real_demand_and_only_oncefailed_compilation_never_registers_demanddemand_and_compilation_on_separate_threads_register_onceThe late-completion regression test was confirmed to fail before the correction and pass afterward.
Validation
Check | Result -- | -- Default GPU tests | 54 passed, 0 failed, 1 ignored GPU tests with all features | 57 passed, 0 failed, 1 ignored Workspace Clippy, default features | Passed Workspace Clippy, all features | Passed Repository asset policy | Passed Git diff check | PassedExisting rustfmt discrepancies were reproduced on the original code and were intentionally left unchanged.
Testing Environment
CPU: Intel Core i5-12600KF
GPU: NVIDIA GeForce RTX 3060 12 GB
RAM: 20 GB
OS: Windows x64
Known Limitations
This change does not recover rendering operations already discarded after a timeout.
A worker completing after the final cache snapshot during process termination may still produce a registration that is not persisted. Shutdown synchronization is intentionally outside the scope of this contribution.
No in-game rendering or performance improvements have been measured.
Related Work
PR #983 addresses the retention policy of the early pipeline list. This contribution addresses when successfully compiled pipelines become eligible for registration.
The changes are intended to complement each other.
Development Disclosure
Development and testing were assisted by OpenAI Codex. No proprietary game assets were used.
</html>@Marvisak on GitHub · 2026-11-25 01:22 UTC · original
Automated triage for the maintainers. Closing because this change is already in
main, ormainhas since replaced the code it patches.Already in main, and more: ready() lists a pipeline for an early start at its first use whether or not it was made in time (make.rs). Body is pasted HTML.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
@Marvisak on GitHub · 2026-11-25 01:33 UTC · original
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:crates/victory-gpu/src/pipeline/library.rs,crates/victory-gpu/src/pipeline/make.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
Pull request closed