D3D12.X: a command signature made at a freed one's address forgets its root-changing kind #2505

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

@⁠tiagonleal on GitHub · 2026-11-25 21:01 UTC · original
tiagonleal:root-signatures-forget-released → main · +23 −7 · 2 files · 1 commits · open

ROOT_SIGNATURES only inserted. If a command signature with root arguments was freed and a simple one (Dispatch, DrawIndexed) was made at the same address, every ExecuteIndirect with it and a translated pipeline was skipped, with no counter and no log. It is now noted at every creation, the way DISPATCH_SIGNATURES is (d6ff44ce). Overlaps #869 (open, conflicting, no review), which replaces ROOT_SIGNATURES altogether.

What is in it

  • bind.rs: note_root_changing_signature(sig, changes) inserts or removes; test a_command_signature_made_at_a_freed_ones_address_does_not_keep_its_kind
  • device_x.rs: create_command_signature_x notes every successful creation

Tested

  • Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 5070 Ti 16 GB (driver 617.42), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0
  • New test, before the fix (the code of this commit with the new behaviour switched off): cargo test -p xcl --lib a_command_signature_made_at: 0 passed, 1 failed. After the fix, run 5 times: 1 passed, 0 failed each time.
  • cargo build --workspace and cargo test --workspace --no-fail-fast -j 6 -- --test-threads=4, run twice: 1420 passed, 4 failed, 46 ignored both times (25 SKIPPED lines). The 4 failures are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3; they fail the same way on main 6d12f58a (cargo test -p xcl --lib fuzz_validate_and_gpu: 0 passed, 4 failed).

Regression run
main (6d12f58a):

xcl-smoke v1
commit: 6d12f58a229bc73889878a448c64dc3af25eeba0
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1626 (PresentX 1626)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15346 MB

this PR's head:

xcl-smoke v1
commit: fecb7c4d2c4721f3f99a83e00948091babaadb4b
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1620 (PresentX 1620)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15878 MB

Not tested

  • No title or GPU test makes a signature at a freed one's address: the test only covers the set; the device_x.rs call is not exercised by a test.
  • Whether the retail title frees and re-creates command signatures while loading: not known. No claim about world loading.
  • AMD, other drivers, Wine.

AI use

  • Claude Code with Claude Fable 5.2 and Anthropic subagents (Claude Opus 5.5, Claude Sonnet 5.5) helped developing.
**@⁠tiagonleal** on GitHub · 2026-11-25 21:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/2505) `tiagonleal:root-signatures-forget-released` → `main` · +23 −7 · 2 files · 1 commits · open ROOT_SIGNATURES only inserted. If a command signature with root arguments was freed and a simple one (Dispatch, DrawIndexed) was made at the same address, every ExecuteIndirect with it and a translated pipeline was skipped, with no counter and no log. It is now noted at every creation, the way DISPATCH_SIGNATURES is (d6ff44ce). Overlaps #869 (open, conflicting, no review), which replaces ROOT_SIGNATURES altogether. **What is in it** - `bind.rs`: `note_root_changing_signature(sig, changes)` inserts or removes; test `a_command_signature_made_at_a_freed_ones_address_does_not_keep_its_kind` - `device_x.rs`: `create_command_signature_x` notes every successful creation **Tested** - Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 5070 Ti 16 GB (driver 617.42), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0 - New test, before the fix (the code of this commit with the new behaviour switched off): `cargo test -p xcl --lib a_command_signature_made_at`: 0 passed, 1 failed. After the fix, run 5 times: 1 passed, 0 failed each time. - `cargo build --workspace` and `cargo test --workspace --no-fail-fast -j 6 -- --test-threads=4`, run twice: 1420 passed, 4 failed, 46 ignored both times (25 `SKIPPED` lines). The 4 failures are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3`; they fail the same way on `main` 6d12f58a (`cargo test -p xcl --lib fuzz_validate_and_gpu`: 0 passed, 4 failed). **Regression run** main (6d12f58a): ``` xcl-smoke v1 commit: 6d12f58a229bc73889878a448c64dc3af25eeba0 gpu: NVIDIA GeForce RTX 5070 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1626 (PresentX 1626) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15346 MB ``` this PR's head: ``` xcl-smoke v1 commit: fecb7c4d2c4721f3f99a83e00948091babaadb4b gpu: NVIDIA GeForce RTX 5070 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1620 (PresentX 1620) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15878 MB ``` **Not tested** - No title or GPU test makes a signature at a freed one's address: the test only covers the set; the `device_x.rs` call is not exercised by a test. - Whether the retail title frees and re-creates command signatures while loading: not known. No claim about world loading. - AMD, other drivers, Wine. **AI use** - Claude Code with Claude Fable 5.2 and Anthropic subagents (Claude Opus 5.5, Claude Sonnet 5.5) helped developing.
ROOT_SIGNATURES only ever inserted. If a command signature with root
arguments was freed and a simple one (Dispatch, DrawIndexed) was made at
the same address, every ExecuteIndirect with it and a translated pipeline
was skipped, with no counter and no log. It is now noted at every
creation, as DISPATCH_SIGNATURES is.

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

@⁠DavidM1911 on GitHub · 2026-11-25 21:14 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 21:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/2505#issuecomment-7174796234) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠SlopTart on GitHub · 2026-11-25 21:15 UTC · original

gpu_ suite (cold cache): 164 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.
Targeted run of a_command_signature_made_at_a_freed_ones_address_does_not_keep_its_kind: passed.

**@⁠SlopTart** on GitHub · 2026-11-25 21:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/2505#issuecomment-7174830613) `gpu_` suite (cold cache): 164 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR. Targeted run of `a_command_signature_made_at_a_freed_ones_address_does_not_keep_its_kind`: passed.
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-25 21:42 UTC · original

Independent AMD RDNA4 (native wave64) test report on exact head fecb7c4d2c4721f3f99a83e00948091babaadb4b (clean detached checkout, no local changes).

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1422 passed, 2 failed, 46 ignored; 8 SKIPPED (6 in lower_dxil::tests::{f16,f32}_programs_on_the_gpu refused by per-lane form; heap_window_out_of_memory_falls_back_to_the_switch_form; pso_measurement_compiles_an_exact_synthetic_record). All native wave64 GPU tests ran and passed.
    • The PR's test passed: hle::d3d12x::bind::tests::a_command_signature_made_at_a_freed_ones_address_does_not_keep_its_kind.
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 seed 722 and fuzz_validate_and_gpu_3 seed 1599) are pre-existing on unmodified main on this GPU.

Regression run (60 s retail-title smoke, XCL_NETWORK=0, release)

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

(Matched main 68a284a baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)

Not tested

  • D3D12 debug layer; Intel GPUs.

AI use

  • Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
**@⁠emirduran707** on GitHub · 2026-11-25 21:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/2505#issuecomment-7175427718) Independent AMD RDNA4 (native wave64) test report on exact head `fecb7c4d2c4721f3f99a83e00948091babaadb4b` (clean detached checkout, no local changes). **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2602.17; tests debug, smoke release. - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4`: **1422 passed, 2 failed, 46 ignored; 8 SKIPPED** (6 in `lower_dxil::tests::{f16,f32}_programs_on_the_gpu` refused by per-lane form; `heap_window_out_of_memory_falls_back_to_the_switch_form`; `pso_measurement_compiles_an_exact_synthetic_record`). All native wave64 GPU tests ran and passed. - The PR's test passed: `hle::d3d12x::bind::tests::a_command_signature_made_at_a_freed_ones_address_does_not_keep_its_kind`. - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` seed 722 and `fuzz_validate_and_gpu_3` seed 1599) are pre-existing on unmodified `main` on this GPU. **Regression run** (60 s retail-title smoke, `XCL_NETWORK=0`, release) ``` xcl-smoke v1 commit: fecb7c4d2c4721f3f99a83e00948091babaadb4b gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1602 (PresentX 1602) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13964 MB ``` (Matched `main` `68a284a` baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.) **Not tested** - D3D12 debug layer; Intel GPUs. **AI use** - Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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