D3D12.X: respect compute lists and retain root signature in execute_i… #1764
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!1764
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@fixgep on GitHub · 2026-11-24 20:23 UTC · original
fixgep:fix/execute-indirect-compute-root-sig→main· +370 −22 · 1 files · 2 commits · openFixes untranslated
ExecuteIndirectroot-signature binding onD3D12_COMMAND_LIST_TYPE_COMPUTElists and retains COM root signature references inbind::State. Previously,bind::Stateheld an unretained rawrs_gfx: usizewithout trackingrs_cmp, andexecute_indirectunconditionally calledSetGraphicsRootSignaturewithrs_gfx— which is invalid onCOMPUTEcommand lists and vulnerable to COM use-after-free if the caller releases the root signature beforeExecuteIndirect. Part of #1488 (XCL-BT-019).What is in it
bc01e87(crates/xcl/src/hle/d3d12x/bind.rs): track retainedOption<ID3D12RootSignature>for bothrs_cmpandrs_gfx(dropping replaced references outsideSTATES), dispatchSetComputeRootSignaturevsSetGraphicsRootSignaturebyGetTypeinexecute_indirect, retainrs_gfxacrossgraphics_bound, and add synthetic COM and D3D12 computeExecuteIndirecttests.Tested
32.0.15.9144), AMD Ryzen 5 7500F 6-Core Processor, Windows 11 Pro (build26200),rustc 1.100.0 (0ef1bc386 2026-11-09)(debug tests, release smoke build).cargo test -p xcl --lib hle::d3d12x::bind::tests: 7 passed, 0 failed, 0 ignored (743 filtered out).cargo test -p xcl --test e2e: 3 passed, 0 failed, 0 ignored.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 777 passed, 1 failed (gpu::recomp::tests::gpu_clamp_and_omod_per_instruction, pre-existingv_pk_add_i16 clampfailure on this GPU), 41 ignored across workspace test binaries:xcl --lib: 728 passed, 1 failed, 21 ignoredbcpack_parity: 1 passed, 0 failed, 0 ignoredconsole_dlls_e2e: 13 passed, 0 failed, 0 ignoredconsole_shaders: 3 passed, 0 failed, 4 ignoreddisasm_e2e: 1 passed, 0 failed, 0 ignorede2e: 3 passed, 0 failed, 0 ignoredgpu_compute_e2e: 4 passed, 0 failed, 0 ignoredgpu_pso_e2e: 7 passed, 0 failed, 0 ignoredheap_probe: 0 passed, 0 failed, 4 ignoredlow_va: 1 passed, 0 failed, 0 ignoredpls_quota: 1 passed, 0 failed, 0 ignoredpredication_e2e: 1 passed, 0 failed, 0 ignoredrpf_e2e: 2 passed, 0 failed, 0 ignoredshaders_e2e: 4 passed, 0 failed, 0 ignoredsparse_reinit: 1 passed, 0 failed, 0 ignoredtexture_states: 1 passed, 0 failed, 0 ignoredxg_oracle: 6 passed, 0 failed, 12 ignoredSKIPPEDGPU tests on this adapter: 2 (no wave64:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware), 1 (no heap windows:heap_window_out_of_memory_falls_back_to_the_switch_form).Regression run
Not tested
XCL_SAMPLE_*tests on retail sample data (variables not set).execute_indirect_on_d3d12_compute_list_with_and_without_root_signaturein a standalone process withEnableDebugLayer()forced on (the test checksID3D12InfoQueueif already present on the device, whilee2e::test_title_draws_with_a_root_signature_under_the_debug_layerran underXCL_D3D12_DEBUG=1and passed).AI use
crates/xcl/src/hle/d3d12x/bind.rs, added the two synthetic tests, ran the unit/workspace test suites and bothsmoke.ps1runs, and drafted this PR description.@futurepro62 on GitHub · 2026-11-24 21:21 UTC · original · edited 2026-11-24 21:43 UTC
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
@DavidM1911 on GitHub · 2026-11-24 23:14 UTC · original
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!
@throny on GitHub · 2026-11-25 18:10 UTC · original
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.
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.Merge
Merge the changes and update on Forgejo.