OLD-8414: restore old upstream PR 8414 - d3d12: arena AS resources take their address from vkGetAccelerationStructureDeviceAddressKHR #710
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!710
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/710/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?
@aslan2142 on GitHub · 2026-11-24 12:30 UTC · original
aslan2142:gpuav-as-type→main· +112 −2 · 2 files · 2 commits · merged 2026-11-25 22:59 UTCClaimed in the coordination issue as: OLD-8414 #14
Restoration of my original pull request, old upstream PR 8414 in
ItsNotRexed/Leonida, which was closed unmerged when that repository went private on 2026-11-23 (old numbers link nowhere now). Ported onto main at21625bca8c. The runtime change applies unchanged. Ind3d12_indirect_rt_test.cpp, main's CLONE/COMPACT tests stay as they are, and the new checks go right after the TLAS lookups, where they were in the original.What and why
vkGetAccelerationStructureDeviceAddressKHR(VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-12281). For aGENERICstructure the spec only promises consistent offsets between the structures of one buffer, not that the address equals the buffer address.buffer_va_path.GENERICstructure built as bottom level is "not a bottom level acceleration structure", which the spec allows.d3d12_indirect_rt:get_instance_procreturns avkGetAccelerationStructureDeviceAddressKHRthat adds 256 MiB to the real address (no runtime change), an AS resource's GPU VA is the driver's address, and the arena address still names the structure.Tested
On Linux,
d3d12_indirect_rt_testwas cross-built with clang for the mingw target and run under Wine 11.22 (staging) on Mesa 26.3.1 RADV. CI's MSVC build was not run locally. Each GPU ran three builds: main, main with only the new test, and this branch. Every run used the host Khronos validation layer.LEONIDA_UPLOAD_SYSMEM=1LEONIDA_UPLOAD_SYSMEM=1With GPU-AV (
VK_KHRONOS_VALIDATION_GPUAV_ENABLE=1), both GPUs give the same result as each other and as the original PR:GENERICstructures, plus 1 invalid reference on the ARRAY_OF_POINTERS instance.Both changed files pass
git diff --checkandpython -I scripts/check_no_game_data.py.GPUs tested: AMD Radeon RX 7900 XTX (RDNA3) and the integrated AMD Radeon Graphics of a Ryzen 9 7950X3D (RDNA2, gfx1036), both on Mesa 26.3.1 RADV, Arch Linux, through Wine 11.22
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)AI-assisted (Claude Code, Claude Opus 5.5).
@abnalstlll-byte on GitHub · 2026-11-24 12:34 UTC · original · approved these changes
Reviewed and verified OLD-8414 restoration. Querying \kGetAccelerationStructureDeviceAddressKHR\ for arena-backed acceleration structure resources satisfies VUID \VUID-vkCmdBuildAccelerationStructuresKHR-pInfos-12281\ while maintaining registration across driver-shifted addresses and raw arena offsets. CTest additions in \d3d12_indirect_rt_test.cpp\ confirm GPU VA lookup, driver address alignment, and dual-address teardown. Approved.
@Sangonapou on GitHub · 2026-11-24 15:01 UTC · original
Tested
296508e1on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300), native Windows: passBuilt with
scripts\build_runtime.ps1(MSVC 19.51, VS Build Tools 2026, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0). No game files.ctest -R ^d3d12_indirect_rt$ -V: passed,PASS (0 validation errors), including[PASS] AS resource GPU VAs are the driver's acceleration structure addressesand[PASS] a driver address other than buffer address + offset is the GPU VA; both freed; the runtime logsGENERIC acceleration structure address is not its buffer address + offset; arena offset in KiB: 64for the shifted device. Same result as I got on this card for the old upstream PR 8414 atb9e05449, where I also checked that the shifted device is what tells the two versions apart on NVIDIA (the real driver's address equals buffer address + offset here).@aslan2142 on GitHub · 2026-11-25 23:00 UTC · original
Merged: arena AS resources in the d3d12 layer take their address from
vkGetAccelerationStructureDeviceAddressKHR.main, and no review point is open. A native Windows run on an RTX 3080 Ti passedd3d12_indirect_rt.main5fab93967with all nine of these runtime PRs merged together (#634, #643, #684, #657, #677, #638, #710, #688, #671), on llvmpipe and the gfx1036 iGPU (RADV): no test went from pass to fail.main340e8a415+296508e19: it merges cleanly; the semantic suite passes (493 files, 6,318 tests, 0 files failed); the 15 docs and writer tests pass;check_no_game_data.pyis clean on the 2 changed files.AI-assisted (Claude Code, Claude Opus 5.5).
latencyframes in flight while armed (mailbox replace) #671