Repository navigation
GPU: disable implicit stream depth test without a DSV format - #2952
fuzeofficlal wants to merge 1 commit into
Conversation
|
Independent test report for Setup: Windows 11 Pro 10.0.26200, Rust 1.98.1. Built with PR tests:
Live WARP matrix (local, uncommitted probe): RTV R8G8B8A8,
The change only affects streams with no depth-stencil subobject and no DSV format. A depth-stencil subobject is still honored when explicitly present, in either order relative to the DSV format. That includes an explicit DepthEnable=TRUE with FSC=1, which WARP refuses on both revisions. A DSV format with no depth-stencil subobject still enables depth. The plain color-only pipeline builds on both revisions. Broader checks at head:
Limits:
This is an independent test only, not a review. Prepared with Claude Code (Claude Opus 5.5). |
Dukestar69
left a comment
There was a problem hiding this comment.
Tested merged onto origin/main (63bcca4) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP):
cargo test -p victory-gpu --lib pipeline::: 26 passed, 0 failed (RTX 5090 hardware, including all 3 new tests:omitted_stream_depth_defaults_to_dsv_format,explicit_stream_depth_overrides_dsv_default, andomitted_stream_depth_builds_forced_sample_count_pipeline).VICTORY_WARP=1 cargo test -p victory-gpu --lib pipeline::host::tests: 7 passed, 0 failed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Defaulting DepthEnable to false when a pipeline stream omits both a depth-stencil subobject (11 | 21) and a DSV format (DXGI_FORMAT_UNKNOWN) matches D3D12 stream defaults and unblocks ForcedSampleCount > 0 pipelines cleanly.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
… UAV writeback - Marvisak#2952: a stream with neither a depth-stencil subobject nor a depth format defaults to disabled depth testing (apply_stream_defaults) - Marvisak#2931: feature-level query rejects count == 0 and writes 0 on UNSUPPORTED - Marvisak#2961: reject shader-visible RTV and DSV heap creation - Marvisak#2865: guard placed heaps against null and layouts against empty planes - Marvisak#2954: lower v_bfe_u32/v_bfe_i32 to one Ubfe/Ibfe - Marvisak#2948: a root UAV a shader only reads is not written back (written_root_uavs through Shader/Lowered/HostShader + cache VSH2) Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
kotekompotek
left a comment
There was a problem hiding this comment.
Verified: a pipeline-state stream without a DEPTH_STENCIL subobject left DepthEnable at the default true, which fails CreateGraphicsPipelineState when no DSV format is present — the ForcedSampleCount test hits exactly that. The fix preserves D3D12 stream semantics: explicit depth subobject still wins (kind 11/21 for DESC/DESC1), a DSV format alone keeps DepthEnable=true.
|
Automated triage for the maintainers. Merge candidate. CI: passing. Recommending a look, not approving. Generated by Claude Code |
Summary
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) inread_stream(crates/victory-gpu/src/pipeline.rs) and callGraphicsState::apply_stream_defaults(has_depth_stencil)once all subobjects are parsed (so subobject order relative toDSVFormatkind16does not matter, and both runtimecreate_streamand offlinePrebuildstay identical).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 live D3D12 host PSO creation for a color-only stream withForcedSampleCount = 1.Testing (Windows 11, Rust 1.98.1)
cargo test --locked -p victory-gpu --lib -- pipeline::(RTX 5090,VICTORY_D3D12_DEBUG=1): 26/26 passedcargo test --locked -p victory-gpu --features diagnostics --lib -- pipeline::(RTX 5090,VICTORY_D3D12_DEBUG=1): 29/29 passedcargo test --locked -p victory-gpu --features diagnostics --lib -- pipeline::(WARP,VICTORY_D3D12_WARP=1,VICTORY_D3D12_DEBUG=1): 29/29 passedcargo clippy --locked -p victory-gpu --tests -- -D warnings(default and--features diagnostics): 0 warningscargo xtask policy:191 files ok