D3D12.X: respect compute lists and retain root signature in execute_i… #1754
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1764"
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?
Imported from ivall/xcl. Originally posted by fixgep on 2026-11-24T20:23:06Z.
Respect
D3D12_COMMAND_LIST_TYPE_COMPUTEinexecute_indirect, retain bound root signatures across callerRelease(), and eliminateVirtualQuery(gpu::shader::readable) from theRetainedRootSig::retainhot path.Part of #1488 (XCL-BT-019).
What is in it
crates/xcl/src/hle/d3d12x/bind.rs:execute_indirectsoCOMPUTElists bindrs_cmp(SetComputeRootSignature) and neverSetGraphicsRootSignature.ID3D12RootSignatureCOM references inRetainedRootSigso callerRelease()beforeexecute_indirectcannot leave a dangling pointer.set_graphics_root_signatureandset_compute_root_signatureto skipRetainedRootSig::retain(AddRef/Release) when re-binding the already-bound root signature.gpu::shader::readable(VirtualQuery) probe inRetainedRootSig::retainto#[cfg(test)]; non-test builds callID3D12RootSignature::from_raw_borrowed(&rs).cloned()directly on non-null pointers.FakeTypedList(COMPUTE/DIRECT) +FakeRsrefcounting/same-pointer fast path and a live D3D12ID3D12Devicecompute command list.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09); debug & release (d767c523).cargo build -j 4 --workspace: exited 0.cargo test -j 4 --workspace --no-run: exited 0.cargo build -j 4 --release -p xcl: exited 0.cargo test -j 4 -p xcl --lib hle::d3d12x::bind::tests -- --test-threads=1(RTX 3060): 118 passed, 0 failed, 0 ignored (SKIPPED:two_pass_binds_set_the_shared_view_heap).XCL_ADAPTER=warp cargo test -j 4 -p xcl --lib hle::d3d12x::bind::tests -- --test-threads=1: 118 passed, 0 failed, 0 ignored (SKIPPED:two_pass_binds_set_the_shared_view_heap).Regression run
Not tested
cargo test --workspace -- --test-threads=4suite was not run in this update (onlyhle::d3d12x::bind::testsand paired 60 sscripts/smoke.ps1).AI use
VirtualQuery, added same-pointer fast path inset_graphics_root_signature/set_compute_root_signature, rebased ontoupstream/main, ran targeted tests and pairedsmoke.ps1.Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:21:31Z.
Full-suite run, since this PR has no test report yet. Tested exact head
119d483(on its base4178e88).Tested
cargo build --workspace, thenXCL_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: 891 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.execute_indirect_compute_list_respects_list_type_and_retains_root_signature,execute_indirect_on_d3d12_compute_list_with_and_without_root_signature.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 893 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)).--skipon NVIDIA. Both fail on main7f7e768too, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures.heap_window_out_of_memory_falls_back_to_the_switch_formskips whenXCL_HEAP_WINDOWSis unset (#1651), andshaders::tests::pso_measurement_compiles_an_exact_synthetic_recordskips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not setXCL_REQUIRE_GPU, so there both just print SKIPPED.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T23:14:24Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by throny on 2026-11-25T18:10:54Z.
Two contributors checked independently and found that #1925 solves the same problem (for #1488) in a different way: #1607, group D93. 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.
Imported from ivall/xcl. Originally posted by CalvyPZ on 2026-11-25T22:42:36Z.
This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why.
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:44:44Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by fixgep on 2026-11-30T16:37:03Z.
Rebased onto
upstream/main(9dfbe3ea), resolved thebind.rsconflict, and updated the PR description with freshbind::tests(RTX 3060 + WARP) and paired 60sxcl-smokeresults. Ready for review.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:42:30Z.
Triage (#1607) – head
d767c52#1925, which made the same change in
bind.rs, has been closed. This PR also keeps a reference to the compute root signature and merges cleanly.RetainedRootSig::retainno longer probes withgpu::shader::readableoutside tests, and setting the same root signature again returns before retaining it.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.