Repository navigation
[upstream #1772] D3D12.X: default DepthEnable to false in stream_pipeline when DSVFormat is UNKNOWN - #360
Open
ufoptg wants to merge 1 commit into
Open
[upstream #1772] D3D12.X: default DepthEnable to false in stream_pipeline when DSVFormat is UNKNOWN#360ufoptg wants to merge 1 commit into
ufoptg wants to merge 1 commit into
Conversation
…at is UNKNOWN In eal::stream_pipeline, DepthStencilState.DepthEnable was unconditionally initialized to rue, even when a D3D12_PIPELINE_STATE_STREAM_DESC omitted DEPTH_STENCIL / DEPTH_STENCIL1 / DEPTH_STENCIL2 and had DSVFormat == DXGI_FORMAT_UNKNOWN (0). Per D3D12 pipeline state stream rules, default DepthEnable to alse when no depth-stencil subobject is provided and DSVFormat == DXGI_FORMAT_UNKNOWN, while keeping DepthEnable = true when a non-UNKNOWN DSVFormat is present and always honoring explicit depth-stencil subobjects. Part of xcl-dev#1488 (XCL-BT-034). Assisted-by: Antigravity (Gemini 4 Neon)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
real::stream_pipelinesoDepthStencilState.DepthEnabledefaults tofalsewhen aD3D12_PIPELINE_STATE_STREAM_DESComits theDEPTH_STENCIL/DEPTH_STENCIL1/DEPTH_STENCIL2subobject andDSVFormatisDXGI_FORMAT_UNKNOWN(0).Previously
stream_pipelineunconditionally initializedDepthEnable = true, violating D3D12 pipeline state stream defaults for graphics streams that neither bind a depth-stencil view nor supply a depth-stencil subobject.Part of xcl-dev#1488 (
XCL-BT-034).What is in it
crates/xcl/src/hle/d3d12x/real.rs:11,21,26) was present instream_pipeline.g.DepthStencilState.DepthEnable = false.into()when!has_depth_stencil && g.DSVFormat.0 == 0(DXGI_FORMAT_UNKNOWN). Streams with a non-UNKNOWNDSVFormatcontinue to defaultDepthEnable = true, and explicit depth-stencil subobjects are always preserved.stream_pipeline_defaults_depth_enable_from_dsv_formatcovering omitted/UNKNOWNDSVFormat, non-UNKNOWNDSVFormat, and explicitDEPTH_STENCILsubobjects.Regression run
Baseline (immediate parent
mainb9b6ea6, warm shader/PSO cache):This PR (
fix/stream-pipeline-depth-default, warm shader/PSO cache):Tested
Hardware: Windows 11 Pro for Workstations (Build 26300), Intel Core i9-9900K, 32 GB RAM, AMD Radeon RX 6800 (16337 MiB VRAM, Driver
32.0.21045.29003),rustc 1.100.0 (0ef1bc386 2026-11-09).cargo test -p xcl --lib stream_pipeline_defaults_depth_enable_from_dsv_format:1 passed; 0 failed; 0 ignored; 0 skipped.XCL_REQUIRE_GPU=wave64,mesh cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4:885 passed; 5 failed; 42 ignored; 0 skipped(3 pre-existing RDNA2placed_title_textures_share_vram_and_preserve_pixels+VRAM_TEST_LOCKcascades tracked in D3D12.X: map a one-slice title texture's packed mips where D3D12 addresses them xcl-dev/xcl#470, plus 2 unrelated skip-gated tests that fail whenXCL_REQUIRE_GPUis set:pso_measurement_compiles_an_exact_synthetic_recordneeding Windows Developer Mode andheap_window_out_of_memory_falls_back_to_the_switch_formneedingXCL_HEAP_WINDOWS=1)..\scripts\smoke.ps1 -Game '<game folder>\YouKnowWho'onb9b6ea62080cc62fc19e212033372d01c6214e5candfa567957075adedf382f0d2d9ef9d967ea3b914e(see Regression run above).Not tested
AI use
Antigravity (Gemini 4 Neon) implemented the
DepthEnabledefault check and unit test incrates/xcl/src/hle/d3d12x/real.rs, and ran the full test suite and paired smoke runs.Mirror of xcl-dev#1772 (auto-synced, do not edit).