Recompiler: heap memory windows start after a null descriptor pair #1992
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!1992
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1992/head"
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?
@bmjask on GitHub · 2026-11-25 00:28 UTC · original
bmjask:fix/heap-window-hang→main· +67 −4 · 4 files · 3 commits · merged 2026-11-25 01:58 UTCWith heap memory windows on (
XCL_HEAP_WINDOWS=1), window k was raw UAVkof the shared descriptor heap (MEM_HEAP_BASE= 0). A T# of zeros (an empty console slot) has PC descriptor index 0 in word 0, so an image access through it read descriptor 0/1 – the 4 GiB raw buffer view of a memory window – as a texture. The windows now start at descriptor 4, and descriptors 0..3 hold null SRV / UAV views, so a zero T# reads zeros. Translator version 8 → 9 (new cache keys).This is hardening found while investigating a GPU hang of a retail title with direct DXIL + heap windows; it does not fix that hang (the compute queue still stops at the same point), which is being bisected separately.
What is in it
recomp::MEM_HEAP_BASE= 4; the HLSL and direct DXIL heap lookups use it;console_heapwrites null SRV/UAV views at descriptors 0..3.zero_tsharp_does_not_reach_window_views;gpu_memory_windows_from_the_heapexpects the new base.Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4: 998 passed, 0 failed, 45 ignored (after rebasing on7994cd1)Regression run
D:\xcl-worktrees\<worktree>\scripts\smoke.ps1 -Game 'D:\game' -Xcl D:\xcl-worktrees\<worktree>\target\release\xcl.exewithXCL_PRESS_AT=2:B,4:B,6:B,8:B XCL_PRESS_A_AT=10,15,20,25,30,40(each worktree's own smoke.ps1; main =D:\xcl-worktrees\main-g14(mainde36462, second run with a warm cache), PR =D:\xcl-worktrees\heap-hang)main:
Not tested
XCL_HEAP_WINDOWS=1the retail title still hangs at ~90 s (separate issue).AI use
🤖 Generated with Claude Code
@oni-swr on GitHub · 2026-11-25 01:06 UTC · original
AMD RDNA3 (RX 7800 XT, native wave64) test report for #1992 at
5db5b1d1merged withmain2e1c9562(clean merge). Note: the PR head moved todaf52aba(rebase + translator version 8 → 9) after this run finished; I did not rerun ondaf52aba.Tested
Windows Kits\10\bin\10.0.26100.0\x64), debug build,XCL_ADAPTER="RX 7800 XT".cargo test -p xcl --lib zero_tsharp_does_not_reach_window_views -- --nocapture: 1 passed, 0 failed (0.00s)cargo test -p xcl --lib gpu_memory_windows_from_the_heap -- --nocapture: 1 passed, 0 failed (0.26s)XCL_HEAP_WINDOWS=1 cargo test -p xcl --test gpu_compute_e2e -- --nocapture: 4 passed, 0 failed, 0 skipped (1.84s;heap_window_out_of_memory_falls_back_to_the_switch_formran and passed with heap windows enabled)cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture): 1001 passed, 1 failed, 45 ignored across 20 test binaries.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722: res[30] = 0x1, CPU 0x7fffffff). Verified directly onorigin/main2e1c9562on the same RX 7800 XT: it fails identically there (pre-existing onmain, unrelated to this PR).SKIPPEDlines (7): the 6 intentional#1426per-lane refusals ingpu::recomp::lower_dxil::tests(V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32, wave32 and wave64) plusheap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows(whenXCL_HEAP_WINDOWSis unset). Zerono wave64skips.Not tested
daf52aba, release build,scripts/smoke.ps1title run, or a title run withXCL_HEAP_WINDOWS=1.AI use
5db5b1d1in a temporary worktree, ran the targeted and workspace tests on @oni-swr's machine, and wrote this report.@raylitebull on GitHub · 2026-11-25 01:08 UTC · original
Build and testandPR descriptionare green on5db5b1d.Remaining before merge:
main(dropping the manualTRANSLATOR_VERSION = 8bump inkernel.rs, since#1950took8and#1947now auto-hashesgpu/dxilsources).@futurepro62 on GitHub · 2026-11-25 01:02 UTC · original · edited 2026-11-25 01:22 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
daf52ab(on its base7994cd1).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::dxil::fuzz_tests: 987 passed, 0 failed, 43 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,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.zero_tsharp_does_not_reach_window_views.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 997 passed, 0 failed, 45 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 main7994cd1too, 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 andconst_and_null_mask_operands_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 03:42 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. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!