Repository navigation
Recompiler: heap memory windows start after a null descriptor pair - #1992
Merged
Merged
Conversation
A T# of zeros (an empty console slot) has PC index 0 in word 0, so image shaders read ResourceDescriptorHeap[0] (SRV) / [1] (UAV). With heap windows on, MEM_HEAP_BASE was 0: those descriptors were the memory windows' 4 GiB raw buffer UAVs, read as textures, which hung the GPU (DXGI_ERROR_DEVICE_HUNG). The windows now start at descriptor 4, and descriptors 0..4 of the shared heap hold null SRV / UAV views. Translator version bumped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bmjask
force-pushed
the
fix/heap-window-hang
branch
from
November 25, 2026 00:56
5db5b1d to
daf52ab
Compare
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
Contributor
|
AMD RDNA3 (RX 7800 XT, native wave64) test report for #1992 at Tested
Not tested
AI use
|
Member
|
Remaining before merge:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With 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 on 7994cd1)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