D3D12.X: log bound shader hashes for DRED partially executed lists #1794

Open
github-bot wants to merge 1 commit from github-bot/gh-1794 into main AGit
Owner

@⁠mastrr9 on GitHub · 2026-11-24 20:51 UTC · original
mastrr9:feat/dred-log-bound-shaders → main · +223 −1 · 4 files · 1 commits · open

Summary

When a DRED device-removed report involves a partially executed console command list, it now also names the pipeline and shader hashes bound most recently on that list.

  • Adds a zero-allocation 64-entry per-list ring (draw_log.rs).
  • Recording is gated behind XCL_DRED=1. When off, the cost is a single relaxed atomic load.
  • log_device_removed looks the ring up with try_lock, so the report path never blocks.

Tested

Windows 11 x64, NVIDIA GeForce RTX 5080 16 GB.

  • cargo test -p xcl --lib draw_log -- --test-threads=1: 4 passed, 0 failed
  • cargo check --workspace --tests: clean (no new warnings)

Regression run
Smoke run by @⁠Anon64 in comment below: #1794
Contributed by a community tester; the PR author did not run it. Both blocks are pasted as posted.

main:

xcl-smoke v1
commit: 689f2db477c3c062cf162649781640ef8a977c18
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1590 (PresentX 1591)
presents per 2 s (last 3): 44 53 35
device removals: 0
crashes: 0
peak commit: 25217 MB

PR:

xcl-smoke v1
commit: 7abd6f1b39837105e330add0b5b9aad9c7c573c4
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1544 (PresentX 1545)
presents per 2 s (last 3): 52 28 4
device removals: 0
crashes: 0
peak commit: 27337 MB

Tester's setup: RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release, XCL_NETWORK=0, A pressed every 4 s from 20 s, scripts/smoke.ps1 on a retail title for 60 s, in one batch with the main run.

No device removals or crashes; 97 % of main's frames, 108 % of its peak commit.

Tester's AI use: Written with Claude Code (Claude Opus 5.5) from runs on the tester's machine.

Not tested

  • A full cargo test --workspace run by the author: only the commands above are reported.
  • A live device removal with XCL_DRED=1 and the hashes it prints: not covered by the commands above, and the regression run does not report setting XCL_DRED.
  • AMD and Intel GPUs, by the author.
  • Whether the community regression run above reaches the code this PR changes.

AI use

  • Claude Sonnet 5.5 co-authored the change (the commit's Co-Authored-By trailer).
  • Claude Code (Claude Sonnet 5.5) added the community regression run to this description and updated the lines that it made out of date or that the PR check requires.
**@⁠mastrr9** on GitHub · 2026-11-24 20:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/1794) `mastrr9:feat/dred-log-bound-shaders` → `main` · +223 −1 · 4 files · 1 commits · open ## Summary When a DRED device-removed report involves a partially executed console command list, it now also names the pipeline and shader hashes bound most recently on that list. - Adds a zero-allocation 64-entry per-list ring (`draw_log.rs`). - Recording is gated behind `XCL_DRED=1`. When off, the cost is a single relaxed atomic load. - `log_device_removed` looks the ring up with `try_lock`, so the report path never blocks. **Tested** Windows 11 x64, NVIDIA GeForce RTX 5080 16 GB. - `cargo test -p xcl --lib draw_log -- --test-threads=1`: 4 passed, 0 failed - `cargo check --workspace --tests`: clean (no new warnings) **Regression run** Smoke run by @⁠Anon64 in comment below: https://git.gtahub.st/github/xcl-dev--xcl/pulls/1794 Contributed by a community tester; the PR author did not run it. Both blocks are pasted as posted. main: ``` xcl-smoke v1 commit: 689f2db477c3c062cf162649781640ef8a977c18 gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1590 (PresentX 1591) presents per 2 s (last 3): 44 53 35 device removals: 0 crashes: 0 peak commit: 25217 MB ``` PR: ``` xcl-smoke v1 commit: 7abd6f1b39837105e330add0b5b9aad9c7c573c4 gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1544 (PresentX 1545) presents per 2 s (last 3): 52 28 4 device removals: 0 crashes: 0 peak commit: 27337 MB ``` Tester's setup: RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release, `XCL_NETWORK=0`, A pressed every 4 s from 20 s, `scripts/smoke.ps1` on a retail title for 60 s, in one batch with the `main` run. No device removals or crashes; 97 % of main's frames, 108 % of its peak commit. Tester's AI use: Written with Claude Code (Claude Opus 5.5) from runs on the tester's machine. **Not tested** - A full `cargo test --workspace` run by the author: only the commands above are reported. - A live device removal with `XCL_DRED=1` and the hashes it prints: not covered by the commands above, and the regression run does not report setting `XCL_DRED`. - AMD and Intel GPUs, by the author. - Whether the community regression run above reaches the code this PR changes. **AI use** - Claude Sonnet 5.5 co-authored the change (the commit's `Co-Authored-By` trailer). - Claude Code (Claude Sonnet 5.5) added the community regression run to this description and updated the lines that it made out of date or that the PR check requires.
With XCL_DRED=1, log_device_removed named the command list and operation
index but not which pipeline was bound. Console lists now keep a fixed
64-entry ring of recent draws / dispatches / indirect executions (kind +
bound pipeline), cleared on Reset and recorded only under XCL_DRED. Pipelines
made from console shaders keep their dump hashes, and each reported list
prints its last four events with vs/ps/cs hashes.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:05:31 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 21:30 UTC · original · edited 2026-11-24 22:20 UTC

Full-suite run, since this PR has no test report yet. Tested exact head 2601ce6 (on its base 4178e88).

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, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 893 passed, 0 failed, 42 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: an_empty_ring_has_no_summary, the_summary_names_the_newest_events_oldest_first, the_ring_keeps_only_the_newest_events_once_full, clear_forgets_the_recording.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 895 passed, 0 failed, 42 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • Two tests were skipped with --skip on NVIDIA. Both fail on main 7f7e768 too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns their skips into failures. heap_window_out_of_memory_falls_back_to_the_switch_form skips when XCL_HEAP_WINDOWS is unset (#1651), and shaders::tests::pso_measurement_compiles_an_exact_synthetic_record skipped because Developer Mode was off. Developer Mode was turned on before the AMD run, and there pso_measurement_compiles_an_exact_synthetic_record ran and passed.

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 21:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/1794#issuecomment-7145017000) · edited 2026-11-24 22:20 UTC Full-suite run, since this PR has no test report yet. Tested exact head `2601ce6` (on its base `4178e88`). **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, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record`: **893 passed, 0 failed, 42 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `an_empty_ring_has_no_summary`, `the_summary_names_the_newest_events_oldest_first`, `the_ring_keeps_only_the_newest_events_once_full`, `clear_forgets_the_recording`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **895 passed, 0 failed, 42 ignored**. SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - Two tests were skipped with `--skip` on NVIDIA. Both fail on main `7f7e768` too, not because of this PR: under `XCL_REQUIRE_GPU=mesh`, `runner::skip_test` turns their skips into failures. `heap_window_out_of_memory_falls_back_to_the_switch_form` skips when `XCL_HEAP_WINDOWS` is unset (#1651), and `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` skipped because Developer Mode was off. Developer Mode was turned on before the AMD run, and there `pso_measurement_compiles_an_exact_synthetic_record` ran and passed. **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

@⁠DavidM1911 on GitHub · 2026-11-24 23:41 UTC · original

Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-24 23:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/1794#issuecomment-7147692471) Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
Author
Owner

@⁠Anon64 on GitHub · 2026-11-25 00:18 UTC · original

Regression run for this PR: head 7abd6f1, based on main 689f2db. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release, XCL_NETWORK=0, A pressed every 4 s from 20 s, scripts/smoke.ps1 on a retail title for 60 s, in one batch with the main run.

main 689f2db:

xcl-smoke v1
commit: 689f2db477c3c062cf162649781640ef8a977c18
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1590 (PresentX 1591)
presents per 2 s (last 3): 44 53 35
device removals: 0
crashes: 0
peak commit: 25217 MB

this PR:

xcl-smoke v1
commit: 7abd6f1b39837105e330add0b5b9aad9c7c573c4
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1544 (PresentX 1545)
presents per 2 s (last 3): 52 28 4
device removals: 0
crashes: 0
peak commit: 27337 MB

No device removals or crashes; 97 % of main's frames, 108 % of its peak commit.

Not tested: the whole suite; whether the title reaches the changed code in these 60 s.

Written with Claude Code (Claude Opus 5.5) from runs on this machine.

**@⁠Anon64** on GitHub · 2026-11-25 00:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/1794#issuecomment-7148374584) Regression run for this PR: head `7abd6f1`, based on `main` `689f2db`. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release, `XCL_NETWORK=0`, A pressed every 4 s from 20 s, `scripts/smoke.ps1` on a retail title for 60 s, in one batch with the `main` run. main `689f2db`: ``` xcl-smoke v1 commit: 689f2db477c3c062cf162649781640ef8a977c18 gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1590 (PresentX 1591) presents per 2 s (last 3): 44 53 35 device removals: 0 crashes: 0 peak commit: 25217 MB ``` this PR: ``` xcl-smoke v1 commit: 7abd6f1b39837105e330add0b5b9aad9c7c573c4 gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1544 (PresentX 1545) presents per 2 s (last 3): 52 28 4 device removals: 0 crashes: 0 peak commit: 27337 MB ``` No device removals or crashes; 97 % of main's frames, 108 % of its peak commit. **Not tested:** the whole suite; whether the title reaches the changed code in these 60 s. Written with Claude Code (Claude Opus 5.5) from runs on this machine.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 04:14 UTC · original

XCL PR #1794 — Arc A770 verification

Tested clean head 7abd6f1b39837105e330add0b5b9aad9c7c573c4 on STOR-WINLAB (Windows 11 Enterprise Evaluation, build 26200, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175). DXC --version reported 1.9.2609.5. Rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), unoptimized dev/test profiles with debug info and incremental compilation disabled.

Tested

  • cargo build --workspace and cargo test --workspace --no-run both succeeded outside the Arc mutex.
  • cargo test -p xcl --lib hle::d3d12x::draw_log::tests — 4 passed, 0 failed, 0 ignored, 0 skips. The new CPU fixtures cover an empty/reset ring, retaining the latest 64 events after wraparound, chronological ordering of the newest events, and VS/PS/CS hash and unknown-PSO formatting.
  • cargo test -p xcl --lib hle::d3d12x::real::dred_tests — 1 passed, 0 failed, 0 ignored, 0 skips. The existing synthetic test reports a late, partially executed list ahead of unstarted lists within the 64-list cap. Both focused commands used XCL_ADAPTER=NONE_CPU_ONLY.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. Exit 101. Across 20 test result: lines (19 binaries and one doctest harness), libtest reported 954 passed, 25 failed, 45 ignored. All five focused tests passed again.

Workspace failures and skips

The library target had 24 shader/DXIL failures, mostly CreateComputePipelineState returning 0x80070057, plus output mismatches. In e2e, the RSSetDepthBiasX check produced blue where it expected green. The log had 25 lines beginning with SKIPPED (17 no-wave64, 3 refused per-lane shader forms, 2 missing debug-layer components, 1 each for tiled tier, driver-cache controls, and heap windows). Those paths provide no coverage.

Not tested

Live device removal with XCL_DRED=1, including the emitted per-list shader hashes. Retail-title smoke comparison, matched main suite, and other adapters. The workspace failures remain unattributed.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification and wrote this report. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1794-suite.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 04:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/1794#issuecomment-7152666745) **XCL PR #1794 — Arc A770 verification** Tested clean head `7abd6f1b39837105e330add0b5b9aad9c7c573c4` on STOR-WINLAB (Windows 11 Enterprise Evaluation, build 26200, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175). DXC `--version` reported 1.9.2609.5. Rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), unoptimized dev/test profiles with debug info and incremental compilation disabled. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` both succeeded outside the Arc mutex. - `cargo test -p xcl --lib hle::d3d12x::draw_log::tests` — 4 passed, 0 failed, 0 ignored, 0 skips. The new CPU fixtures cover an empty/reset ring, retaining the latest 64 events after wraparound, chronological ordering of the newest events, and VS/PS/CS hash and unknown-PSO formatting. - `cargo test -p xcl --lib hle::d3d12x::real::dred_tests` — 1 passed, 0 failed, 0 ignored, 0 skips. The existing synthetic test reports a late, partially executed list ahead of unstarted lists within the 64-list cap. Both focused commands used `XCL_ADAPTER=NONE_CPU_ONLY`. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once under `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. Exit 101. Across 20 `test result:` lines (19 binaries and one doctest harness), libtest reported 954 passed, 25 failed, 45 ignored. All five focused tests passed again. **Workspace failures and skips** The library target had 24 shader/DXIL failures, mostly `CreateComputePipelineState` returning `0x80070057`, plus output mismatches. In `e2e`, the `RSSetDepthBiasX` check produced blue where it expected green. The log had 25 lines beginning with `SKIPPED ` (17 no-wave64, 3 refused per-lane shader forms, 2 missing debug-layer components, 1 each for tiled tier, driver-cache controls, and heap windows). Those paths provide no coverage. **Not tested** Live device removal with `XCL_DRED=1`, including the emitted per-list shader hashes. Retail-title smoke comparison, matched `main` suite, and other adapters. The workspace failures remain unattributed. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification and wrote this report. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1794-suite.log` and published.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 00:29 UTC · original

Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-26 00:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/1794#issuecomment-7178806662) Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/hle/d3d12x/bind.rs
  • crates/xcl/src/hle/d3d12x/mod.rs
  • crates/xcl/src/hle/d3d12x/real.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1794/head:github-bot/gh-1794'
git switch 'github-bot/gh-1794'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1794'
git switch 'github-bot/gh-1794'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1794'
git switch 'github-bot/gh-1794'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1794'
git switch 'main'
git merge --squash 'github-bot/gh-1794'
git switch 'main'
git merge --ff-only 'github-bot/gh-1794'
git switch 'main'
git merge 'github-bot/gh-1794'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.