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

Closed
mastrr9 wants to merge 1 commit from upstream-pr/1794 into main
mastrr9 commented 2026-11-24 20:51:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mastrr9 on 2026-11-24T20:51:45Z.


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://github.com/xcl-dev/xcl/pull/1794#issuecomment-7148374584
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.
<!-- greyfinch-sync:ivall/xcl:issue:5480122192 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1794). Originally posted by [mastrr9](https://github.com/mastrr9) on 2026-11-24T20:51:45Z. --- ## 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://github.com/xcl-dev/xcl/pull/1794#issuecomment-7148374584 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.
futurepro62 commented 2026-11-24 22:06:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:30:17Z.


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.
<!-- greyfinch-sync:ivall/xcl:comment:7145017000 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1794#issuecomment-7145017000). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T21:30:17Z. --- 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.
DavidM1911 commented 2026-11-25 00:09:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T23:41:47Z.


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

<!-- greyfinch-sync:ivall/xcl:comment:7147692471 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1794#issuecomment-7147692471). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T23:41:47Z. --- Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
Anon64 commented 2026-11-25 01:10:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-25T00:18:37Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7148374584 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1794#issuecomment-7148374584). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-25T00:18:37Z. --- 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.
JJAutoCompare commented 2026-11-25 05:08:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:14:50Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7152666745 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1794#issuecomment-7152666745). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:14:50Z. --- **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.
DavidM1911 commented 2026-11-26 01:05:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T00:29:11Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7178806662 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1794#issuecomment-7178806662). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T00:29:11Z. --- 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.
Foniass commented 2026-12-01 06:48:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:48:39Z.


Triage (#1607) – head 7abd6f1

#1592, merged as c6067a66 and extended by 792d9671 in hle/d3d12x/dred.rs, already does this on main: with XCL_DRED=1 each bound pipeline gets a marker and a label made of its console shader hashes, and the device-removal log names the label at the operation DRED stopped at. That is more precise than the last 4 draws per list kept here. There is also a concrete gap here. log_device_removed looks up node.pCommandList, but #1592 found that DRED gives a null pointer there on NVIDIA (Windows 26300) and only the list's debug name. On that setup bind::dred_summary finds nothing. Main works around it by naming each list xcl list 0x... (dred::node_list).
Recommendation: close (superseded by #1592).

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7303304203 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1794#issuecomment-7303304203). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:48:39Z. --- **Triage (#1607)** – head 7abd6f1 #1592, merged as c6067a66 and extended by 792d9671 in `hle/d3d12x/dred.rs`, already does this on main: with `XCL_DRED=1` each bound pipeline gets a marker and a label made of its console shader hashes, and the device-removal log names the label at the operation DRED stopped at. That is more precise than the last 4 draws per list kept here. There is also a concrete gap here. `log_device_removed` looks up `node.pCommandList`, but #1592 found that DRED gives a null pointer there on NVIDIA (Windows 26300) and only the list's debug name. On that setup `bind::dred_summary` finds nothing. Main works around it by naming each list `xcl list 0x...` (`dred::node_list`). Recommendation: close (superseded by #1592). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
throny commented 2026-12-01 12:48:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:48:33Z.


Closing as superseded: this change is already on main (c6067a66). main dred.rs (c6067a66, 792d9671) names the pipeline and console shaders bound at the DRED fault point; PR's draw ring is a weaker design for the same goal

Two independent checks found this: Foniass's close list on #1607 and ours against current main. If something here is still missing on main, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

<!-- greyfinch-sync:ivall/xcl:comment:7311677291 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1794#issuecomment-7311677291). Originally posted by [throny](https://github.com/throny) on 2026-12-01T12:48:33Z. --- Closing as superseded: this change is already on `main` (c6067a66). main dred.rs (c6067a66, 792d9671) names the pipeline and console shaders bound at the DRED fault point; PR's draw ring is a weaker design for the same goal Two independent checks found this: Foniass's close list on #1607 and ours against current `main`. If something here is still missing on `main`, say so and reopen it, or ask and I will. AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

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!1784
No description provided.