D3D12.X: console UAV clears (#53 / #54) get the slots' PC descriptors #1291

Manually merged
github merged 1 commit from gh-pr/1291/head into gh-pr/1291/base 2026-11-26 04:49:45 +00:00
Owner

@⁠emirduran707 on GitHub · 2026-11-24 14:21 UTC · original
emirduran707:d3d12x-clear-uav-console-handles → main · +184 −0 · 2 files · 1 commits · merged 2026-11-25 16:32 UTC

Console command lists' ClearUnorderedAccessViewUint / Float (#53 / #54) went straight to the PC's #49 / #50 (console_remap). No XCL code ran on them, so the console's descriptor handles reached the PC unchanged. Console code gets those handles from heap #9 / #10, which return console heap slot memory in unified memory, not PC descriptors. So the GPU handle was not in the bound shader-visible heap, and the CPU handle pointed at the console's T# words. Microsoft's documentation of ClearUnorderedAccessViewUint: the GPU handle "must be in a shader-visible descriptor heap, which must be set on the command list via SetDescriptorHeaps", and the CPU handle must be "in a non-shader visible descriptor heap that references an initialized descriptor". Only the opt-in console-list replay (XCL_CONSOLE_LISTS=1) translated them.

clear_uav_uint_x / clear_uav_float_x now take #53 / #54:

  • When both handles are console view slots with a PC UAV, the PC clear gets the slots' PC descriptors: the UAV in the shader-visible heap and its CPU-only copy, as the replay uses.
  • When neither is a console slot, the call passes through unchanged.
  • Anything else (one of each, a heap that is not shader-visible, a sampler slot) is skipped and logged once.

What is in it

  • crates/xcl/src/hle/d3d12x/list_x.rs:
    • the two methods and uav_clear_handles;
    • test uav_clear_handles_translate_console_slots, with no device;
    • test clear_uav_with_console_handles_clears_the_slots_view on WARP. It registers an R32_UINT buffer UAV in a console heap, clears it with the console handles and 0xDEADBEEF, and reads it back.
  • crates/xcl/src/hle/d3d12x/real.rs: slots 53 / 54 in console_slots(Kind::CommandList), and test console_clear_uav_slots_translate_handles.

Tested

  • AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release
  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 on 1a1a07f (rebased onto main 1a0bbe3): 1251 passed, 2 failed, 46 ignored; 8 SKIPPED (6 in lower_dxil::tests::{f16,f32}_programs_on_the_gpu; heap_window_out_of_memory_falls_back_to_the_switch_form; pso_measurement_compiles_an_exact_synthetic_record)
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3) fail identically on unmodified main 1a0bbe3 on this GPU (seeds 722 and 1599).
  • without the slots in console_slots, console_clear_uav_slots_translate_handles fails; with a pass-through decision (what the default path did), the WARP test ends the test process with STATUS_ACCESS_VIOLATION inside the PC clear; with the change all three pass

Regression run

main:

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1454 (PresentX 1454)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 18610 MB

this PR:

xcl-smoke v1
commit: 1a1a07f9d444f04dd20331c194d4006b89ac327e
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1545 (PresentX 1545)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 20222 MB

Not tested

  • A title's own UAV clears on hardware; the smoke title's run is a regression check only.
  • Rects are passed on as given (the replay drops them).
  • NVIDIA and Intel GPUs.

AI use

  • Claude Code with Claude Opus 5.5: found the problem, wrote the change, the tests and this description; I reviewed the diff and ran the tests and smoke runs above.
  • Claude Code with Claude Opus 5.5: rebased the change onto main 1a0bbe3 (a conflict in the tests of crates/xcl/src/hle/d3d12x/list_x.rs; both tests kept) and reran the suite and smoke runs above.

🤖 Generated with Claude Code

**@⁠emirduran707** on GitHub · 2026-11-24 14:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291) `emirduran707:d3d12x-clear-uav-console-handles` → `main` · +184 −0 · 2 files · 1 commits · merged 2026-11-25 16:32 UTC Console command lists' `ClearUnorderedAccessViewUint` / `Float` (#53 / #54) went straight to the PC's #49 / #50 (`console_remap`). No XCL code ran on them, so the console's descriptor handles reached the PC unchanged. Console code gets those handles from heap #9 / #10, which return console heap slot memory in unified memory, not PC descriptors. So the GPU handle was not in the bound shader-visible heap, and the CPU handle pointed at the console's T# words. Microsoft's documentation of `ClearUnorderedAccessViewUint`: the GPU handle "must be in a shader-visible descriptor heap, which must be set on the command list via SetDescriptorHeaps", and the CPU handle must be "in a non-shader visible descriptor heap that references an initialized descriptor". Only the opt-in console-list replay (`XCL_CONSOLE_LISTS=1`) translated them. `clear_uav_uint_x` / `clear_uav_float_x` now take #53 / #54: - When both handles are console view slots with a PC UAV, the PC clear gets the slots' PC descriptors: the UAV in the shader-visible heap and its CPU-only copy, as the replay uses. - When neither is a console slot, the call passes through unchanged. - Anything else (one of each, a heap that is not shader-visible, a sampler slot) is skipped and logged once. **What is in it** - `crates/xcl/src/hle/d3d12x/list_x.rs`: - the two methods and `uav_clear_handles`; - test `uav_clear_handles_translate_console_slots`, with no device; - test `clear_uav_with_console_handles_clears_the_slots_view` on WARP. It registers an R32_UINT buffer UAV in a console heap, clears it with the console handles and 0xDEADBEEF, and reads it back. - `crates/xcl/src/hle/d3d12x/real.rs`: slots 53 / 54 in `console_slots(Kind::CommandList)`, and test `console_clear_uav_slots_translate_handles`. **Tested** - AMD Radeon RX 9060 XT (driver 32.0.31044.16), Ryzen 5 5600, Windows 11 Pro 26300, Rust 1.100.0; tests debug, smoke release - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` on 1a1a07f (rebased onto `main` `1a0bbe3`): 1251 passed, 2 failed, 46 ignored; 8 SKIPPED (6 in `lower_dxil::tests::{f16,f32}_programs_on_the_gpu`; `heap_window_out_of_memory_falls_back_to_the_switch_form`; `pso_measurement_compiles_an_exact_synthetic_record`) - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`, `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3`) fail identically on unmodified `main` `1a0bbe3` on this GPU (seeds 722 and 1599). - without the slots in `console_slots`, `console_clear_uav_slots_translate_handles` fails; with a pass-through decision (what the default path did), the WARP test ends the test process with `STATUS_ACCESS_VIOLATION` inside the PC clear; with the change all three pass **Regression run** main: ``` xcl-smoke v1 commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1454 (PresentX 1454) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 18610 MB ``` this PR: ``` xcl-smoke v1 commit: 1a1a07f9d444f04dd20331c194d4006b89ac327e gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1545 (PresentX 1545) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 20222 MB ``` **Not tested** - A title's own UAV clears on hardware; the smoke title's run is a regression check only. - Rects are passed on as given (the replay drops them). - NVIDIA and Intel GPUs. **AI use** - Claude Code with Claude Opus 5.5: found the problem, wrote the change, the tests and this description; I reviewed the diff and ran the tests and smoke runs above. - Claude Code with Claude Opus 5.5: rebased the change onto `main` `1a0bbe3` (a conflict in the tests of `crates/xcl/src/hle/d3d12x/list_x.rs`; both tests kept) and reran the suite and smoke runs above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The command list's console #53 / #54 (ClearUnorderedAccessViewUint /
Float) were remapped straight to PC #49 / #50 (`console_remap`) with no
override, so a title's call reached the PC method with its handles as
they were. Console code takes its descriptor handles from heap #9 / #10,
which give it the address of its console heap slots in unified memory
(`console_heap::start`), not PC descriptor handles: the PC clear got a
GPU handle outside the bound shader-visible heap and a CPU handle
pointing at T# words. Only the opt-in console-list replay
(XCL_CONSOLE_LISTS=1) translated them.

(same arguments as the PC methods): two console slots become their PC
UAVs (GPU: `pc_gpu_uav`, in the heap lists bind; CPU: `pc_uav`, in the
title's CPU-only heap), as the replay does; two PC handles go through as
they are; a mix, or a slot without a shader-visible UAV, is skipped and
logged once.

Test on WARP: an R32_UINT buffer UAV in a CPU-only and a shader-visible
console heap, #53 with the console handles and 0xDEADBEEF. With the
handles passed through (the old path) the test process dies with
STATUS_ACCESS_VIOLATION in the PC clear; with the translation the buffer
reads back 0xDEADBEEF.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:49:44 +00:00
github manually merged commit 1a1a07f9d4 into gh-pr/1291/base 2026-11-26 04:49:45 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 14:33 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib new UAV clear tests: 3 passed, 0 failed.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 14:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7134570357) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - cargo test -p xcl --lib new UAV clear tests: 3 passed, 0 failed. Thanks!
Author
Owner

@⁠WASDeKeys on GitHub · 2026-11-24 14:34 UTC · original · edited 2026-11-24 14:36 UTC

Thanks for running this. Is retail-title the actual folder name, or did you anonymize the title? I’m trying to reproduce the smoke test—could you share the title name and confirm it was an authorized, unpacked Xbox build? I am very confused as to how to run the smoke test. No game files needed. @⁠emirduran707

**@⁠WASDeKeys** on GitHub · 2026-11-24 14:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7134593051) · edited 2026-11-24 14:36 UTC Thanks for running this. Is retail-title the actual folder name, or did you anonymize the title? I’m trying to reproduce the smoke test—could you share the title name and confirm it was an authorized, unpacked Xbox build? I am very confused as to how to run the smoke test. No game files needed. @⁠emirduran707
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 14:39 UTC · original

Full-suite run on NVIDIA and AMD (the checks above are NVIDIA only). Tested exact head 0fd1b66 (on its base 47efa2e).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 744 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: uav_clear_handles_translate_console_slots, clear_uav_with_console_handles_clears_the_slots_view, console_clear_uav_slots_translate_handles.
  • Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 744 passed, 0 failed, 41 ignored, no skips.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 14:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7134725844) Full-suite run on NVIDIA and AMD (the checks above are NVIDIA only). Tested exact head `0fd1b66` (on its base `47efa2e`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **744 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `uav_clear_handles_translate_console_slots`, `clear_uav_with_console_handles_clears_the_slots_view`, `console_clear_uav_slots_translate_handles`. - Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **744 passed, 0 failed, 41 ignored**, no skips. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠madaraXor on GitHub · 2026-11-24 15:29 UTC · original

Retail title check on AMD RDNA2: the upscaler's UAV clears no longer fault in the driver

This covers the "Not tested: a title's own UAV clears on hardware" point, with the retail title (1.0.2.1).

Setup: AMD Radeon RX 6700 XT 12 GB (RDNA2), driver 32.0.21045.29003, Ryzen 5 5600X, 16 GB RAM, Windows 10 Pro 22H2 (19045.6466), Agility SDK 1.620.2, Rust 1.90.0, release build. device_type = "lockhart", XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_PRELOAD=0 XCL_PSO_WAIT_MS=50 XCL_DXC_THREADS=3, menus driven with XCL_PRESS_AT into the story start. The title needs #684 to get this far on this machine (it stops in xg::copy_from at ~535 s without it), so every build below has it.

Without the change (main 47efa2e + #684 + #615 + #495), two runs: when the world starts, amd_fidelityfx_upscaler_xbox.dll calls ID3D12PipelineState1::#11, then the list's #53 from +0x72f4, and the process ends with 0xc0000005 in amdxc64.dll+0x3167ae (read at address 0xffffffffffffffff), the upscaler's +0x72f4 / +0x138b4 on the stack: at 598 s and at 600.9 s.

With it, exact head 0fd1b66 merged with main 930e8b4 + #684 + #615 + #495 + #1288 + #1315/#1316 (none of them touches the clears): the upscaler starts at 607.9 s (#11 stub, then its passes), no ClearUnorderedAccessView … not done warning in the whole run, and no fault there. The same title ran on for another 50 s and then ended in a different place, amdxc64.dll+0x6f30ce (read at 0x24) with only driver frames on the stack, while the driver compiled the world's compute pipelines with local video memory at 13.9 GB on this 12 GB card – not the clears.

An equivalent change of mine (same slots, same translation through console_heap::slot) on b8b1f49 + #684 + #615 + #495 passed the same point twice, at 595.9 s and 676.1 s.

Not tested: NVIDIA / Intel with the retail title; whether the clears give the right values (nothing on screen to check yet – the title is still on its loading art at that point here).

AI use: Claude Code, Claude Opus 5.5 ran the builds and runs on my PC and wrote this report. Counts, times and offsets only.

**@⁠madaraXor** on GitHub · 2026-11-24 15:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7136107980) **Retail title check on AMD RDNA2: the upscaler's UAV clears no longer fault in the driver** This covers the "Not tested: a title's own UAV clears on hardware" point, with the retail title (1.0.2.1). **Setup:** AMD Radeon RX 6700 XT 12 GB (RDNA2), driver 32.0.21045.29003, Ryzen 5 5600X, 16 GB RAM, Windows 10 Pro 22H2 (19045.6466), Agility SDK 1.620.2, Rust 1.90.0, release build. `device_type = "lockhart"`, `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_PRELOAD=0 XCL_PSO_WAIT_MS=50 XCL_DXC_THREADS=3`, menus driven with `XCL_PRESS_AT` into the story start. The title needs #684 to get this far on this machine (it stops in `xg::copy_from` at ~535 s without it), so every build below has it. **Without the change** (`main` `47efa2e` + #684 + #615 + #495), two runs: when the world starts, `amd_fidelityfx_upscaler_xbox.dll` calls `ID3D12PipelineState1::#11`, then the list's #53 from `+0x72f4`, and the process ends with `0xc0000005 in amdxc64.dll+0x3167ae (read at address 0xffffffffffffffff)`, the upscaler's `+0x72f4` / `+0x138b4` on the stack: at 598 s and at 600.9 s. **With it**, exact head `0fd1b66` merged with `main` `930e8b4` + #684 + #615 + #495 + #1288 + #1315/#1316 (none of them touches the clears): the upscaler starts at 607.9 s (#11 stub, then its passes), no `ClearUnorderedAccessView … not done` warning in the whole run, and no fault there. The same title ran on for another 50 s and then ended in a different place, `amdxc64.dll+0x6f30ce` (read at 0x24) with only driver frames on the stack, while the driver compiled the world's compute pipelines with local video memory at 13.9 GB on this 12 GB card – not the clears. An equivalent change of mine (same slots, same translation through `console_heap::slot`) on `b8b1f49` + #684 + #615 + #495 passed the same point twice, at 595.9 s and 676.1 s. **Not tested:** NVIDIA / Intel with the retail title; whether the clears give the right values (nothing on screen to check yet – the title is still on its loading art at that point here). AI use: Claude Code, Claude Opus 5.5 ran the builds and runs on my PC and wrote this report. Counts, times and offsets only.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 16:01 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib -- --test-threads=1: all passed, 0 failed, 21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodified main.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 16:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7137010287) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib -- --test-threads=1`: all passed, 0 failed, 21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodified `main`.) Thanks!
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-24 19:32 UTC · original

@⁠WASDeKeys retail-title is a folder link (junction) I made so that the smoke block does not carry a commercial title's name. I'd rather not name it here. Any GDK title you own and have installed works the same way:

  1. Build: cargo build --release -p xcl
  2. Run: .\scripts\smoke.ps1 -Game <the title's install folder> (60 s by default, networking off). It prints the xcl-smoke block at the end.

For a PR, run it once on a build of main and once on the PR's head, on the same title. "Building and usage" in the README covers running a title.

Written with Claude Code (Claude Opus 5.5).

**@⁠emirduran707** on GitHub · 2026-11-24 19:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7142244122) @⁠WASDeKeys `retail-title` is a folder link (junction) I made so that the smoke block does not carry a commercial title's name. I'd rather not name it here. Any GDK title you own and have installed works the same way: 1. Build: `cargo build --release -p xcl` 2. Run: `.\scripts\smoke.ps1 -Game <the title's install folder>` (60 s by default, networking off). It prints the `xcl-smoke` block at the end. For a PR, run it once on a build of `main` and once on the PR's head, on the same title. "Building and usage" in the README covers running a title. Written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠jessenic on GitHub · 2026-11-25 08:24 UTC · original

Test report: on a retail title, this PR removes a GPU hang at the first frame of the world. DRED put the hang at a ClearUnorderedAccessView on a title list. With this PR the title gets past it to the intro cutscene's title card.

Setup: RTX 5070 Ti 16 GB (driver 610.88), Ryzen 7 9700X, 32 GB, Windows 11 Pro 26300, rustc 1.97.0, release. Retail title, Series S profile (device_type = "lockhart"), story load with scripted A presses. Every compute pipeline was precompiled into the driver cache, including the > 8 MB ones (XCL_PIPELINE_MAX_KB=0), so no build runs during the load.

Tree: a local integration branch on main 8f5fca5, with #1323, #1143, #1221, #765, #1405, #1464, #751, #684, #1110, #615, #1315/#1316, #495, #1993, #2009, #929 and a local port of #640 (it conflicts with main). This PR's commit 0fd1b66 was cherry-picked on top cleanly as 62e86ec. Local diagnostics only, none of them touching clears. All runs used XCL_HEAP_WINDOWS=1 XCL_DRED=1 XCL_COHERENT_HEAPS=sparse:256 XCL_PAGE_BUDGET_MB=5120.

runs how they end DRED at the removal
without this PR 3 0x887a0006 (DEVICE_HUNG), 1–5 s after the last presents one list stopped at 34 of 108 operations in all three, breadcrumbs 15 7 15 >13 15 13 (ClearUnorderedAccessView in progress); the other lists not started; no page fault
with this PR 2 0x887a0005 (DEVICE_REMOVED), about 1 s after the last presents, 8 s after the title's first #101 no list in progress, no page fault
  • In the runs without the PR, #1323's dispatch markers showed no dispatch or draw started and not done (draws and indirect draws were marked too, locally), because clears are not marked. DRED was needed to name the operation.
  • The clears came from the title's own lists (console slots #53 / #54), not from console-list replay: a local switch that logged and skipped the replayed clears (console_list.rs) saw none in the failing runs.
  • With this PR, a run with the D3D12 debug layer showed the world's first frames and then the intro cutscene's title card before the removal.
  • cargo test -p xcl --lib -- uav_clear clear_uav on this tree: 3 passed, 0 failed (uav_clear_handles_translate_console_slots, clear_uav_with_console_handles_clears_the_slots_view, console_clear_uav_slots_translate_handles).

What still ends the run (not this PR): the 0x887a0005 removal with nothing in flight, right after the intro's title card, as in other reports on #505. The debug layer's last 64 messages before it hold only errors already present in the menus (1047, 527) and a graphics pipeline created 15 ms before.

Not tested: main alone (the hang needs the rest of the stack to reach the world on this card); AMD; Series X; more than 2 runs with the PR. This was not a scripts/smoke.ps1 regression run.

AI use: Claude Code (Claude Opus 5.5) ran the runs on the machine above, read the DRED output and wrote this report.

**@⁠jessenic** on GitHub · 2026-11-25 08:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7156990402) **Test report: on a retail title, this PR removes a GPU hang at the first frame of the world. DRED put the hang at a `ClearUnorderedAccessView` on a title list. With this PR the title gets past it to the intro cutscene's title card.** **Setup:** RTX 5070 Ti 16 GB (driver 610.88), Ryzen 7 9700X, 32 GB, Windows 11 Pro 26300, rustc 1.97.0, release. Retail title, Series S profile (`device_type = "lockhart"`), story load with scripted A presses. Every compute pipeline was precompiled into the driver cache, including the > 8 MB ones (`XCL_PIPELINE_MAX_KB=0`), so no build runs during the load. **Tree:** a local integration branch on `main` `8f5fca5`, with #1323, #1143, #1221, #765, #1405, #1464, #751, #684, #1110, #615, #1315/#1316, #495, #1993, #2009, #929 and a local port of #640 (it conflicts with `main`). This PR's commit `0fd1b66` was cherry-picked on top cleanly as `62e86ec`. Local diagnostics only, none of them touching clears. All runs used `XCL_HEAP_WINDOWS=1 XCL_DRED=1 XCL_COHERENT_HEAPS=sparse:256 XCL_PAGE_BUDGET_MB=5120`. | | runs | how they end | DRED at the removal | |---|---|---|---| | without this PR | 3 | `0x887a0006` (DEVICE_HUNG), 1–5 s after the last presents | one list stopped at 34 of 108 operations in all three, breadcrumbs `15 7 15 >13 15 13` (`ClearUnorderedAccessView` in progress); the other lists not started; no page fault | | with this PR | 2 | `0x887a0005` (DEVICE_REMOVED), about 1 s after the last presents, 8 s after the title's first `#101` | no list in progress, no page fault | - In the runs without the PR, #1323's dispatch markers showed no dispatch or draw started and not done (draws and indirect draws were marked too, locally), because clears are not marked. DRED was needed to name the operation. - The clears came from the title's own lists (console slots #53 / #54), not from console-list replay: a local switch that logged and skipped the replayed clears (`console_list.rs`) saw none in the failing runs. - With this PR, a run with the D3D12 debug layer showed the world's first frames and then the intro cutscene's title card before the removal. - `cargo test -p xcl --lib -- uav_clear clear_uav` on this tree: 3 passed, 0 failed (`uav_clear_handles_translate_console_slots`, `clear_uav_with_console_handles_clears_the_slots_view`, `console_clear_uav_slots_translate_handles`). **What still ends the run (not this PR):** the `0x887a0005` removal with nothing in flight, right after the intro's title card, as in other reports on #505. The debug layer's last 64 messages before it hold only errors already present in the menus (1047, 527) and a graphics pipeline created 15 ms before. **Not tested:** `main` alone (the hang needs the rest of the stack to reach the world on this card); AMD; Series X; more than 2 runs with the PR. This was not a `scripts/smoke.ps1` regression run. **AI use:** Claude Code (Claude Opus 5.5) ran the runs on the machine above, read the DRED output and wrote this report.
Author
Owner

@⁠WASDeKeys on GitHub · 2026-11-25 08:30 UTC · original

@⁠emirduran707 I have a retail-title, I was just wondering if there's a specific title I need to run the smoke test on or if any xbox series unencrypted title would do.

**@⁠WASDeKeys** on GitHub · 2026-11-25 08:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7157111369) @⁠emirduran707 I have a retail-title, I was just wondering if there's a specific title I need to run the smoke test on or if any xbox series unencrypted title would do.
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-25 10:12 UTC · original

@⁠WASDeKeys Any unpacked Xbox Series (GDK) title you own works; there is no specific one. What matters is that you run the same title twice: once with an xcl.exe built from main and once with one built from the PR's head, each for the same 60 s (.\scripts\smoke.ps1 -Game <folder> -Xcl <that build's xcl.exe>). Then paste both xcl-smoke blocks. A title that does not reach the code a PR changes still counts as a regression check; say so under Not tested.

Written with Claude Code (Claude Opus 5.5).

**@⁠emirduran707** on GitHub · 2026-11-25 10:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7159367023) @⁠WASDeKeys Any unpacked Xbox Series (GDK) title you own works; there is no specific one. What matters is that you run the same title twice: once with an `xcl.exe` built from `main` and once with one built from the PR's head, each for the same 60 s (`.\scripts\smoke.ps1 -Game <folder> -Xcl <that build's xcl.exe>`). Then paste both `xcl-smoke` blocks. A title that does not reach the code a PR changes still counts as a regression check; say so under **Not tested**. Written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠WASDeKeys on GitHub · 2026-11-25 10:18 UTC · original

@⁠emirduran707

Thanks a ton, this has cleared a big confusing part for me. Also could you tell me if there is a list of things that need work right now, like improvement issues that need fixing and testing or really anything you would point a new contributor towards? Also is there a chat room/community like in discord yo coordinate with other devs?

Thanks!

**@⁠WASDeKeys** on GitHub · 2026-11-25 10:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7159524276) @⁠emirduran707 Thanks a ton, this has cleared a big confusing part for me. Also could you tell me if there is a list of things that need work right now, like improvement issues that need fixing and testing or really anything you would point a new contributor towards? Also is there a chat room/community like in discord yo coordinate with other devs? Thanks!
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-24 14:25 UTC · original · edited 2026-11-25 15:17 UTC

Independent native NVIDIA float clear check on 0fd1b66, Windows 11 build 26300, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, debug with Windows Graphics Tools.

I adapted the WARP fixture to use an R32_FLOAT buffer on the native adapter. With the console CPU-only and shader-visible slots registered, I passed their console handles directly to XCL’s clear_uav_float_x on an adopted command list. After a fence and GPU readback, all 64 elements were exactly 0.375. The D3D12 debug layer recorded zero messages during the clear and copy. The three stock tests also passed, including the WARP unsigned-integer readback.

Synthetic buffer and handler coverage only. AI-assisted. Codex (GPT-6, exact variant unavailable) adapted and ran the scratch fixture and drafted this report.

Recheck on current head 1a1a07f on the same RTX 3080 Ti. The clean workspace built and reported 1,253 passed, 0 failed, 46 ignored, including 25 reported skips (20 without wave64, 3 unsupported per-lane forms, 1 driver-cache toggle and 1 heap-window test). All three stock UAV tests passed, including the WARP readback.

I also ran the unsigned-integer clear on the RTX 3080 Ti with separate CPU-only and shader-visible heaps, a buffer created in COMMON and transitioned to UAV, and D3D12 debug and GPU-based validation enabled. All 64 elements matched. The device stayed healthy, with zero validation warnings or errors. The native check changed only the test fixture. No retail or shared-heap coverage in this recheck. AI-assisted. Codex (GPT-6, exact variant unavailable) ran the suite, adapted the native fixture and drafted this update.

**@⁠thehollowedone** on GitHub · 2026-11-24 14:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7134345289) · edited 2026-11-25 15:17 UTC Independent native NVIDIA float clear check on [`0fd1b66`](https://github.com/ivall/xcl/commit/0fd1b66b77390ac9c1725fe00d5417b410e0a839), Windows 11 build 26300, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, debug with Windows Graphics Tools. I adapted the WARP fixture to use an `R32_FLOAT` buffer on the native adapter. With the console CPU-only and shader-visible slots registered, I passed their console handles directly to XCL’s `clear_uav_float_x` on an adopted command list. After a fence and GPU readback, all 64 elements were exactly `0.375`. The D3D12 debug layer recorded zero messages during the clear and copy. The three stock tests also passed, including the WARP unsigned-integer readback. Synthetic buffer and handler coverage only. AI-assisted. Codex (GPT-6, exact variant unavailable) adapted and ran the scratch fixture and drafted this report. Recheck on current head [1a1a07f](https://github.com/xcl-dev/xcl/commit/1a1a07f9d444f04dd20331c194d4006b89ac327e) on the same RTX 3080 Ti. The clean workspace built and reported **1,253 passed, 0 failed, 46 ignored**, including 25 reported skips (20 without wave64, 3 unsupported per-lane forms, 1 driver-cache toggle and 1 heap-window test). All three stock UAV tests passed, including the WARP readback. I also ran the unsigned-integer clear on the RTX 3080 Ti with separate CPU-only and shader-visible heaps, a buffer created in COMMON and transitioned to UAV, and D3D12 debug and GPU-based validation enabled. All 64 elements matched. The device stayed healthy, with zero validation warnings or errors. The native check changed only the test fixture. No retail or shared-heap coverage in this recheck. AI-assisted. Codex (GPT-6, exact variant unavailable) ran the suite, adapted the native fixture and drafted this update.
Author
Owner

@⁠throny on GitHub · 2026-11-25 15:33 UTC · original

Two contributors checked independently and found that #2329 solves the same problem (for #675) in a different way: #1607, group D80. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

**@⁠throny** on GitHub · 2026-11-25 15:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7167024775) <!-- xcl-1607-hint:D80 --> Two contributors checked independently and found that #2329 solves the same problem (for #675) in a different way: #1607, group D80. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Author
Owner

@⁠imnicho on GitHub · 2026-11-25 16:10 UTC · original

A second NVIDIA card for the retail-title result above, and a correction on my side: #2329 is my duplicate of this PR (the triage hint above, group D80). This one was first, so I am closing #2329 in its favour.

I found the same hang independently today and missed this PR in my search. The measurements, made with the same handle translation as here (pc_gpu_uav of the GPU slot, pc_uav of the CPU slot, the same three cases) but in #2329's hooks, not on this head:

Setup: RTX 5080 16 GB (driver 610.47, 32-lane waves), i7-7700K, 16 GB RAM, Windows 10 22H2, release. The newer retail title (my own copy), XCL_NETWORK=0, scripted pad, a local tree (#2057 at 4df1e6e + main at 0f13d2a + the mesh stack), XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1, Series S profile.

runs device lost after the first #101 nvlddmkm "stopped responding" (event 4101)
handles untranslated 5 14, 14, 18, 19 and 51 s every run
translated 3 28 s, 38 s, 160 s only the 160 s one
  • Untranslated, XCL_DRED=1 + XCL_GPU_PROFILE=1 named the same place in two runs: a list of 139 operations with 45 done, the next one ClearUnorderedAccessView. That agrees with @⁠jessenic's report above.
  • Translated, the title makes two clears there, of a 20 MB buffer and of an 80x45 R32_FLOAT texture, each with a GPU handle and a CPU handle from two console heaps, and goes on (3 runs of 3). The losses that remain are later and other things (#505).

The one difference between the two PRs, for you to judge: when the GPU slot's UAV is in the shared heap, #2329 calls ensure_view_heap before the clear, because the PC wants the heap of the GPU handle set on the list, and a list that only clears may not have named one. I have not seen a list where that mattered (my title runs always had the call), so it is a precaution, not a measured need.

Not tested: this head itself. When this machine is free I will run this PR's three tests on the RTX 5080 and post the counts here.

AI use: Claude Code with Claude Fable 5.2 ran the title on the machine above and wrote this.

**@⁠imnicho** on GitHub · 2026-11-25 16:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7167663357) **A second NVIDIA card for the retail-title result above, and a correction on my side: #2329 is my duplicate of this PR (the triage hint above, group D80). This one was first, so I am closing #2329 in its favour.** I found the same hang independently today and missed this PR in my search. The measurements, made with the same handle translation as here (`pc_gpu_uav` of the GPU slot, `pc_uav` of the CPU slot, the same three cases) but in #2329's hooks, not on this head: **Setup:** RTX 5080 16 GB (driver 610.47, 32-lane waves), i7-7700K, 16 GB RAM, Windows 10 22H2, release. The newer retail title (my own copy), `XCL_NETWORK=0`, scripted pad, a local tree (#2057 at `4df1e6e` + `main` at `0f13d2a` + the mesh stack), `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1`, Series S profile. | | runs | device lost after the first `#101` | `nvlddmkm` "stopped responding" (event 4101) | |---|---|---|---| | handles untranslated | 5 | 14, 14, 18, 19 and 51 s | every run | | translated | 3 | 28 s, 38 s, 160 s | only the 160 s one | - Untranslated, `XCL_DRED=1` + `XCL_GPU_PROFILE=1` named the same place in two runs: a list of 139 operations with 45 done, the next one `ClearUnorderedAccessView`. That agrees with @⁠jessenic's report above. - Translated, the title makes two clears there, of a 20 MB buffer and of an 80x45 `R32_FLOAT` texture, each with a GPU handle and a CPU handle from two console heaps, and goes on (3 runs of 3). The losses that remain are later and other things (#505). **The one difference between the two PRs, for you to judge:** when the GPU slot's UAV is in the shared heap, #2329 calls `ensure_view_heap` before the clear, because the PC wants the heap of the GPU handle set on the list, and a list that only clears may not have named one. I have not seen a list where that mattered (my title runs always had the call), so it is a precaution, not a measured need. **Not tested:** this head itself. When this machine is free I will run this PR's three tests on the RTX 5080 and post the counts here. AI use: Claude Code with Claude Fable 5.2 ran the title on the machine above and wrote this.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 04:47 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 04:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/1291#issuecomment-7182905313) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
This discussion has been locked. Commenting is limited to contributors.
No description provided.