D3D12.X: the same root signature set again keeps the root arguments #2504
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2504
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2504"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@tiagonleal on GitHub · 2026-11-25 21:01 UTC · original
tiagonleal:same-root-signature-keeps-root-args→main· +67 −4 · 2 files · 1 commits · openSetComputeRootSignature and SetGraphicsRootSignature zeroed the root arguments on every call. In D3D12 a redundant set of the same root signature keeps the bindings; only a different root signature makes them stale. Microsoft Learn, Using a Root Signature (https://learn.microsoft.com/en-us/windows/win32/direct3d12/using-a-root-signature): "If the root signature is redundantly set to the same one currently set, existing root signature bindings do not become stale." Compute and graphics each have their own root signature. A title that sets the same signature again and then binds only some parameters left the rest at address 0 in the argument table of the translated shader.
The arguments are cleared only when the layout is not the one already set (the same layout object, so a signature made at a freed one's address still clears). The console list replay does the same. Reset and ClearState still clear everything. No tracked issue fits this exactly, so none is linked; neither #667 nor #1652 changes this clearing.
What is in it
bind.rs:set_compute_root_signature/set_graphics_root_signatureclear only for a different layout; testthe_same_root_signature_again_keeps_the_root_arguments(same signature twice keeps the arguments, a different one clears, compute and graphics are independent, a signature re-made at the same address clears, ClearState and Reset clear)console_list.rs:same_layouthelper, used by the replay ofRS_MARKERTested
cargo test -p xcl --lib the_same_root_signature: 0 passed, 1 failed. After the fix, run 5 times: 1 passed, 0 failed each time.cargo build --workspaceandcargo test --workspace --no-fail-fast -j 6 -- --test-threads=4, run twice: 1420 passed, 4 failed, 46 ignored both times (25SKIPPEDlines). The 4 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3; they fail the same way onmain6d12f58a(cargo test -p xcl --lib fuzz_validate_and_gpu: 0 passed, 4 failed).Regression run
main (
6d12f58a):this PR's head:
Not tested
AI use
@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!
@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
the_same_root_signature_again_keeps_the_root_arguments: passed.@emirduran707 on GitHub · 2026-11-25 21:29 UTC · original
Independent AMD RDNA4 (native wave64) test report on exact head
bbd16e969f8277edba453d43d683f0fa6b4818a1(clean detached checkout, no local changes).Tested
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: 1421 passed, 3 failed, 46 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpurefused 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.hle::d3d12x::bind::tests::the_same_root_signature_again_keeps_the_root_arguments.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1seed 722 andfuzz_validate_and_gpu_3seed 1599) are pre-existing on unmodifiedmainon this GPU;hle::d3d12x::list_x::tests::a_dispatch_with_a_pipeline_still_building_waits_at_the_submitfailed once under--test-threads=4(left: 135, right: 421) and passed immediately on single-threaded rerun (--test-threads=1,0.48s).Regression run (60 s retail-title smoke,
XCL_NETWORK=0, release)(Matched
main68a284abaseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.