GPU: a pipeline a list binds again is not kept and named again #3167
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!3167
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3167"
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?
@pablogonz12 on GitHub · 2026-11-26 10:49 UTC · original
pablogonz12:perf/pipeline-kept-once→main· +85 −4 · 4 files · 1 commits · openWhat
draw::State::bindkeeps a host pipeline and its root signature so the title may release thembefore it submits the list, and notes the pipeline's name. It did that at every change of
pipeline, even when the list had already kept that same pipeline: two
QueryInterfaces, threelock/unlocks and a
Stringhash on the submitting thread for nothing.Now
HostList::bind_pipeline(crates/victory-gpu/src/host.rs) keeps and names a host pipeline thefirst time the list binds it. The set of kept addresses is its own type
(
crates/victory-gpu/src/bound.rs) with tests that need no device, and it is cleared with the rest ofthe list's deferred state, so a list that is reset binds (and keeps) them again. Two host pipelines
one address apart are two: the list keeps the old one, so its address names no other.
SetPipelineStateitself is unchanged (it was already only called when the host pipeline changes);this removes the redundant keeps and name lookups around it.
Credit
From avatarmanz/VIctory-7900XTX ab86ef7f3
("A pipeline a list binds again is not kept and named again"), which is from
Belobug/VIctory-Belobug-AMD 92d353f8 (romainhedouin), GPL-3.0.
Numbers
Offline, no game run (
cargo xwin test -p victory-gpu --lib bound, Wine):10,000 binds of five pipelines keep and name 5 (not 10,000); a reset binds them again; pipelines an
address apart are two. What a repeat no longer costs is two interface queries, three lock/unlocks and
one name lookup on the submitting thread per repeated bind; how many of those a frame has is not
measured here.
Off switch
None: the list still keeps and names every pipeline it binds, just once each instead of once per bind.
Other hardware
This is host-side bookkeeping: no shader, no D3D12 call and no default path changes, so the path on
NVIDIA and on Windows is the same as before minus redundant keeps. Checked here on RX 9070 XT / Mesa
RADV / Wine only. Not tested on NVIDIA hardware - a Windows or NVIDIA test run would be welcome.
Gates
cargo xwin clippy --target x86_64-pc-windows-msvc -p victory-gpu --all-targets -- -D warnings: clean.cargo xwin test --target x86_64-pc-windows-msvc -p victory-gpu --lib bound(Wine): 3 new tests pass.cargo xtask policy: 192 files ok.Not tested in a game run.
@Dukestar69 on GitHub · 2026-11-26 11:09 UTC · original · approved these changes
Verified on RTX 5090 against
origin/main(63bcca4):cargo test -p victory-gpu --lib bound:: -- --test-threads=1: passed.cargo test -p victory-gpu --lib draw:: -- --test-threads=1: 20/20 passed;host::tests: 30/30 passed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 192 files ok.Cleanly deduplicates repeated pipeline binds within a command list.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
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.