Shaders: wire VICTORY_D3D12_DEBUG into emit::host pipeline checks #2566
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2568"
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?
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T16:01:38Z.
Refs #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 policyImported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T19:25:52Z.
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
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T19:37:41Z.
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