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).
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 |
…est without a DSV format # Conflicts: # crates/victory-gpu/src/pipeline/host.rs
…d merged tests with the branch Marvisak#2811 on this branch turned `Lower::mode16` into `FpMode16 { round, denorm }` and moved the MODE update into `FpMode16::after`. Three refreshed PRs still used the old `Option<u8>` and the removed `round16_after`, so victory-shader did not build: - Marvisak#2782 reads MODE[3:2] for `s_getreg_b32`: it now reads `mode16.round`. - Marvisak#2886 updates the mode inside whole-wave sections: it now calls `mode16.after`, as the main lowering loop does. - Marvisak#2917 rounds toward zero when FP_ROUND_16_64 is 3: it now checks `mode16.round`. Tests from Marvisak#2152, Marvisak#2817, Marvisak#2952, Marvisak#3038 and a `mod.rs` test used the older `lower::Parts`, `HostShader`, `Translated` and `emit::emit` signatures; they get the branch's fields (`Target::ANY`, no console flow, no native f16, `written_root_uavs`, `threads`, `atomics64`) as the other tests do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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