GPU: a refused pipeline says what the debug layer answered #2471
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!2471
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2471/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?
@HoLa-Lee on GitHub · 2026-11-25 14:16 UTC · original
HoLa-Lee:gpu/log-refused-pipeline-reason→main· +6 −6 · 1 files · 1 commits · closed without mergingWhat was wrong with the first form of this
Host::log_messagesalready writes every stored message to the log as its ownD3D12: ...warning before clearing the queue — it only returns the first error. So the answer was in the log, on a line after the refusal it explains. My first description said it was thrown away; it was not, and the patch now also drops a stray UTF-8 byte order mark it had added to line 1 of the file.What this does
All three places that refuse a pipeline (compute, mesh and graphics) call
log_messagesand drop the return value. This binds it and puts the first error in the refusal line itself, so the reason comes before the line that says a pipeline was refused:ust let messages = host.log_messages(); tracing::warn!(error = %e, ?shaders, ?messages, "host pipeline refused");Diff is the three call sites (6 lines changed); no behaviour beyond which line the text appears on.
Why it is worth it
In some cases that line is the whole diagnosis. On this machine, with the debug layer installed, the software rasteriser refused 458 compute pipelines in a single boot of a title, and every one of them said:
ID3D12Device::CreateComputeShader: Shader wants wave lane count of 64 but maximum wave lane count for device is 4. To check for support, check device caps via the CheckFeatureSupport() APIwhich turns "that world drops 1,935 draws a frame on WARP" into one sentence.
How it was checked
cargo check -p victory-gpu --profile diag --features diagnosticson the rebased branch, and by the run the message above comes from. Independent runs on this PR (RTX 5070 Ti: 144 passed / 2 pre-existing #1744 failures; WARP: 146 passed; clippy clean; asset policy 182 files ok; RTX 4060: 141 passed / 2 pre-existing) were reported in the comments below.`Host::log_messages` already writes every stored message to the log as its own `D3D12: ...` warning before clearing the queue; it only returns the first error. So the answer was in the log, but on a line after the refusal it explains. All three places that refuse a pipeline (compute, mesh and graphics) call it and drop the return value; this binds it and puts the first error in the refusal line itself: let messages = host.log_messages(); tracing::warn!(error = %e, ?shaders, ?messages, "host pipeline refused"); No behaviour changes beyond which line the text appears on. That line is the whole diagnosis in some cases. On this machine, with the debug layer installed, the software rasteriser refused 458 compute pipelines in a single boot of a title, and every one of them said: ID3D12Device::CreateComputeShader: Shader wants wave lane count of 64 but maximum wave lane count for device is 4. To check for support, check device caps via the CheckFeatureSupport() API which turns "that world drops 1,935 draws a frame on WARP" into one sentence. Checked with `cargo check -p victory-gpu --profile diag --features diagnostics` and by the run the message above comes from.@Bj0rnis on GitHub · 2026-11-25 14:35 UTC · original
Independent Windows 11 hardware + WARP verification of #2471 at
12c2263c(cleangit merge-treewithorigin/main940d32f6, Rust 1.98.1 MSVC):cargo test -p victory-gpu --features diagnostics --lib --locked -- --test-threads=1-> 144 passed, 2 failed, 2 ignored (only the 2 pre-existing #1744 NVIDIA 1M view-heap baseline failures also present onmain940d32f6).VICTORY_D3D12_WARP=1): 146 passed, 0 failed, 2 ignored (1.00s).cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings-> 0 warnings.cargo xtask policy-> 182 files ok.Not tested: live game workload / reproducing a refused pipeline with
VICTORY_D3D12_DEBUG=1.AI-assisted test run and summary.
@Marvisak on GitHub · 2026-11-25 15:52 UTC · original · edited 2026-11-25 16:48 UTC
Automated triage for the maintainers.
Merge candidate. In
crates/victory-gpu/src/pipeline/host.rs, the three places that refuse a pipeline (compute, mesh, graphics) now callHost::log_messagesbefore the warning. They put its return value, the debug layer's first error, into the "host pipeline refused" line. Behaviour is otherwise unchanged:log_messagesstill logs every stored message as its ownD3D12: ...line.Both points from the last review are fixed:
Optional nit: the field is named
messages, but it holds only the first error (Option<String>). A name likedebug_errorwould read more accurately.CI: no check runs on this head; the workflow needs a maintainer's approval. Contributors report RTX 5070 Ti, WARP and RTX 4060 runs with only the known #1744 failures.
Generated by Claude Code
@Vedoxdev123 on GitHub · 2026-11-25 15:54 UTC · original
Tested on Windows with AMD Ryzen 5 5600X + NVIDIA GeForce RTX 4060:
cargo test -p victory-gpu --lib-> 141 passed; 2 failed; 2 ignoredAll tests in this branch pass on RTX 4060; the only 2 failures are the known 1,000,000 view heap cap tests (
dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_viewsfrom #1744).@Marvisak on GitHub · 2026-11-25 22:10 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 can attribute a message to the wrong pipeline.
Host::log_messagesalready logs every stored debug-layer message as its own warning. The info queue is device-wide and several pipeline workers refuse pipelines at the same time, so the first error one worker drains may belong to another worker's pipeline.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
@HoLa-Lee on GitHub · 2026-11-25 22:25 UTC · original
Understood, and agreed - closing it is right.
Host::log_messagesalready logs every stored message as its ownD3D12: …warning, so the debug layer's reason for a refusal is in the log either way; the only thing this PR added was putting the first drained message on the refusal's own line, and with the queue being device-wide and several workers refusing at once, that message can belong to another pipeline. Attribution was the whole point of the change, so without it there is nothing left worth merging.Evidence that the separate lines are enough, from this machine: with
VICTORY_D3D12_DEBUG=1the refusal of a mesh/pixel pipeline was named exactly, without this PR -maximum wave lane count for device is 32) and the shader-visible descriptor heap limit (1,000,000), all from the per-message warnings.The
messagesnaming nit is moot now. Thanks for the careful second look - the misattribution case is real and I had not considered the workers running at the same time.Pull request closed