GPU: disable implicit stream depth test without a DSV format #2535
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!2535
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2535"
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-29 13:56 UTC · original
fuzeofficlal:fix/gpu-stream-omitted-depth-default→main· +159 −4 · 2 files · 1 commits · merged 2026-11-30 14:12 UTCSummary
When a
D3D12_PIPELINE_STATE_STREAM_DESComits both depth-stencil subobjects (DEPTH_STENCILkind11andDEPTH_STENCIL1kind21), D3D12's stream parser defaultsDepthEnabletoTRUEonly when aDSVFormatis present (!= DXGI_FORMAT_UNKNOWN) and toFALSEwhenDSVFormat == DXGI_FORMAT_UNKNOWN.Previously
GraphicsState::default()leftDepthEnable = TRUEunconditionally, soHostPipeline::newemitted an explicit depth-stencil state withDepthEnable = TRUEeven for color-only pipeline streams that omitted depth-stencil state and hadDXGI_FORMAT_UNKNOWN. On host D3D12 (for example, color-only streams usingForcedSampleCount > 0),CreateGraphicsPipelineState/CreatePipelineStaterefuses that explicitDepthEnable = TRUEstate withE_INVALIDARG(0x80070057), causing draws using the pipeline to be dropped.Changes
kind 11 | 21) increate_stream(crates/victory-gpu/src/pipeline.rs) and callGraphicsState::apply_stream_defaults(has_depth_stencil)once all subobjects are parsed (independent of subobject order relative toDSVFormatkind16).GraphicsState::apply_stream_defaults(crates/victory-gpu/src/pipeline/host.rs), setDepthEnable = FALSEwhen!has_depth_stencil && self.depth_format == DXGI_FORMAT_UNKNOWN.DXGI_FORMAT_UNKNOWNvsDXGI_FORMAT_D32_FLOAT, explicit kind11/21overrides, and color-only streams withForcedSampleCount = 1.Verification
cargo test --locked -p victory-gpu --lib pipeline::host::tests::omitted_stream_depth&explicit_stream_depth_overrides_dsv_default— pass on RTX 5090 (VICTORY_ADAPTER=NVIDIA,VICTORY_D3D12_DEBUG=1) and WARP (VICTORY_D3D12_WARP=1,VICTORY_D3D12_DEBUG=1).cargo clippy --locked -p victory-gpu --tests— 0 new warnings in touched files.cargo run --quiet --locked -p xtask -- policy --staged— pass.