Repository navigation
d3d12: an ARRAY_OF_POINTERS entry below the arena is not an overflow (d3d12_indirect_rt on NVIDIA) - #6010
d3d12: an ARRAY_OF_POINTERS entry below the arena is not an overflow (d3d12_indirect_rt on NVIDIA)#6010lines9686-rgb wants to merge 1 commit into
Conversation
stage_khr_instances refused a pointer whose VA is above UINT64_MAX - heap_base. An UPLOAD buffer's VA is its
device address minus the heap base, so a buffer allocated below the arena has a VA that wraps, and heap_base + va
is its device address again, as addr() in vulkan_replay.h and the XDXR path compute it. The refusal failed the
whole ExecuteCommandLists ("invalid copy or resolve"), so d3d12_indirect_rt failed on NVIDIA (RTX 3060 Ti, and
RTX 2080 Ti per ItsNotRexed#166) since cc4b374.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested 2e86358 on Windows 11 with the NVIDIA GeForce RTX 4090 (driver 32.0.16.2101) and AMD Radeon integrated graphics (driver 32.0.21043.5001). The targeted ray-tracing test passes on each adapter with zero Vulkan validation errors. I built the PR and its parent Both TLAS layouts give hit=1 and miss=0 on both revisions. Both revisions also reject the null entry and the GPU-written placed pointer list before submission. The parent passes here, so these runs do not reproduce the below-arena allocation seen on the RTX 3060 Ti. This check covers the indirect RT target only. AI-assisted. |
|
Tested
No game files. |
|
Tested 2e86358 (merged on
|
|
Tested
So on a Blackwell card this one fixes the failure @zxcvqwerasdf couldn't reproduce on an RTX 2080 Ti. AI-assisted (Claude Code). |
|
Tested 2e86358 on Windows 11, AMD Radeon RX 9070 XT (RDNA4), driver 32.0.32029.2010: pass, but the run cannot tell fix from no fix
AI-assisted (Claude Code). |
|
Tested
|
Item: new finding, claimed in #5934 (#5934 (comment)). Depends on: none. Regression from cc4b374 (#4060's merge, "translate ARRAY_OF_POINTERS instances on the KHR path"); @ttd0x reported the failure in #166 and bisected it to that commit.
What fails.
d3d12_indirect_rtonmain561b65a8, RTX 3060 Ti (NVIDIA 610.88, Windows 11, Resizable BAR: upload heaps live in VRAM) and RTX 2080 Ti (#166):It passed on
3faac557, before cc4b374.Why.
stage_khr_instances(runtime/src/vulkan_backend.h) refuses a pointer-list entry whenva > UINT64_MAX - vk.heap_base. The list's host read is fine (a debug print gaveva=0xfffffffffed40000 status=ok); the refusal is that overflow check. An UPLOAD buffer's VA is its device address minus the heap base (docs/d3d12_vulkan.md, section 3), so a buffer allocated below the arena has a VA that wraps, andheap_base + vais its device address again. Every other VA-to-address conversion is that wrapping sum (addr()invulkan_replay.h, the XDXR path). The refusal fails the wholeExecuteCommandLists, so the plain ARRAY TLAS in the same list misses too.Fix. Drop that one condition and say why in a comment. Null entries, entries outside any buffer and entries with less than 64 bytes of room are still refused by the same
if.Tested on the RTX 3060 Ti, MSVC RelWithDebInfo, on
main561b65a8:d3d12_indirect_rt_test: PASS (0 validation errors): BLAS + TLAS ARRAY and ARRAY_OF_POINTERS hit=1 miss=0, the null-entry and GPU-written-list refusals still refuse before submission.d3d12_indirect_dispatch_count, fails the same on main and is d3d12_indirect_dispatch_count_test: its compute fixture reads the root UAV at s4:s5 (D3D-448 layout) #5792's.xdxr_build_check,d3d12_xdxr_rt_checkand the other RT tests pass.No game files. AI-assisted (Claude Code).
🤖 Generated with Claude Code