D3D12.X: XCL_DEPTH_PLANE_NOW and XCL_TWIN_TRACE for depth twins in UAV #3481

Closed
Foniass wants to merge 2 commits from upstream-pr/3481 into main
Foniass commented 2026-11-30 00:01:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-11-30T00:01:18Z.


Draft, stacked on #3480; only the top commit (ae2976f6) belongs here.

The switch and the trace that came with raylitebull's amd-dev 0e68d606, split from #3480 because CONTRIBUTING wants diagnostics and env switches on their own:

  • XCL_DEPTH_PLANE_NOW=0 turns #3480's following of draws off (on by default): the copies are made around the title's transitions only, as before.

  • XCL_TWIN_TRACE=<height> logs, for depth buffers of that height (736: a mirror's view in the retail title), the first 600 lines of:

    • transitions into and out of UNORDERED_ACCESS;
    • UAVs made on twins;
    • twin copies;
    • DSV binds and the draws that test against them.

    A world run with it shows whether the title takes #3480's path.

What is in it

  • crates/xcl/src/hle/d3d12x/depth_uav.rs, list_x.rs, real.rs: the switch and the trace lines (the R24G8 copy pass's lines are left out, as main has no R24G8 twin)

Tested

  • NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2114), AMD Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug tests, release smoke
  • cargo test -p xcl --lib depth_uav: 23 passed, 0 failed
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on ae2976f6, rebased on main 86e86fcb (5070 Ti): 2893 passed, 0 failed, 51 ignored. SKIPPED: 28 notices, almost all no wave64 (the others: no D3D12 debug layer, heap windows off, driver cache needs Developer Mode). The narrower runs listed here are from before the rebase.
  • Retail title: 60 s smoke run below, both switches unset

Regression run

main:

xcl-smoke v1
commit: 86e86fcb33f94fa5d0c809d9b50af7b84bf49cce
gpu: NVIDIA GeForce RTX 5070 Ti
title: 3cb1d8e0
seconds: 60
exit: 0x0
frames shown: 1608 (PresentX 1608)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15766 MB

this PR:

xcl-smoke v1
commit: ae2976f6e6924ec4f15d52232f61d46e1837abe8
gpu: NVIDIA GeForce RTX 5070 Ti
title: 3cb1d8e0
seconds: 60
exit: 0x0
frames shown: 1604 (PresentX 1604)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17611 MB

Not tested

  • The trace in a world run (XCL_TWIN_TRACE=736)
  • Two of #3480's tests fail when XCL_DEPTH_PLANE_NOW=0 is set in the environment of the test run

AI use

  • Claude Code with Claude Opus 5.5: split the switch and trace out of the port, ran the tests and the smoke runs, wrote this description.
  • Original code: raylitebull's amd-dev 0e68d606.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5556578957 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3481). Originally posted by [Foniass](https://github.com/Foniass) on 2026-11-30T00:01:18Z. --- Draft, stacked on #3480; only the top commit (`ae2976f6`) belongs here. The switch and the trace that came with raylitebull's amd-dev `0e68d606`, split from #3480 because CONTRIBUTING wants diagnostics and env switches on their own: - `XCL_DEPTH_PLANE_NOW=0` turns #3480's following of draws off (on by default): the copies are made around the title's transitions only, as before. - `XCL_TWIN_TRACE=<height>` logs, for depth buffers of that height (736: a mirror's view in the retail title), the first 600 lines of: - transitions into and out of UNORDERED_ACCESS; - UAVs made on twins; - twin copies; - DSV binds and the draws that test against them. A world run with it shows whether the title takes #3480's path. **What is in it** - `crates/xcl/src/hle/d3d12x/depth_uav.rs`, `list_x.rs`, `real.rs`: the switch and the trace lines (the R24G8 copy pass's lines are left out, as main has no R24G8 twin) **Tested** - NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2114), AMD Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug tests, release smoke - `cargo test -p xcl --lib depth_uav`: 23 passed, 0 failed - `cargo test --workspace --no-fail-fast -- --test-threads=4` on ae2976f6, rebased on main 86e86fcb (5070 Ti): 2893 passed, 0 failed, 51 ignored. SKIPPED: 28 notices, almost all `no wave64` (the others: no D3D12 debug layer, heap windows off, driver cache needs Developer Mode). The narrower runs listed here are from before the rebase. - Retail title: 60 s smoke run below, both switches unset **Regression run** main: ``` xcl-smoke v1 commit: 86e86fcb33f94fa5d0c809d9b50af7b84bf49cce gpu: NVIDIA GeForce RTX 5070 Ti title: 3cb1d8e0 seconds: 60 exit: 0x0 frames shown: 1608 (PresentX 1608) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15766 MB ``` this PR: ``` xcl-smoke v1 commit: ae2976f6e6924ec4f15d52232f61d46e1837abe8 gpu: NVIDIA GeForce RTX 5070 Ti title: 3cb1d8e0 seconds: 60 exit: 0x0 frames shown: 1604 (PresentX 1604) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17611 MB ``` **Not tested** - The trace in a world run (`XCL_TWIN_TRACE=736`) - Two of #3480's tests fail when `XCL_DEPTH_PLANE_NOW=0` is set in the environment of the test run **AI use** - Claude Code with Claude Opus 5.5: split the switch and trace out of the port, ran the tests and the smoke runs, wrote this description. - Original code: raylitebull's amd-dev `0e68d606`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Foniass commented 2026-12-02 08:05:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T08:05:57Z.


Closing together with #3480, whose diagnostics this adds.

AI-assisted: Claude Code (Claude Opus 5.5), posted by Foniass.

<!-- greyfinch-sync:ivall/xcl:comment:7339000828 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3481#issuecomment-7339000828). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T08:05:57Z. --- Closing together with #3480, whose diagnostics this adds. AI-assisted: Claude Code (Claude Opus 5.5), posted by Foniass.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!3481
No description provided.