Skip to content

D3D12.X: a T# that is no XCL view indexes ResourceDescriptorHeap with its address bits – RADV page fault (SQC data), device removed during world loading #575

Backlog

Description

@xstraok

A retail game (Series X profile, 1.0.2.1) on Linux (Wine + vkd3d-proton, RADV) loses the device 65–90 s into world loading:
kernel [gfxhub] page fault … Faulty UTCL2 client ID: SQC (data) (0xa), PERMISSION_FAULTS: 0x3, then
ring gfx_0.0.0 timeout and D3D12 device removed: 0x887a0005. 4 of 4 runs that reached world loading,
on main a6f5f7a + #257, with and without #458 / #496 / #484.

What the faulting address is. RADV_DEBUG=bo_history logs every BO's VA: no BO ever covered the faulting
addresses (0x8000e2a24000 – the same address in 3 runs – and 0x800004622000). Both are in RADV's 32-bit
descriptor range, past the end of the shared view heap: the BO at 0x800000600000 is 32 000 000 bytes =
1 000 000 descriptors × 32 B (XCL's console descriptor heaps: one shader-visible PC heap of 1000000 view descriptors). As heap indices they are 0x7121200 and 0x201100; as a console T#'s word 0 (BASE_ADDRESS >> 8)
they are 0x7_1212_0000 and 0x2011_0000, both inside the title's own mappings (0x7_0000_0000–0x7_2000_0000 and
0x1a3e_0000–0x637e_0000). So a shader reads a T# that is still in the console encoding (not rewritten by
desc::xcl_image_words) and ResourceDescriptorHeap[NonUniformResourceIndex(tw0)] reads ~3.6 GB past the heap.

Not known: which shader, and where that T# comes from (a descriptor the title writes as memory without a
view call, GPU-written tables, a heap slot reused…). On Windows / NVIDIA an out-of-range read of the heap may not
fault, so the same T#s may only draw wrong textures there.

Experiment (patch attached, heap-index-clamp.patch, 35 lines): image instructions clamp the heap index to
the shared heap's last slot (min(tw0, cap - 1), UAV min(tw0 + 1, cap - 1); gpu::desc::VIEW_HEAP_LAST,
set by console_heap::shared_heap, 2^21 − 1 until the heap exists). With it, the same title streamed 112 s into
world loading with no GPU fault, until system memory ran out (#248-like growth: video memory full at 14.4 GB of
16, RSS +2.5 GB / 5 s). The screen was black after loading – not yet known whether that is the clamped T#s
(an unused slot samples zeros) or the world rendering path; no earlier run got that far.

Tested: RX 9060 XT (RDNA4, Mesa 26.2.6 RADV), Arch Linux 7.2.15-zen, Proton Experimental Wine + vkd3d-proton
(relaxed as in #257), cross-built x86_64-pc-windows-gnu release. Under Wine:
cargo test --release --target x86_64-pc-windows-gnu -p xcl --lib image_heap_index: 1 passed (fails without
the emit change: heap index not clamped to 2097151); … --lib -- recomp:: desc:: console_heap --skip gpu_ --skip mesh_dispatch: 110 passed, 0 failed, 17 ignored. Whole suite, Windows and smoke.ps1: not run.

AI-assisted: Claude Code (Claude Opus 5.5) found the cause from the logs, wrote the patch, the test and this text.

heap-index-clamp.patch


Update 2026-11-23: the patch is now draft PR #610 (on main cb868b2, whole lib suite run under Wine, counts there). What stopped the clamped runs is not this fault and not XCL's memory. In two runs, a title PSO thread got stuck in vkd3d-proton's DXIL→SPIR-V conversion (dxil_spv::CFGStructurizer) of one ~284 KB translated compute program; it grows ~500 MB/s until RAM runs out or the title's watchdog fires (+0x23cf683, as in #505 / #534). Reproduced with the standalone dxil-spirv CLI (20 GB in 60 s). It will be reported separately. The black screen after loading is still unexplained.

AI-assisted update: Claude Code (Claude Opus 5.5).

Metadata

Metadata

Assignees

No one assigned

    Labels

    goal:world-load

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions