d3d12: descriptor_paging mixes 64-byte native stride authoring with 32-byte INLINE_BYTES lookup on RADV #182
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/brcly--TuxBox#182
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@DrArroway on GitHub · 2026-11-25 17:38 UTC · original
Summary
On AMD RADV under Proton Experimental (
vkd3d-proton 3.2.0),lanes-selftest-descriptor-reclaim(#172) fails in Phase 1 (sustained turnover) onmain(7b22d71):Note: this is distinct from PR #178's Phase 5
E_OUTOFMEMORYheap-limit issue — on RX 6900 XT + Mesa RADV, the firstsustained turnoverdispatch fails even withTUXBOX_DESCRIPTOR_HEAP_LIMIT=1000000. All 64 other gates intuxbox.py verifypass on the same checkout (64/65).Environment
7b22d711002:73bf)26.3.1-arch3.4(CachyOS Linux)1794497090 experimental-11.0-20261112-x86_64,vkd3d-proton 3.2.0)Controlled repro matrix
Running
lanes.exe --selftest descriptor-reclaim --adapter 1002:73bfon7b22d71:TUXBOX_DESCRIPTOR_HEAP_LIMITCBV_SRV_UAVstrideVK_EXT_descriptor_heapenabled)64sustained turnover mismatch at output 0,0xdeadbeef)VK_EXT_descriptor_heapenabled)100000064sustained turnover mismatch at output 0,0xdeadbeef)VKD3D_DISABLE_EXTENSIONS=VK_EXT_descriptor_heap(VK_EXT_descriptor_buffer)100000064sustained turnover mismatch at output 0,0xdeadbeef)VKD3D_DISABLE_EXTENSIONS=VK_EXT_descriptor_heap,VK_EXT_descriptor_buffer1000000/ unset32lanes-selftest PASS pci=1002:73bf scenario=descriptor-reclaim passed=1)Root cause in
descriptor_pagingOn RADV with
VK_EXT_descriptor_heaporVK_EXT_descriptor_buffer,vkd3d-protonreportsGetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV) == 64.increment_sizereturns the host stride (64) to the guest, andArena::createsetsself.inline = truebecauseowner.state.device11_queue && stride >= INLINE_BYTES && stride.is_multiple_of(INLINE_BYTES).Arena::authorstoresInlineDescriptorrecords usingself.stride(64-byte spacing):lanes.exe --selftest descriptor-reclaim(examples/lanes/selftest.cpp),cpu_at(slot_base + index)places CBV at+0, SRV at+64, and UAV at+8191 * 64.Arena::gpu_tablewalksindexusingINLINE_BYTES(32-byte spacing) instead ofself.stride, whileArena::publishscales table slot offsets byself.stride / INLINE_BYTES(2x).With
TUXBOX_LOG=1, only slot 0 matches and slots 1+ read unauthored zero bytes and get replaced with null Texture2D SRVs, so the compute shader never writes todst_buf:Using
self.stride / INLINE_BYTESwas written to support 32-byte Xbox inline descriptor copies on a 64-byte native stride heap (likeProjectScarlett), whereas callers/tests usingGetDescriptorHandleIncrementSize()(64) author descriptors at 64-byte spacing. Disabling bothVK_EXT_descriptor_heapandVK_EXT_descriptor_bufferdrops native stride back to32, whereauthor()andgpu_table()agree and the test passes.