Repository navigation
Tests: the sparse VRAM test no longer depends on what ran before it - #614
Conversation
gpu_sparse_vram_descriptors_buffers_and_xmem left SOFFSET unset on its three S_LOAD_DWORD* instructions. The field is then 0, which is s0, so every load added s0: the low half of arg_table's address. That is 0 only while arg_table is the first allocation in the coherent window. After an earlier uma.alloc (placed_title_textures_share_vram_and_preserve_pixels takes 16 MiB there) the descriptor loads read s0 bytes past the heap and out_buf stayed 0: "submit 1 lane 0 mismatch", left 0, right 1077. They now pass SOFFSET = 125 (no register), as the other SMEM tests do. Part of xcl-dev#343 Assisted-by: Claude Code (Claude Fable 5.2)
gpu_sparse_vram_descriptors_buffers_and_xmem and gpu_uma_import_check_at_init called real::init() directly, the only callers besides d3d12x::backend(). Two first calls at once each open the UMA windows, and the second replaces the sparse state the first test is using: the mismatch beside gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes, and the way the suite reaches the deadlock of xcl-dev#344. backend() initialises once. The change was first described by CryingLaughing in xcl-dev#343. Fixes xcl-dev#343 Assisted-by: Claude Code (Claude Fable 5.2)
|
Verified with the pairings from #343 (each the sparse test plus one title-texture test in one process, default threads, 6 runs each). AMD Radeon RX 9060 XT (RDNA4), Windows 11 26200, Rust 1.100.0, debug:
AI use
|
|
Test run of Tested
Review: Not tested: no retail title or regression run (I have no unpacked game), no Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
|
Tested
All five failures were Not tested
AI use
|
|
Test report for Tested
Not tested
🤖 Claude Opus 5.5 |
|
@LucasHoepfner, following up on my earlier investigation in #343, I tested your exact PR head in release mode on my RTX 4060. Both previously failing pairings now pass consistently. Tested
Each exact pairing was executed in six fresh processes, totaling 24 successful test executions with no explicit skips. All 12 paired runs logged exactly one Commands cargo test --release -p xcl --lib --locked -- title_textures gpu_sparse_vram_descriptors_buffers_and_xmem --test-threads=4 --show-output
cargo test --release -p xcl --lib --locked -- $sparse $pair --exact --test-threads=2 --show-output
cargo build --release --workspace --locked
cargo test --release --workspace --locked --no-fail-fast -- --test-threads=4 --show-outputThe full workspace run exited with code 0. The worktree remained clean. Two explicit capability skips in the full suite, included in the passed count:
Not tested: native wave64, AMD/Intel GPUs, retail titles, optional external samples, or a fresh baseline comparison in this run. No blocking findings within the tested scope. Nice work tracking down both root causes! AI use: ChatGPT (GPT-6.2) assisted with test planning, log analysis and report preparation. All commands were executed locally by me. |
|
Native NVIDIA check of these two commits ported onto current Integration head e0f2c3b preserves your authorship and both patches unchanged ( Tested
The placed-pair skips exposed a separate test setup issue. The placed test creates a device through inbox ead19fb is an optional two-line test-only follow-up on the integration tree: initialize Final build passed. The full workspace with that follow-up finished 751 passed / 0 failed / 41 ignored, with the same two wave64 skips. An earlier run of the same tree was 749 / 2 / 41, plus a third skip ( Not tested: your exact head on its old base, release, AMD/Intel/native wave64, retail title smoke or optional samples. The added lines are inside the existing test; runtime code is unchanged. AI use: Codex (GPT-6; exact variant unavailable) ported the commits, ran these checks, wrote the small test setup change, and prepared this report. |
|
Tested RTX 5060 Ti 8 GB (32-lane waves), NVIDIA 621.24, Ryzen 5 5600X, Windows 11 Pro 26300, rustc 1.100.0 MSVC, debug, no Each run is its own process:
All 13 failures on
Not tested: AMD / Intel GPUs, a release build, a title, each of the two changes on its own. Run and written with Claude Code (Claude Opus 5.5). |
|
Test report for this PR's exact head Tested
Not tested
AI use: Claude Code (Claude Fable 5.2, Claude Opus 5.5) |
|
Test report: on an RTX 5070 (driver 621.24, Windows 11 26H2), main 85e3826 with AI use: Claude Code (claude-opus-5-5) ran the measurements and drafted this comment; I reviewed it. |
|
Second report for Tested
Not tested: other drivers on this GPU (so nothing here says whether the rate depends on the driver), the whole lib on the HLSL path, each of the two commits alone, AMD / Intel, release, the debug layer / DRED, a title. Run and written with Claude Code (Claude Opus 5.5). |
|
Confirmed the first commit's scalar-offset fix on an RTX 5060 Laptop GPU under Proton. In a private variant of I changed only the three synthetic Windows MSVC release tests under Proton Experimental 11.0-20261112, Bazzite 44, NVIDIA 615.78.08, vkd3d-proton 3.1.0 with local dxil-spirv compatibility changes. The underlying tree was OpenAI Codex (GPT-6.2-Sol) prepared the synthetic probe, ran it and wrote this report. |
gpu_sparse_vram_descriptors_buffers_and_xmemfailed beside the title-texture tests for two reasons, both in the test. Fixes #343 (analysis: #343 (comment)). Fixes #1727: the second reason is also what hangs the GPU in parallel test runs on NVIDIA 32-lane cards, not the direct translator's group barrier (bisected by IgorAntunes66, #1727 (comment)).S_LOAD_DWORD*instructions leftSOFFSETunset. The field is then 0, which iss0, so every load added the low half ofarg_table's address (t1_a = (s0 + 0x0 + s0) & ~3uin the translated HLSL). That is 0 only whilearg_tableis the first allocation in the coherent window. After an earlieruma.alloc(the placed-texture test takes 16 MiB) the descriptor loads read past the heap andout_bufstayed 0.gpu_uma_import_check_at_initcalledreal::init()directly. Two first calls at once open the UMA windows twice, and the second replaces the sparse state in use. This is also how the suite reaches D3D12.X: replacing the sparse state deadlocks when the old state still holds placed buffers #344.What is in it
Tests: the sparse VRAM test's scalar loads take no register offset:("SOFFSET", 125)on the three loads, as the other SMEM tests pass it (crates/xcl/src/gpu/recomp/tests.rs).Tests: the sparse VRAM and UMA import tests take the backend's device: both go throughd3d12x::backend(), which initialises once (same file). The change was first described by @CryingLaughing in Tests: gpu_sparse_vram_descriptors_buffers_and_xmem fails beside the title-texture tests since #288 #343.Tested
stable-x86_64-pc-windows-msvc; DXC 1.8.2502.11; debug.cargo test --workspace --no-fail-fast -- --test-threads=4on this head (0fb9f4a, onmaincb868b2): 685 passed, 0 failed, 41 ignored. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).--test-threads=45/5.main9ce2070(lib test binary, each run in its own process):main--exact)--exact)title_textures gpu_sparse_vram_descriptors_buffers_and_xmem --test-threads=4--test-threads=4submit 1 lane 0 mismatch(left 0, right 1077). Every run with both commits logged onesparse window(s)line; every mirror run without the second logged two.main, one extrau.alloc(0x1_0000, 256)beforearg_table(local edit) makes the sparse test fail alone, every time.mainae0518cagainst the same with0fb9f4amerged (clean merge, local). The whole lib test binary withXCL_DIRECT_DXIL=1and--test-threads=4, each run in its own process, the two builds alternating, 35 runs each:mainae0518c0fb9f4a0x887a0006)nvlddmkm153 events for that time, all inside the 5 hung runs. Without the variable nothing hung or failed on either build (10 runs each, 1037 passed, 0 failed, 26 ignored).XCL_DIRECT_DXIL=1both builds also failgpu_fmt_encode_int_sat_and_f16_rtzandgpu_image_get_resinfo_1d_arrayin every run. They came with Recompiler: saturate UINT/SINT and use RTZ in fmt_encode #1929 and Recompiler: image_get_resinfo on a 1D array gives the layers in y #1266, which change the HLSL path only, and are not part of this.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4on that merge: 1086 passed, 0 failed, 46 ignored. SKIPPED: 19 ×no wave64,heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(Developer Mode is off), 3 per-lane programs with f16 instructions (refused (unsupported …)).Regression run
crates/xcl/src/gpu/recomp/tests.rschanges.Not tested
gpu_unified_memory_arenaandgpu_memory_windows_above_4_gibalso leaveSOFFSETunset on SMEM loads. I did not check whats0holds there and did not change them.XCL_DIRECT_DXIL=1. Thegpu::recomp::tests::gpu_filter on the HLSL path, where the RTX 5060 Ti report saw hangs, was not run here.AI use