Shaders: wire VICTORY_D3D12_DEBUG into emit::host pipeline checks #2568
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!2568
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2568/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?
@fuzeofficlal on GitHub · 2026-11-25 16:01 UTC · original
fuzeofficlal:fix/shader-host-d3d12-debug-reasons-2537→main· +313 −5 · 2 files · 1 commits · closed without mergingRefs #2537
Summary
Wires
VICTORY_D3D12_DEBUGand D3D12 debug-layer message extraction intovictory_shader::emit::host::Host(crates/victory-shader/src/emit/host.rs) sovictory translate --pipelinesreports driver/runtime refusal reasons instead of bareHRESULTstrings:ID3D12Debug::EnableDebugLayerat most once per process (Once) inHost::newwhenVICTORY_D3D12_DEBUGis set and not"0", before any device is created (matchingvictory-gpu's switch semantics without adding fields topub struct Host).CreateComputePipelineState,CreateGraphicsPipelineState, andCreatePipelineStateinHost::capture_pipeline_error:ID3D12InfoQueue1::RegisterMessageCallbackscoped via an RAII guard into athread_local!slot so multi-threadedtranslate --pipelinesworkers sharing the adapter's singletonID3D12Devicecapture their own synchronousERROR/CORRUPTIONmessage without lock contention or cross-thread queue clearing.ID3D12InfoQueueread/clear path whenID3D12InfoQueue1is unavailable.<debug reason> (<hresult>)) sotranslate --pipelines --listoutput and failure tally buckets stay well-formed.Verification
crates/victory-shader/tests/d3d12_debug_pipeline.rstestingVICTORY_D3D12_DEBUG=1andVICTORY_D3D12_DEBUG=0across compute, graphics, and mesh pipeline refusals (single-threaded and 4-thread concurrent workers) on both SM 6.6 hardware (RTX 5090) and D3D12 WARP.cargo clippy --workspace --all-targets -- -D warningscargo xtask policy@Marvisak on GitHub · 2026-11-25 19:25 UTC · original
Automated triage for the maintainers.
Needs work: needs the maintainer's decision. It merges cleanly into
main. CI:checkpassing.With
VICTORY_D3D12_DEBUGset, this enables the D3D12 debug layer invictory_shader::emit::host::Host::new. Pipeline-creation errors from the compute, graphics and mesh paths then carry the debug layer's first error message (capture_pipeline_error, usingID3D12InfoQueue1callbacks with anID3D12InfoQueuefallback). Better error text for the shader test host is useful, but a few things need changing:victory-gpuenables the debug layer only indiagnosticsbuilds (host::create), while here it turns on whenever the variable is set. Please gate it on the existingdiagnosticsfeature or explain the difference.tests/d3d12_debug_pipeline.rsre-runs its own binary as a child process, which needs the maintainer's decision.GS:hunk inpipeline_withonly reformats code. Please drop it.#2560 and #2562 address the same issue (#2537), so the maintainer may want to pick one.
Generated by Claude Code
@fuzeofficlal on GitHub · 2026-11-25 19:37 UTC · original
Closing in favor of #2562, which already addresses #2537 with
diagnosticsgating and--only <stages>and is markedtriage: merge candidate. No need to keep a duplicate open.Pull request closed