D3D12.X: Reset, KickoffX and CreateCommandList do not wait for a compute pipeline still being built #2548
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!2548
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2548"
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 22:41 UTC · original
tiagonleal:reset-does-not-wait-for-compute→main· +225 −3 · 2 files · 1 commits · openAfter #2118 a dispatch waits for its compute pipeline at the submit instead of in the bind.
SetPipelineStateand the mid-list split already take a pending compute pipeline withpso_async::resolve, which returns the stand-in and does not wait. Three other places still usedpso_async::resolve_for_bind, which waits for a compute pipeline (and builds it on the title's thread if no worker has started it):Reset(allocator, initial_pso), the re-bind afterKickoffX, andCreateCommandListwith an initial pipeline. A title that passes a compute pipeline still being built to one of them stopped there until the driver finished, which can take minutes for a large program.These three now use
resolve, likesplit. The dispatch that follows is still left for the submit:bind::resetandon_createkeep the title's own pipeline (the stand-in), andbind::dispatchandbind::execute_indirectdefer when that pipeline is pending, as they do after aSetPipelineState.What is in it
list_x.rs:reset_pcandkickoff_xusepso_async::resolvedevice_x.rs:create_list(the path without the console list) usespso_async::resolvelist_x.rs, one per path, each with a build that finishes only when the test releases it: the call returns without waiting for it, the pipeline is still pending, and aDispatchright after is left for the submit.a_reset_with_a_compute_pipeline_still_building_does_not_waitalso checks that the list tracks the stand-in. The other two area_kickoff_with_a_compute_pipeline_still_building_does_not_waitanda_command_list_created_with_a_compute_pipeline_still_building_does_not_wait.Tested
cargo test -p xcl --lib -- still_building_does_not_wait: 3 passed, 0 failed, 3 of 3 runs onc0d09204. With the three calls put back toresolve_for_bind, all three fail after the test's 10 s wait:Reset waited for the build (10.0008635s),KickoffX waited for the build (10.0029887s),CreateCommandList waited for the build (10.0042973s).cargo test --workspace --no-fail-fast -- --test-threads=4, run twice onc0d09204: 1422 passed, 4 failed, 46 ignored both times (25SKIPPEDlines). The 4 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(E_OUTOFMEMORY), the known ones on this machine; I did not run them onmainagain today.Regression run
60 s each, the same retail title, release builds from clean trees, one after the other.
main(e1d84b7d):This PR:
Not tested
ResetorCreateCommandList: not known. No claim about world loading or any visible change; the smoke run shows only that nothing regressed.KickoffXrarely reaches this case, because the deferred recording right before it has already waited for the deferred pipelines.real.rscl_resetandcl_clear_statestill useresolve_for_bind; they are not changed here.AI use
🤖 Generated with Claude Code
@xpatfussy69x on GitHub · 2026-11-25 22:57 UTC · original
Test run on exact head
5ac8e85(5ac8e857a86835d04c8152c3f3066925d4f07f7d, on its basee1d84b7, currentmain), clean tree.Tested
cargo test --workspace -- --test-threads=4: 1424 passed, 0 failed, 46 ignoredV_MUL_F16/V_PK_MUL_F16/V_CVT_F16_F32(onmaintoo)cargo test -p xcl --lib a_reset_with_a_compute_pipeline: 1 passed, 0 faileda_reset_with_a_compute_pipeline_still_building_does_not_wait: okcrates/xcl/src/hle/d3d12x/list_x.rs(git merge-treeof both heads); whichever lands second needs a rebaseRegression run (60 s, default settings, a retail title)
main:
this PR:
No crash or device removal; frames 104 % of
main's, peak commit 100 %.Not tested
AI use
@futurepro62 on GitHub · 2026-11-25 22:54 UTC · original · edited 2026-11-25 22:58 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
5ac8e85(on its basee1d84b7).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: 1412 passed, 0 failed, 44 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,dispatch_chain_native_wave64_builds_whole,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.a_reset_with_a_compute_pipeline_still_building_does_not_wait.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1423 passed, 0 failed, 46 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on maine1d84b7too, 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
@DavidM1911 on GitHub · 2026-11-25 23:06 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.Thanks!
— Devin
@emirduran707 on GitHub · 2026-11-25 23:32 UTC · original
Independent AMD RDNA4 (native wave64) verification of exact PR head
5ac8e857a86835d04c8152c3f3066925d4f07f7don Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver32.0.31044.16, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC1.9.2602.17).Tested
cargo build --workspace(debug): passed (0errors).cargo test --workspace --no-fail-fast -- --test-threads=4:1422 passed, 2 failed, 46 ignored(8 SKIPPED: 6 per-lane DXIL forms refused by host adapter/driver, 1heap_window_out_of_memory_falls_back_to_the_switch_formno heap windows, 1pso_measurement_compiles_an_exact_synthetic_recordWindows Developer Mode off).hle::d3d12x::list_x::tests::a_reset_with_a_compute_pipeline_still_building_does_not_waitpassed.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andfuzz_validate_and_gpu_3) are pre-existing on unmodifiedmainon this RX 9060 XT / driver32.0.31044.16.cargo build --release -p xcl+ 60 s retail-title smoke test (scripts/smoke.ps1, offline):(Compare against
main08db8020on this machine:1553 frames, 13966 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@xpatfussy69x on GitHub · 2026-11-26 00:18 UTC · original
Read the diff on
5ac8e85. The threeresolve_for_bind→resolveswaps look right to me:resolve_for_bindalready sent graphics pipelines toresolve, and for a compute pipeline still being built the title's own pipeline stays inbound_pso, so the dispatch after it is still put off to the submit. The test coversReset(reset_pc) only; theKickoffXre-bind (list_x.rs:3404) andCreateCommandListwith an initial pipeline (device_x.rs:98) are changed without a test. A dispatch right after each, while the build is pending, would cover them.AI use: Claude Code (Claude Opus 5.5) reviewed the diff; I checked each point.
@SlopTart on GitHub · 2026-11-26 05:04 UTC · original
Tested: current PR head merged onto current
origin/main(clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).gpu_suite (cold cache): 165 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_reset_with_a_compute_pipeline_still_building_does_not_wait: passed.Not tested: retail titles (no title data on this lane, counts only).
AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-25 22:41 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
5ac8e857a8toc0d0920414@tiagonleal on GitHub · 2026-11-26 11:52 UTC · original
Thanks. I added a test for each of the two other paths, next to the Reset one, both in
list_x.rs:a_kickoff_with_a_compute_pipeline_still_building_does_not_wait(the KickoffX re-bind) anda_command_list_created_with_a_compute_pipeline_still_building_does_not_wait(CreateCommandList with an initial pipeline). Each checks that the call returns without waiting for the build and that a Dispatch right after is left for the submit. The follow-up commit is squashed into the first one, nowc0d09204.Run on
c0d09204:cargo test -p xcl --lib -- still_building_does_not_wait, 3 passed, 3 of 3 runs. With the three calls put back onresolve_for_bind, all three fail after a 10 s wait ("Reset waited for the build (10.0008635s)", "KickoffX waited for the build (10.0029887s)", "CreateCommandList waited for the build (10.0042973s)").cargo test --workspace --no-fail-fast -- --test-threads=4, twice: 1422 passed, 4 failed, 46 ignored; the 4 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(E_OUTOFMEMORY, known on this machine). 60 s smoke runs one1d84b7dandc0d09204: both exit 0, no device removals, 1623 and 1626 frames shown.Not run: the four fuzz tests on
maintoday.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.