GPU: an empty pipeline library is not asked for pipelines it cannot have #1914
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!1914
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1914/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?
@fiestorra on GitHub · 2026-11-25 00:51 UTC · original
fiestorra:gpu/no-library-lookup-when-empty→main· +29 −7 · 1 files · 1 commits · closed without merging21 debug-layer warnings per boot that are not defects, from asking an empty library
Found by counting what a real run says rather than by reading the code: on a first boot, the host's D3D12 debug layer logs this once per pipeline —
— 21 times in a 290-second run (RTX 4090, driver
32.0.16.2124, session 1,diagbuild with the debug layer, four fixes merged so the run survives the removal). Each one is the pipeline library being asked for a pipeline it cannot have: the library was made from an empty blob, so it stores nothing yet, andLoadGraphicsPipeline/LoadComputePipelinemust fail for every name.Twenty-one warnings that are not defects cost real attention: they are the same lines a reader uses to spot the ones that are, which is how they got noticed here.
The change: the library records the names it has stored during the run, and while its blob is empty it is only asked for one of those. A library loaded from a blob is asked as before, since it can hold any name — there is no way to enumerate it.
Measured before and after, same machine, same driver, same session, same build otherwise:
does not have a pipeline storedThe middle row is why the first attempt was not enough:
added > 0becomes true after the first pipeline is stored, and then every later name is asked again. The names are what matters, not whether the library is non-empty.Recipe:
cargo test -p victory-gpu --locked78 passed, 1 ignored;cargo test --workspace --locked23 suites ok with only the pre-existingvictory-hle::modules::display::tests::sdr_and_display_deferralsfailing in this headless session (what #1630 fixes);clippy --workspace --all-targetswith and without--all-featuresclean under-D warnings;rustfmt --check15 hunks on the file against 16 onmain, none of them on the lines added here.One method note, because it cost me a measurement: the debug layer's text arrives with ANSI escapes inside it, so a plain substring search for
id=971can miss lines that contain it. Count the message (does not have a pipeline stored), not the id.No game data is involved: a pipeline name hash, warning counts and test counts.
Written with an AI assistant.
@Marvisak on GitHub · 2026-11-25 08:17 UTC · original
Automated triage for the maintainers.
Merge candidate.
In
crates/victory-gpu/src/pipeline/library.rs,pipeline()now skipsloadwhen the library was made from an empty blob and the name wasn't stored during this run. Onmain,open()sets_blobto empty exactly when it falls back tomake(&[]): either there was no blob, or the host rejected it. Such a library can only hold the names stored since then. Lookups into a library loaded from a blob are unchanged. The name is recorded only afterStorePipelinesucceeds, and the "store or make" path after a failed load is the same as before. So the behaviour stays the same and the debug-layer id 971 noise goes away.Nit, not blocking: the new field uses
std::collections::HashSetalthoughHashSetis already imported, and the field comment and thehas_pipelinesdoc say the same thing twice.CI:
checkpasses.Generated by Claude Code
@Marvisak on GitHub · 2026-11-25 22:04 UTC · original
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing because it removes the message in one case only. Message 971 (
LOADPIPELINE_NAMENOTFOUND) is the expected result of every miss in the library's load-then-store design; a library loaded from a blob still gets it for each new pipeline, which covers every warm run. The complete fix for the debug-layer noise is one deny-list entry for that id on the info queue inHost::new, rather than new state in the library. This also editslibrary::pipeline, which three other open PRs change.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed