D3D12.X: waits for the sparse queue do not hold the sparse state's lock #1385
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!1385
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1385"
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?
@MacieGx on GitHub · 2026-11-24 15:30 UTC · original
MacieGx:d3d12x/sparse-unlocked-waits→main· +414 −97 · 2 files · 1 commits · openTwo title threads waited on the CPU for XCL's sparse queue while holding the sparse state's mutex: a
Mapfor its copy back, and a submit for room in the upload ring. While the GPU stood still, so did every other thread that needed the lock: commits and decommits, the nextMap, the next submit, the activity line. This makes those waits with the lock released. Part of #505.In the newer retail title (#505) on an RTX 5080, with bounded pipeline waits (
XCL_PSO_WAIT_MS=50) andApressed at 20 s, thread dumps taken while its frames had stopped (on67a3735+ #433 + #968) showed the two waits above holding the lock for 15 s and more, with a thread moving physical pages and the nextMapstanding at it. With this change the "sparse: the queue has not reached fence value" lines are gone in the runs below and the title runs about 60–70 s longer before its watchdog ends it. It still ends there: the title's GPU queues waiting on each other (thequeue.Wait … released on CPUlines) are not changed by this.What is in it
crates/xcl/src/hle/d3d12x/sparse.rs:wait_released: the wait for the sparse queue's fence (5 s at most, as before) withSTATEreleased; the state is looked at again after it.upload_room/room_released: before each part of the uploads, the two command slots and the ring are checked and waited for with the lock released.before_executeandreadback_nowupload a part at a time, each as large as the ring has room for, scanned and uploaded in one hold of the lock. The waits insidebegin_slotandupload_dirtystay as they are and are not met any more.readback_released: a copy back (readback_now,readback_after_execute) is submitted (readback_submit), waited for with the lock released, then copied into the pages still committed (copy_back, taken out ofreadback_ranges).READBACKkeeps the one readback buffer to one copy at a time; it is taken beforeSTATE.crates/xcl/tests/sparse_lock_released.rs: the sparse queue is held by a fence. (1) A thread maps 8 bytes the GPU wrote; (2) a thread submits 96 MiB of CPU writes, more than the ring holds. In both, a commit and a submit on another thread must be through within 2 s; then theMapmust return the GPU's bytes and the first and last 8 bytes of the 96 MiB must be in video memory.Map), then the uploads (submit).Other open PRs on the same lock:
upload_dirty's ring loop after 5 s and drops the uploads that remain (their chunk hashes are already updated, so they are not sent later). This PR keeps them and gives the lock up instead. The two change the same loop; only one is needed.readback_after_execute(the copy back goes on the title's queue, landed by a worker). This PR keeps main'sreadback_after_executeand only moves its wait out of the lock.copy_backhas the signature #433 gives it, so a rebase of either is mechanical. The first version of this change was written on67a3735+ #433 + #968; there #433's two tests passed with it (sparse_readback_lands,sparse_readback_waits: 1 passed each). A reviewer merged22dd7d0with #433 and reports both conflicts mechanical and those tests passing; I have not run the rebased875a603with #433.sparse::queue(),forget_bufferfrom a release inside D3D12). Independent of this; rebased onto both. The conflicts were #968'sQUEUEstatic next to this PR'sREADBACK, and #1981'slock_state()where this PR takesREADBACKfirst (READBACKstays beforeSTATE).wait_releasedtakes the lock again withlock_state()too, so buffers released during a wait are let go then. #1983'snote_internal_waitlines are kept.STATEheld inreadback_rangesandupload_dirty.Tested
NVIDIA GeForce RTX 5080 (driver 621.24 = 32.0.16.2124), AMD Ryzen 7 5800X3D, 32 GB, Windows 11 Pro 10.0.26200, Rust 1.100.0
stable-x86_64-pc-windows-msvc, release. On875a603(this PR rebased ontomain06c9f55).cargo test --release -p xcl --test sparse_lock_released(before the rebases, on930e8b4):main(930e8b4) with only the test added: 0 passed, 1 failed after 5.6 s ("through within 2 s – behind a Map: false, behind a submit: false");On
875a603:cargo test --release -p xcl --test sparse_lock_released: 1 passed, 0 failed, 0 ignored.cargo test --release -p xcl --lib sparse -- --test-threads=4: 24 passed, 0 failed, 1 ignored.cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4on875a603: 1262 passed, 4 failed, 46 ignored. The 4 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(CreateComputePipelineState:E_OUTOFMEMORY), which fail the same way onmainon this machine. (Earlier: 761 / 0 / 41 on0012965, 752 / 0 / 41 on22dd7d0.)SKIPPED (26 lines):
no wave64indispatch_chain_native_wave64_builds_whole,gpu_wave32_program_in_wave64_hardware,gpu_geometry_wave32_prefix_count_over_a_mask, fourrecomp::lower::tests::*_agree_with_the_hlsl_path_on_the_gpu, and the wave64 cases ofrecomp::lower_dxil::tests(a_per_lane_2d_or_3d_group_runs_on_the_gpu,const_and_null_mask_operands…,f16/f32/f64/integer_programs_on_the_gpu,mask_ff0_and_flbit…); three wave32 per-lane cases off16/f32_programs_on_the_gpurefused (V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32, #1426);heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows);pso_measurement_compiles_an_exact_synthetic_record(driver cache cannot be disabled without Developer Mode).The newer retail title (#505), release,
XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=50 XCL_PRESS_AT=20:A XCL_RUN_SECONDS=300, warm DXIL and driver caches, counts fromxcl.log:main930e8b4+0x4684e7main930e8b4+0x23cf683)22dd7d0, before the rebase)22dd7d0, before the rebase)This PR's run 1 is left out: the scripted
Awas not taken (no GameInput line), so it stayed on the title screen. Earlier the same day, on67a3735+ #433 + #968: without this change 3–9 such lines in each of 4 runs, ending at 168–176 s; with it 0–1 lines, ending at 164 s and 262 s. These are few runs and the title's runs vary a lot; the stall lines are the clear difference.Regression run
main:
this PR:
Not tested
title_textures::refreshholds its own lock (REFRESH) aroundbefore_execute.UpdateTileMappingsandCreateHeapare still called with the lock held.AI use
🤖 Generated with Claude Code
@DavidM1911 on GitHub · 2026-11-24 16:55 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored.Thanks!
@jacksonslab on GitHub · 2026-11-24 15:44 UTC · original · edited 2026-11-24 17:28 UTC
Test report for the open point in the description: this port (
22dd7d0) run together with #433 (19004e1).Tree:
mainb8b1f49+ #433 + this PR, plus unrelated local merges (#759 stack, #1288, #1315/#1316). Release build, RTX 4070 SUPER 12 GB, i7-14700K, Windows 11 26200.Merge: two conflicts in
sparse.rs, both in the parts the description names.readback_after_execute: kept #433's version (copy back recorded on the title's queue, landed by its worker afterdrop(g)), so this PR'sreadback_released(g, &merged)there is dropped; #433's path doesn't wait onSTATEthere anyway.copy_back(same signature in both, as you said): kept #433'sreadback_onand this PR'sreadback_submit;readback_rangesgoes, as in this PR.Statetest fixtures onmainstill builtrb_fence/rb_value; they need #433'srb_fences: FxHashMap::default().Tests on the merged tree:
cargo test --release -p xcl --test sparse_lock_released --test sparse_readback_waits --test sparse_readback_lands: 1 passed each, 0 failed.cargo test --release -p xcl --lib -- sparse --test-threads=1: 16 passed, 0 failed, 1 ignored.Retail title (edit): two runs of retail 1.0.2.1 on this combination, Series X profile, on the same tree plus later local merges (#1288, #1422, #1429, #1284 and local diagnostics), so they say little about this PR alone:
sparse: the queue has not reached fence valueline, no device removal, no crash; peak local video memory 9,854 MB. The title sat in pipeline compiles for most of it.XCL_PSO_WAIT_MS=50): 3has not reached fence valuelines, then0x887a0006(device hung). 4,178 dispatches had been skipped by then, which I take to be the cause, not this PR; I have not shown that.Not tested: the whole suite, AMD.
AI use: Claude Code (Claude Opus 5.5) did the merge, ran the tests and wrote this report.
@WebIdentity1 on GitHub · 2026-11-24 17:10 UTC · original · edited 2026-11-24 17:36 UTC
Integration follow-up: the exact PR diff applies cleanly to main
9e3831e, but one depth/stencil command-list close failure in the first integrated full run remains unexplained. Subsequent focused/repeated library tests pass that case; I am not calling the integration clean. Details below.Readback follow-up on the same exact head
0012965: direct productionreadback_nowpreserves a newer4KiB CPU page when the real64MiB upload ring is blocked. It returns after5007ms on RTX3090 /5014ms on AMD integrated; after releasing the queue, an explicit same-page retry produces all1,024correct GPU words. Each adapter:1passed/0failed/0ignored, no skips/timeouts/device-removal errors, fresh Windows Session0 process. Command:cargo test --locked -p xcl --lib timed_out_readback_preserves_unsent_cpu_bytes -- --test-threads=1 --show-output --nocapture, with the respectiveXCL_ADAPTER; same environment below,227source hashes verified before/after.The identical fixture on #1495 overwrites all1,024CPU words with old GPU data on both adapters, while its exact parent preserves them. Complete six-run comparison and fixture. This adds readback-timeout preservation evidence; it does not test the Map ABI, concurrent CPU writes during readback, or resolve the separate integration failure above. Codex (GPT-6) wrote and ran the synthetic fixture and prepared this report. No runtime change or competing PR.
Independent native Windows validation of
0012965eda27e2a528b02c8722a415bde3c02788against its exact parent17216a14638659e550b76e3e8245728209b86b70: other threads make progress during the wait, and the delayed upload's bytes are preserved, on both RTX3090 and AMD integrated Graphics.This supports the approach already implemented here for the dropped-upload risk you identified in #1277. I reproduced that risk on exact heads of #1277 and #1495; those reports use their own exact-parent controls.
Tested
Each entry is one fresh-process run; counts are passed / failed / ignored.
sparse_lock_releasedsparse_lock_releasedNo skips or harness timeouts. Parent lock tests exit101 with both
behind a Map: false, behind a submit: false; the head tests exit0 and meet the existing two-second progress assertion. Head also passes the original GPU-byte and pending-submit assertions. The only edit to that existing test selects and prints the requested adapter; assertions/timing are unchanged. Parent has the same test copied in.The additional diagnostic uses the same readback oracle as the #1277/#1495 checks: old0x11 bytes, one4KiB page changed to0x22, a queue held across its five-second warning, then six-second recovery. All1,024GPU words match on both parent and head. Head waits6018ms (3090) /6011ms (AMD); parent6012ms /6018ms. Ring write position advances67108864→67112960, and a same-page retry preserves the correct bytes. Queue drain and device-removal checks pass.
Fixture adaptation: this PR reserves a page of upload-admission headroom, so the earlier fixture's first64MiB
before_executewould itself wait. Here I flush initial zeros, seed the tested page'ssenthashes through productionscan_page, and prime the real64MiB ring through productionState::upload_dirtybehind the gate. The changed page then goes through productionbefore_execute. No ring-counter injection or simulated wait result. Both parent/head use that identical adapted fixture. The separate existing integration test still exercisesbefore_executewith96MiB, including its first/last8byte checks.Commands, each with
XCL_ADAPTER=3090orAMD:Windows10 Home19045; Ryzen7 7800X3D; RTX3090 driver591.74 / AMD Radeon integrated32.0.21030.2001; Rust1.98.1 MSVC, Agility1.620.2, debug, SSH Session0. This adds the previously untested AMD/debug coverage for these cases. All227source hashes match each tree; head restored and reverified afterward. Local patch reverse-apply and diff checks pass.
Integration with main after #680 (separate trees, original author diff only)
Main:
9e3831e1f570d3646e53ab753b19ec07eb8f1485. Candidate: that exact revision plus the unchanged diff17216a1..0012965, applied cleanly; onlysparse.rsand this PR's originalsparse_lock_released.rsdiffer. No recovery probe or adapter-selection modifications in these trees. Diff SHA256:1da64539111fbc6d1c61cd7feb07d029f57949592364c757bbe91ec08e122449. No source push/rebase of the author's branch.Native interactive Session1, same hardware/toolchain,
XCL_ADAPTER=3090,XCL_REQUIRE_GPU=mesh, no heap-window opt-in override for the full pair:Both test commands exit101; no timeout. Both have four explicit skips: native-wave64 reference tests
gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware, plus debug-layer teststest_title_draws_with_a_root_signature_under_the_debug_layeranduploads_start_from_each_subresources_state. Sample inputs are unset and system XGameRuntime-dependent early returns are not coverage. Some original fixtures choose the default adapter themselves, so the entire suite is not claimed to execute exclusively on3090.Both share the known integer-CLAMP failure and a newly merged configuration-sensitive failure:
heap_window_out_of_memory_falls_back_to_the_switch_formcallsskip_test("no heap windows")without the opt-in, whichXCL_REQUIRE_GPU=meshmakes an error. WithXCL_HEAP_WINDOWS=1, a separate fresh-processcargo test --locked -p xcl --test gpu_compute_e2e -- --test-threads=1 --show-output --nocapturepasses 4 /0 /0 on each tree, no skips/timeouts. Logs identify the3090 and the switch-form retry. This exercises an injected pipeline OOM; it is not an actual driver OOM report. Full-suite counts above are retained, not rewritten as passing.Additional failure still unexplained: in the integrated first full run,
d32s8_targets_take_their_own_size_of_video_memoryreachesvram.rs:1010,list.Close().unwrap(), and receivesE_FAIL (0x80004005). This is not a poisoned-test-lock failure. The new sparse lock-progress integration test passes.Bounded follow-up on unchanged sources:
cargo test --locked -p xcl --lib d32s8_targets_take_their_own_size_of_video_memory -- --test-threads=1 --show-output --nocapture: 1 /0 /0 on each tree, no skips.cargo test --locked -p xcl --lib -- --test-threads=4 --show-output: 726 /1 /21 each run, only CLAMP failing, two explicit native-wave64 skips each. The depth/stencil test passes in all six.The single additional close failure has not been reproduced or attributed to this PR; those later passes do not explain it. Debug-layer diagnostics were unavailable in these runs. No complete full-workspace rerun with heap windows enabled, retail run, or claim that all integration gates are satisfied. All227baseline/228candidate file hashes match before and after testing; original worktrees retained.
Not tested
Full workspace with the local diagnostic fixtures (the full integration above uses the unmodified author diff), retail /
xcl-smoke, release, Linux/Wine, why the GPU queue stalls, permanent device loss, or the concurrent CPU-write/readback race noted in the description. No claim of full rendering/gameplay correctness or merge readiness. The diagnostic initializes sparse globals and runs alone. No runtime change or competing PR.AI use
Codex (GPT-6) inspected the overlap, adapted the local diagnostic and adapter selection, ran native tests and prepared this report. Existing lock-progress test is the author's. Public source/synthetic data only.
Complete local diagnostic and explicit-adapter patch against0012965
@vladbondarenko97 on GitHub · 2026-11-24 21:19 UTC · original · edited 2026-11-24 21:38 UTC
Retail-title run on NVIDIA. GTA VI 1.0.2.1, RTX 3080 Ti (driver 610.88), Windows 11, release,
XCL_PSO_WAIT_MS=50 XCL_PSO_TRACE=1, main4178e88+ this PR (0012965, clean local mergeea5073b), 900 s requested.sparse: the queue has not reachedline in the run (mainb9b6ea6on the same box logs it every 5 s from 154 s with the sparse queue stuck at 40159, and the title's watchdog fires at 180 s).GPU queue.Wait … >= 0x97f did not complete within 5000 ms: q0, q1, q2 and q4 wait on q3 (prod=qSome(3)/tySome(0)), and q3 waits on q1 (prod=qSome(1)/tySome(2)), all withcompleted=0x97e.unhandled exception 0xc0000005 in ntdll.dll+0x20191 (read at address 0x92b9); the process then did not exit and was killed at the time limit, sosmoke.ps1printed no block. Correction (edited): that fault is in XCL's own thread dumper at the requested 170 s dump (the known dumper crash, #253), not in the title; the run was still submitting work at 168.5 s.On main + #433 the symbolised thread dumps show the run is killed because a thread holds
sparse::STATEinside a blockedUpdateTileMappingswhile the frame-loop thread waits for it inforget_buffer(details on #433); I first misread that as a queue cycle.Not tested: AMD; together with #433.
AI use: Claude Code (Claude Opus 5.5) ran the box, read the log and wrote this report.
@thiagocalile on GitHub · 2026-11-25 00:49 UTC · original
Tested commit
0012965eda27e2a528b02c8722a415bde3c02788on an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native 64-lane waves) with targeted/workspace tests and a 60 sscripts/smoke.ps1regression run (comparing againstmain62265d3).Tested
32.0.21045.29003;XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11.XCL_ADAPTER=radeon cargo test -p xcl --lib sparse -- --test-threads=4: 17 passed, 0 failed, 1 ignored (40.45s).XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 758 passed, 3 failed, 41 ignored (61.01s).mainon this RX 6600 (placed_title_textures_share_vram_and_preserve_pixels+ 2 mutex-poison cascades; #1028).Regression run (
scripts/smoke.ps1, 60 s, release build,XCL_ADAPTER=radeon)Base (
main62265d3):PR (
0012965):Not tested
AI use
scripts/smoke.ps1runs on my RX 6600 and drafted this report; I checked the output before posting.@Alm0stSurely on GitHub · 2026-11-25 00:42 UTC · original · edited 2026-11-25 00:57 UTC
Linux / Proton check of the upload-slot path in
0012965. On main8c4a46aplus this PR's sparse.rs diff, we extended the integration test with 20 separate small uploads, changing known nonzero words to zero. The sparse queue was gated for more than 6 s (longer than the 5 s wait, far below ring capacity). The submitting thread stayed blocked, another thread read the sparse mappings within 2 s, and after release all 20 zeros and an untouched neighboring word were verified via GPU readback. The extended test passed in 7.66 s. An initial probe combining an independent allocation and submit did not finish within 2 s; the mapping-only probe specifically checks access to STATE.Runtime comparison on RTX 5080 / 620.73.04, EndeavourOS, Ryzen 9 9950X3D, ~60 GiB usable RAM, Proton Experimental. Same instrumented
689f2db+ #1368 as the baseline, plus this PR's sparse.rs delta, fresh copy of the same warm cache, HLSL,XCL_PSO_PRELOAD=0 XCL_PSO_WAIT_MS=250, 240 s cap. In the baseline, begin_slot timed out on two successive targets. With the patch the outer wait kept asking for 39880, completed 39875, at 206, 211, 216, 221 and 226 s. No inner begin_slot timeout marker. The last nonzero present window ended at 200.846 s. Frames at 195/210/225 s were effectively flat gray; device removal0x887a0005at 229.246 s and title exception at+0x23cf683immediately afterwards. Thus the guarded upload path preserved data under a temporary queue stall in the controlled test, but did not restore GPU progress in this run.Test orchestration and report assisted by Codex (GPT-6.2 Astra).
Two instrumented repeats, same PR and cache starting point. One run logged a sparse timeout (target 37865, completed 37861) and lost the device at 222.357 s. The diagnostic did not recover the origin of that signal. With the diagnostic moved outside the state lock, the next run reached
0x887a0005at 197.880 s with no logged five-second sparse timeout and no title queue watchdog release. Its 195 s frame was flat RGB(32,32,44). In both captures vkd3d reported a potential crash region containing compute hashaca5623498d28969, dispatch 160×90×1 and a UAV barrier. This region recurs with and without the sparse timeout; the command responsible for device loss remains undetermined.@JJAutoCompare on GitHub · 2026-11-25 01:19 UTC · original
Empirical test report for PR #1385 on Intel Arc A770 (
STOR-WINLAB).0012965eda27e2a528b02c8722a415bde3c02788(D3D12.X: waits for the sparse queue do not hold the sparse state's lock)origin/mainchecked:d63071abaf158ce8ebdb04be9e942d205c2c7d81(merge-tree check viagit merge-tree --write-tree origin/main HEAD: clean, exit 0, treeb5620e2c3df21033592f45654b13db8311929dd7)Tested
16258 MiBVRAM, driver32.0.101.9175,XCL_ADAPTER=A770), AMD Ryzen 7 3800X 8-Core Processor (6 cores / 12 logical processors)26200.9974)rustc 1.100.0 (0ef1bc386 2026-11-09), debug (dev/test) profile, DXC1.9.2609.5 (01b62ad47)cargo test --workspace --no-run— okcargo build --workspace— okcargo test -p xcl --test sparse_lock_released -- --show-output: 1 passed, 0 failed, 0 ignored (a_wait_for_the_sparse_queue_does_not_hold_the_state, 3.04s — ran with 3 sparse VRAM windows)cargo test -p xcl --test sparse_reinit -- --show-output: 1 passed, 0 failed, 0 ignored (the_sparse_state_is_replaced_outside_its_lock, 1.79s)cargo test -p xcl --lib hle::d3d12x::sparse -- --show-output: 14 passed, 0 failed, 1 ignored (early_commit_timing, 4.16s)cargo test --workspace -- --test-threads=4 --show-outputstopped afterxcllib (697 passed, 15 failed, 21 ignored, 3SKIPPED) due to the 15 pre-existing Arc A770gpu::recomp::testsfailures below.cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output(all 21 test targets / doc-tests):SKIPPEDGPU/adapter tests below, not counted as coverage — i.e., 740 non-skipped passed + 5 skipped):xcllib (src\lib.rs): 697 passed (incl. 3SKIPPED), 15 failed, 21 ignoredtests\sparse_lock_released.rs: 1 passed, 0 failed, 0 ignoredtests\sparse_reinit.rs: 1 passed, 0 failed, 0 ignoredtests\e2e.rs: 2 passed (incl. 1SKIPPED), 1 failed, 0 ignored (all sparse VRAM / upload / readback checks insidexcl_testtitlepassed)tests\texture_states.rs: 1 passed (1SKIPPED), 0 failed, 0 ignoredsrc\main.rs,bcpack_parity,console_dlls_e2e,console_shaders,disasm_e2e,gpu_compute_e2e,gpu_pso_e2e,heap_probe,low_va,pls_quota,predication_e2e,rpf_e2e,shaders_e2e,xg_oracle,xcl-testtitle, doc-tests): 43 passed, 0 failed, 20 ignoredSKIPPEDGPU/adapter tests (5 total, not counted as coverage):gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask:no wave64gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware:no wave64placed_title_textures_share_vram_and_preserve_pixels:tiled tier < 2test_title_draws_with_a_root_signature_under_the_debug_layer:no d3d12SDKLayers.dlluploads_start_from_each_subresources_state:no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))origin/maind63071ab, 0 regressions from PR #1385):gpu::recomp::tests::*FP64 pipeline failures (CreateComputePipelineState: The parameter is incorrect. (0x80070057)— Arc A770 lacks native FP64):gpu_clamp_and_omod_per_instruction,gpu_f64_class_compare,gpu_f64_compares_with_nan,gpu_f64_literal_high_word,gpu_f64_math_random,gpu_f64_roots,gpu_f64_rounding_and_conversions,gpu_float_compares_random,gpu_frexp_f64_exp_and_mant,gpu_ldexp_f64,gpu_rndne_f64gpu::recomp::tests::*Arc A770 shader precision/wave failures:gpu_nonfused_mad_and_mac_prevent_fma_contraction:assertion left == right failed: v_fma_f32 overflow control should stay fused (left: 2139095040, right: 1946157055)gpu_ps_image_sample_offset_implicit_lod_between_mips:pixel (0,0) = 25.609375, expected 26gpu_valu_16_and_64_bit:assertion left == right failed: lane 0 v_add_f16 keeps the high half (left: 0, right: 3203351424)gpu_wave64_ps_whole_wave_reductions:assertion left == right failed: pixel 0 (lane 0, wave of pixel 0): min / sum over the odd pixels, waterfall read (left: [2, 217, 2], right: [2, 216, 2])tests\e2e.rsfailure:test_title_runs_and_game_folder_is_untouched:[FAIL] D3D12.X: dynamic depth bias via RSSetDepthBiasX (#94): top-right [0, 0, 255, 255] (expected green: RSSetDepthBiasX(-1000.5) passes depth test)origin/main(d63071abaf158ce8ebdb04be9e942d205c2c7d81):cargo test -p xcl --lib -- --test-threads=4 --exact <the 15 failing lib tests>:0 passed, 15 failed, 0 ignoredcargo test -p xcl --test e2e -- --exact test_title_runs_and_game_folder_is_untouched:0 passed, 1 failed, 0 ignored(identicalRSSetDepthBiasX (#94)failure)Not tested
scripts/smoke.ps1regression run (no retail game folder on this host)d3d12SDKLayers.dllnot installed)XCL_SAMPLE_*environment variables (unset)--release)AI use
0012965eda), ran the merge-tree check, built and executed the targeted sparse tests, full workspace test suite, andorigin/mainbaseline failure verification on Intel Arc A770, and compiled/published this empirical test report from the actual command outputs.@MacieGx on GitHub · 2026-11-25 13:59 UTC · original
Rebased onto
main06c9f55(now875a603, still one commit). The only conflicts weremain's
lock_state()(from "a buffer's last release does not wait for the sparse state'slock") at the two places this PR takes
READBACKfirst;READBACKstays beforeSTATE, andwait_releasednow takes the lock again withlock_state()too, so buffers released duringa wait are let go then. Main's
note_internal_waitinreadback_after_executeandbefore_executeis kept. No other change. Test counts and the new regression run are in thedescription.
Thanks for the reports:
RTX 3060 Ti, RX 6600 and Arc A770; I have no AMD or Intel GPU, so these are the only runs
there.
them; this rebase did not touch
readback_after_executebeyond takingREADBACKbeforelock_state().d32s8_targets_take_their_own_size_of_video_memorypassed in the full release run on theRTX 5080; I have not seen the
Close()E_FAIL either.the sparse queue stands still; it does not make the GPU go on (in the description under
Not tested). The thread holding
STATEinside a blockedUpdateTileMappingsthat youfound on main + #433 is also listed there:
UpdateTileMappingsandCreateHeapare stillcalled with the lock held. That would be its own PR.
@thiagocalile on GitHub · 2026-11-25 15:18 UTC · original
Independent retest of rebased head
875a60352ed34f11f4c4751ed6a740927533366b(onmain06c9f5505f63f10c5ec49ef932d75b2c28177324) on an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).Tested
32.0.21045.29003,XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11.XCL_ADAPTER=radeon cargo test -p xcl --lib sparse -- --test-threads=4: 24 passed, 0 failed, 1 ignored (0skipped).XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 1,265 passed, 1 failed, 46 ignored across 24 test binaries (10SKIPPED: 6 per-lane f16/f32 unsupported ops, 1pso_measurement_compiles_an_exact_synthetic_recordno Developer Mode, 2 no D3D12 debug layer, 1 no heap windows).gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(the known RX 6600 driver32.0.21045.29003sext i1 -> i64miscompile on seed 540, pre-existing onmain).Regression run (
scripts/smoke.ps1 -Seconds 60, release builds,XCL_ADAPTER=radeon)main:PR
#1385(875a603):Not tested: NVIDIA / Intel GPUs, Linux/Wine, D3D12 debug-layer tests (SDK debug layer not installed), or world load past the 60 s smoke window.
AI use: Antigravity (Gemini 4 Neon) ran the builds, test suites, and smoke pair and drafted this report; the account owner reviewed and approved posting.
@lucsoft on GitHub · 2026-11-25 19:28 UTC · original
Test report: Linux / RADV, RX 7800 XT (RDNA3). Head
875a603, in a stack, not alone. No sparse-lock stall in two runs, of 2500 s and 2750 s.main50a9fdeplus about 20 other PRs, including #2009 and #1993 (69903fc). The full list is in #505.copy_back(parts)and #1993'scopy_back(dst, off, len)share a name. Locally #1385's is renamedcopy_back_parts. #1993'swait_fence(…, limit)also clashes with this PR'swait_fenceand is renamedwait_fence_for.lock wait 4350 ms, againstwrite-watch 214612 ms,chunk scan 21207 msandupload 17827 ms.3260d40, the submit thread did block on that lock, behindsettle_readbacks_try. That was #1993's path, not this one.AI use: Claude Code (Claude Opus 5.5) ran the analysis and drafted this. The runs were real, on the hardware above.
@itsSio on GitHub · 2026-11-26 03:57 UTC · original
Independent dual-PC NVIDIA full-workspace test report on clean head
875a60352ed34f11f4c4751ed6a740927533366b.Tested
32.0.16.1088), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro build 26200,rustc 1.97.0(stable-x86_64-pc-windows-msvc), DXC1.9.2609.5, debug build (XCL_ADAPTER=NVIDIA)cargo build --workspace: exit 0cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture: 1266 passed, 0 failed, 46 ignored (sparse_lock_released::a_wait_for_the_sparse_queue_does_not_hold_the_statepassed)SKIPPED: 26 (wave64-only GPU tests,#1426wave32 f16/cvt refusals,heap_window_out_of_memory_falls_back_to_the_switch_form,pso_measurement_compiles_an_exact_synthetic_record)32.0.16.1088), AMD Ryzen 5 5600X, 16 GB RAM, Windows 11 Pro build 26200,rustc 1.99.1(stable-x86_64-pc-windows-msvc), Windows SDK 10.0.26100 DXC1.8.2502.11, debug build (XCL_ADAPTER=NVIDIA)cargo build --workspace: exit 0cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture: 1266 passed, 0 failed, 46 ignored (sparse_lock_released::a_wait_for_the_sparse_queue_does_not_hold_the_statepassed)SKIPPED: 28 (same wave64/f16/heap-window/pso-measurement skips plus missingd3d12SDKLayers.dll)Not tested
scripts/smoke.ps1runs--release)AI use
Ran via Samaritan:
@DavidM1911 on GitHub · 2026-11-26 05:03 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
@GonZiin on GitHub · 2026-11-24 17:54 UTC · original · reviewed
I verified that the sparse queue regression test fails on the parent, passes on this head, and passes in the full workspace after merging with current
main. Given the separate results on #1277 and #1495 showing pending uploads lost after a timeout, I would use #1385 as the candidate for the shared upload-ring problem and keep the recovery cases in its review.Tested
XCL_ADAPTER=RX 9070 XTfor the workspace harness. The standalone integration fixture creates the default D3D12 device.cargo test -p xcl --test sparse_lock_released -- --test-threads=1 --nocaptureon head0012965eda27e2a528b02c8722a415bde3c02788gave 1 passed, 0 failed and 0 ignored. The unchanged test copied onto parent17216a14638659e550b76e3e8245728209b86b70gave 0 passed, 1 failed and 0 ignored. Both the Map and submit cases on the parent held up the other thread past the two-second limit..\scripts\test.ps1on the clean temporary merge withmainat9e3831e1f570d3646e53ab753b19ec07eb8f1485(tree66e1c11376a91a0e5f23fbbf1c362194e38d6c71) exited 0. It reported 777 passed, 0 failed and 41 ignored. One GPU skip within the passing count washeap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows). Both the sparse queue fixture and the bundled title end-to-end test passed.Not tested
Retail titles, opt-in sample data and the other two PRs' timeout-recovery probes on this machine.
AI use
Codex (
gpt-6.2-sol) compared the three proposals, ran the Windows tests and drafted this review.@bmjask on GitHub · 2026-11-25 21:33 UTC · original · reviewed
P1: releasing STATE during readback allows stale-copyback after remap. readback_released submits copy, drops lock, then after reacquire copies old (address,bytes) if fence matches—but concurrent decommit/recommit of same virtual address changes mapping/pool and is not validated. Old VRAM bytes can overwrite fresh CPU pages and be recorded current. Snapshot/validate per-tile mapping generation/pool identity before copyback (or serialize mappings), with readback -> unlock -> decommit/recommit -> fence-complete regression.
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.