D3D12.X: serialize allocator and list resets #1711
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1721"
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 hajduzsolt on 2026-11-24T19:53:23Z.
Runtime fix verified with unit tests and RX 9070 XT smoke run.
What is in it
Tested
cargo test -p xcl --lib alloc_pool::tests -- --test-threads=2passed (5 passed).cargo test --workspace -- --test-threads=2passed; library tests: 816 passed, 22 ignored. Other test binaries also passed. Runtime GPU skips were not individually assessed in this run.Regression run
main:
PR:
Not tested
AI use
Imported from ivall/xcl. Originally posted by frenziedcoder on 2026-11-24T20:38:17Z.
NVIDIA test report for
0c5de12: full suite green, thealloc_pooltests 10 of 10, and a clean smoke pair on the retail title.Tested
stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head0c5de128ff067ca1fab3000fb9bf9ceb24ab303e, no local changes.cargo build --workspace && cargo test --workspace -- --test-threads=4(debug): 865 passed, 0 failed, 42 ignored. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).cargo test -p xcl --lib alloc_pool::tests -- --test-threads=2, 10 times in a row: 5 passed, 0 failed every time.Regression run (
scripts/smoke.ps1 -Seconds 60, release, the retail title of #505 at its start screen;XCL_PSO_PRELOAD=0for both builds, because this machine's preload list holds the program of #1307 and preloading it withb8b1f49takes the commit past 40 GB)base (
maincommit this PR is on):this PR:
Not tested: a run long enough to reach the world load (where list resets are frequent); AMD; a stress test of concurrent resets beyond the PR's own tests.
AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T22:28:49Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.Thanks!
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T03:56:20Z.
PR #1721 — D3D12.X allocator and command-list reset verification
Tested clean detached head
0c5de128ffon STOR-WINLAB. Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, wave lanes 8–32, DoublePrecisionFloatShaderOps=0). DXC/DXIL 1.9.2609.5, rustc 1.100.0 (0ef1bc386 2026-11-09), unoptimized profiles with debug info disabled.Tested
cargo build --workspaceandcargo test --workspace --no-runsucceeded. All Cargo test commands, including the compile-only invocation, used the shared Arc lock throughInvoke-ArcTest.ps1.cargo test -p xcl alloc_pool::tests -- --nocapturepassed all 5 tests. The two new unit tests checked the per-allocator lock during native allocator fallback and list reset, independent locking for another allocator, and recording tracking after success. The existing GPU case submitted a recording again after allocator reset, completed queue fences without device removal, and checked backing reuse.cargo test -p xcl reset_commits_state_only_after_native_success_and_always_restores_vtable -- --nocapturepassed 1 test. Both focused runs had 0 failures, 0 ignored, and 0SKIPPEDlines.Full workspace
cargo test --workspace --no-fail-fast -- --test-threads=4exited 101. Across 20 libtest summaries, 847 passed, 18 failed, 42 ignored. The log contains 3SKIPPEDlines (2 no wave64, 1 no heap windows). Those tests are included in Cargo's pass total and provide no coverage for the skipped paths. All six focused tests passed again.Not tested
Main baseline or retail-title smoke comparison, external game samples, other adapters, and D3D12 debug-layer validation (d3d12SDKLayers.dll absent). This run does not establish whether the suite failures also occur on main.
AI use
T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1721-suite.logand published.Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-26T17:19:57Z.
NVIDIA and AMD full-suite run, to go with the reports above by JJAutoCompare, frenziedcoder, since none of them covers AMD. Tested exact head
0c5de128(on its base6c89285).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 gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 864 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.allocator_reset_keeps_its_gate_during_native_fallback,list_reset_holds_only_its_allocator_gate_until_recording_is_tracked.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 865 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on main8b957bectoo, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:35:15Z.
Triage (#1607) – head
0c5de12No open or merged PR serializes a list Reset against its allocator's Reset.
Main has since rewritten
alloc_pool::title_reset. It now has aresettingreservation, so a second allocator Reset that runs concurrently gets E_FAIL, butreset_liststill does not wait for it. This PR's gate is therefore not superseded, though it needs a substantial rebase.title_reset_withnow runs the native fallback Reset itself, inside the gate, and never returnsNone. That matches what the calleralloc_resetdid in theNonecase.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.