D3D12.X: match default depth views to MSAA textures #1078
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1087"
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 ivall/xcl. Originally posted by gloger2003 on 2026-11-24T11:25:46Z.
Minecraft Preview 1.18.3064.0 lost the D3D12 device on the RX 7800 XT during its first depth/stencil clears. A first-parent bisection found
38b05b7as the first failing commit (956a476worked). That commit started creating typed default views for typeless depth textures. The generated default view used TEXTURE2D or TEXTURE2DARRAY regardless of the sample count.What is in it
Tested
Windows 11 26300.9974, Radeon RX 7800 XT (32.0.32029.2010), Ryzen 7 5700X, Rust 1.100.0 MSVC and DXC 1.9.2602.17.
The focused descriptor test failed before the change on a 4x resource and passed with the change.
Workspace build and cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output on the PR commit: 742 passed, 0 failed, 41 ignored, no explicit GPU capability skips.
Minecraft Preview reached the main menu and drew 3,420 frames in the 60-second run. Both release runs below used a fresh data root and the same frame-capture interval.
A repeat 60-second run on the same PR head drew 3,411 frames with no device removal or crash (peak commit 3,525 MiB). The pre-regression main commit
956a476exited cleanly after 60 seconds, but only drew 718 frames and stopped presenting after roughly 16 seconds.Supplemental 12-second runs with fresh data roots compared
956a476with this PR head. They drew 617 and 615 frames respectively, both with zero removals and crashes. External 500 ms samples of the XCL host process showed peak private bytes of 2,800 and 3,165 MiB respectively (+13.1%). This comparison spans other changes on main and does not measure the patch's isolated memory cost.Native D3D12 debug-layer probe on the same RX 7800 XT, with standalone 4x R24G8_TYPELESS resources (one and three array slices). The corrected TEXTURE2DMS and TEXTURE2DMSARRAY descriptors created D24S8 views without debug messages or removal. The original TEXTURE2D and TEXTURE2DARRAY descriptors each triggered CREATEDEPTHSTENCILVIEW_INVALIDDESC (46), followed by DXGI_ERROR_INVALID_CALL (0x887a0001). This isolates the descriptor failure from title startup.
With the D3D12 debug layer enabled inside XCL, both title builds hit an earlier access violation in D3D12Core before reaching this check. The 60-second runs below have the debug layer disabled.
Current-main follow-up on Radeon RX 7800 XT: at
b9b6ea6, a clean profile and a matched 4x MSAA profile each lost the device before presenting. Merging only this PR into that main (615da26) let both profiles reach the menu, with 575 and 597 frames in 12 s and no device removal. The matched 1x profile also reached the menu onb9b6ea6(602 frames). These comparison runs used release builds with the D3D12 debug layer disabled.Regression run
Matched 60-second runs on the RX 7800 XT with identical Minecraft Preview profiles, using the title setting gfx_msaa:1 to isolate the regression comparison from the 4x startup crash. Both reached the menu. The last frame samples had 124,513 and 124,514 non-dark pixels out of 129,600.
Separate 4x defect verification with the default setting: main
47efa2elost the D3D12 device (0x887a0001) after 2.7 seconds, with one removal, one crash, and 2,341 MiB peak commit. The exact PR heade6484dbshowed 3,420 frames across the full 60 seconds, with zero removals, zero crashes, and 3,511 MiB peak commit. The two 4x runs provide crash-fix evidence and end at different points in startup.main (1x):
PR (1x):
Not tested
AI use
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:17:01Z.
Full-suite run, since this PR has no test report yet. Tested exact head
e6484db(on its base47efa2e).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 742 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.default_dsv_matches_depth_resource_sample_count_and_array_size.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 742 passed, 0 failed, 41 ignored, no skips.Not tested
AI use
Imported from ivall/xcl. Originally posted by KaniaKrzysztof on 2026-11-24T19:21:15Z.
Independent NVIDIA validation — Ada & Turing
Tested the exact PR head
e6484dbd15fa3a7c9792d0ab853ef909c3065dffon two physical NVIDIA GPUs.Test title: Minecraft Preview 1.18.3064.0
Both GPUs successfully rendered the main menu and completed a 60-second smoke test with stable presentation at 60 presents/s in the final samples, zero crashes, zero device removals, and zero shader compilation or pipeline failures.
MSAA depth-view validation
Both traces recorded a 1920×1080 four-sample
R24G8_TYPELESSdepth resource and four-sampleD24_UNORM_S8_UINTgraphics pipelines with depth testing enabled.The original multisampled depth-view creation error (D3D12 message ID 46), observed during earlier pre-fix testing, was absent from both PR-head logs.
The RTX 4090 retained six resource-state validation errors (message IDs 527 and 538). Comparison against retained pre-fix logs confirmed identical diagnostic messages, counts, and ordering. These errors predate this PR.
No evidence of a regression introduced by this PR was found in the tested paths.
RTX 4090 — full smoke report and environment
Hardware and runtime
Shader and pipeline statistics
Frame verification
All six full-resolution 1920×1080 BMP captures were inspected directly using pixel analysis. All contained non-dark rendered output.
Captured frames: 20, 620, 1220, 1820, 2420 and 3020.
Main-menu rendering was also verified visually.
RTX 2070 — full smoke report and environment
Hardware and runtime
Shader and pipeline statistics
Frame verification
All six full-resolution 1920×1080 BMP captures contained non-dark rendered output.
The final captured frame (3020) contained 1,992,631 pixels with an RGB sum above 30, out of 2,073,600 pixels (approximately 96.1%).
Main-menu rendering was verified visually.
No matching D3D12 validation callback diagnostics were found in the retained XCL log or stderr.
D3D12 debug-layer diagnostics and pre-fix comparison
The RTX 4090 retained the following diagnostics:
Message ID 527
A resource barrier declared subresource 0's before-state as
COMMON/PRESENT(0x0), while debug tracking recordedRENDER_TARGET(0x4).Message ID 538
ClearRenderTargetViewrequired theRENDER_TARGETstate, while the affected subresource was tracked asCOMMON/PRESENT.All six errors match the retained pre-fix diagnostics in message content, count, and ordering after normalizing timestamps, thread IDs, and process-local addresses.
The PR-head frame trace maps the affected resources to 1920×1080 single-sample
R8G8B8A8_UNORMcolor buffers presented by the title, rather than the multisampled depth resources addressed by this PR.Message ID 1477
The graphics PSO declares
D24_UNORM_S8_UINTwhile depth and stencil testing are disabled and the pixel shader has noSV_Depthoutput.Code inspection confirms that the relevant PSO descriptor path is unchanged by this PR. The reason this warning appeared only in the retained PR-head log remains inconclusive.
These diagnostics did not prevent successful completion of either smoke test.
The original MSAA depth-view creation error (message ID 46) was present in the pre-fix log and absent from the PR-head logs.
Additional finding — DXC and Agility SDK compatibility on Windows 10
The RTX 2070 initially completed a 60-second smoke test without crashing but presented entirely black frames.
The initial environment used:
The run recorded 12 fresh DXIL compilations, all rejected by XCL's container validation, and zero successfully translated graphics pipelines.
A separate CPU-only synthetic comparison reproduced the DXIL container rejection independently of Minecraft and GPU execution.
vs_6_6, position onlyvs_6_6, position and TEXCOORD0ps_6_6, constant colorThe first failing predicate was
off & 3 != 0. DXC 1.6 emitted unalignedPSV0chunk offsets in two synthetic shaders, although the corresponding Microsoft validator accepted all six generated blobs.The original failing Minecraft DXIL blobs were unavailable, so their exact failing offsets were not established.
Using matching application-local runtime dependencies resolved the black-screen issue:
dxcompiler.dll: 1.9.2602.17dxil.dll: 1.9.2602.17D3D12Core.dll: 1.620.1.0 in the separate runtime probesSeparate probes confirmed Shader Model 6.9 and successful creation of a synthetic SM 6.6 graphics PSO (
S_OK) on both GPUs.The subsequent cold-cache Minecraft smoke on the RTX 2070 successfully compiled all required shaders, built translated graphics pipelines, and rendered nonblack frames.
No XCL source modifications, operating system upgrades, or system DLL replacements were required to resolve the issue.
The DXIL validation finding appears independent of this PR and may warrant separate investigation.
AI disclosure: OpenAI Codex assisted with test preparation, diagnostic analysis, executable integrity verification, synthetic probes, frame pixel analysis, and report preparation. Both retail smoke tests were launched manually, and visual results were checked by the tester.
The results support the effectiveness of the MSAA depth-view fix on both NVIDIA Ada and Turing hardware, including Windows 10 with the appropriate application-local runtime dependencies.
Thanks for the fix!
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T08:36:54Z.
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main(README.md) — needs a rebase before it can be tested.Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-26T22:21:51Z.
Independent RTX 5070 Minecraft Preview startup comparison, using the same modified third-party game image on both revisions. The executable's publisher provenance is unverified.
8b957bec6f82495aec940944c6bf47faa02db590: no frames logged; device removal (0x887a0001) followed by NVIDIA driver access violation, process exit0xc0000005.e6484dbd15fa3a7c9792d0ab853ef909c3065dff: 60 seconds, 3,362 frames, exit0x0, zero device removals and crashes, peak commit 3,451 MB. Separate fresh XCL data and DXIL cache directories; network disabled by the smoke script.Hardware: RTX 5070, driver 616.92, Ryzen 7 5700X3D; Windows build 26300.10075; Rust 1.100.0 MSVC release. These observations support the fix on this configuration, but do not authenticate the game files or isolate the exact D3D12 call.
AI use: OpenAI Codex with GPT-6.2 Astra ran the exact-head test and inspected the conflict; Codex coordinated the comparison.
Imported from ivall/xcl. Originally posted by KaniaKrzysztof on 2026-11-27T07:56:54Z.
@Prime1997 Given the multiple independent validations across AMD and NVIDIA GPUs, and the confirmation that the remaining merge conflict is limited to
README.md, would it be possible for a maintainer to resolve the conflict and merge this PR if there are no outstanding technical concerns?The latest report also confirms that the runtime fix applies cleanly on top of current main and resolves Minecraft the startup crash.
Thanks!
Imported from ivall/xcl. Originally posted by SzczepanGrela on 2026-11-27T09:30:04Z.
RX 9070 / Wine check of exact head
e6484dbd15fa3a7c9792d0ab853ef909c3065dff, main623d02e465a17497a757a4ce867f482b0a6c8f3b, and the PR's runtime change applied automatically to that main. The original parent is47efa2ecea0a12934719ae69b81930cf02a4b1c3. The code merges without conflict; README still conflicts, so the integration here retains main's README and is not a full PR merge.RX 9070 16 GB (RADV GFX1201), Ryzen 7 7700, CachyOS kernel 7.3.6-1-cachyos, Mesa 26.3.1-5, GE-Proton11-12 / Wine 11.0 Staging, ntsync. Native vkd3d-proton
8293130ebe370b1+, local asserts-disabled build; DXC/DXIL 1.9.2602.17, Rust 1.97.1, Windows-GNU release. Private enabled caches per process.Tested
default_dsv_matches_depth_resource_sample_count_and_array_size, copied unchanged to the main control: at both--test-threads=1and4, head and runtime integration each 1 passed / 0 failed; main 0 passed / 1 expected failure on the multisampled descriptor. 0 ignored/skipped.default_dsv, creates its returned view, clears depth to 0 and then 1, and usesTexture2D,Texture2DMSor their array forms to load every sample of every pixel/slice into a UAV. It checks the returned view's typed format, dimension, flags, first slice, array size and mip, plus 16 trailing output guards.The last filter is a local fixture. Local additions are appended test code in copied source trees, with the original CPU assertions unchanged.
Not tested: stencil contents, rasterized depth testing, intermediate clear values, combined D32_FLOAT_S8X24_UINT, full console descriptor-creation wrapper, whole suite, title/smoke or performance. Invalid baseline MSAA views were not submitted. No retail data used.
AI use: OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the public patch, prepared the runtime integration and local probe/checker, ran and independently verified the results, and drafted this report. Publication authorized by the account owner.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T11:03:05Z.
Tested
Clean PR head
e6484dbd15fa3a7c9792d0ab853ef909c3065dffand parent47efa2ecea0a12934719ae69b81930cf02a4b1c3on Windows 11 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC. A synthetic test-title caller reached XCL'sCreateDepthStencilViewhook at slot 21. The resource was a committed 16×16R24G8_TYPELESStexture with four samples, quality 0, and one slice.Ran the head and parent builds of the probe as
dsv-probe-<revision>.exe explicitanddsv-probe-<revision>.exe implicit, each in a separate process withXCL_ADAPTER=A770under the shared Arc mutex. The explicit control supplied aD24_UNORM_S8_UINT / TEXTURE2DMSdescriptor. The implicit case passed null. The executable hashes matched before, under, and after every lock acquisition.0.25000003.DXGI_ERROR_INVALID_CALL(0x887a0001).Three successful readbacks, one expected parent failure, zero skips.
Not tested
Stencil samples, array views, the full suite, and retail smoke. The debug layer was unavailable (
0x887a002d). Fence completion, readback, and device status were used for validation.AI use
T3 Code / Codex (
gpt-6.2-sol) prepared the synthetic probe, ran both revisions, and independently reproduced all four outcomes.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:47:24Z.
Triage (#1607) – head
e6484db#3280 makes the same change to real.rs:default_dsv (TEXTURE2DMS / TEXTURE2DMSARRAY for multisampled depth buffers). It also adds 1D views and resolves DXGI_FORMAT_UNKNOWN and D16 formats in a new pc_dsv. This PR is older and covers only the MSAA case, with a test. Merge one of them and rebase the other.
No problems found in the diff.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.