Repository navigation
Conversation
|
Overlap check: this is the third open implementation of D3D-425's KHR ARRAY_OF_POINTERS path. #4060 (\cc4b3744) and #4105 (\438fd4a0) both also record the layout and build the instance descs; I tested #4060 on an RTX 5070 Ti (ARRAY and ARRAY_OF_POINTERS TLAS, RayQuery hit=1/miss=0, null pointer refused, 0 validation errors) and #4105 additionally touches the XDXR builder. This branch's snapshot/validate/rebase step looks like the most defensive of the three, and it also updates |
|
Independent NVIDIA check of
AI-assisted (Codex). |
|
Tested f309fbc on Windows 11 (MSVC BuildTools 2022, Ninja, RelWithDebInfo, -j 4; no Vulkan validation layer installed), one GPU at a time, device line confirmed: AMD Radeon RDNA2 iGPU (driver 26.10.1) and NVIDIA RTX 5080 (driver 616.92). Ran AI-assisted. |
|
Tested GPU suite, same numbers in all three states:
So your changes to What this does not cover, so the row is not mistaken for a full pass: the test you added or extended is
|
Flyander
left a comment
There was a problem hiding this comment.
P2 — GPU-written pointer tables are consumed as stale host data (runtime/shims/d3d12_vulkan_device.cpp:1519,1657)
I traced the replay order on f309fbc4: execute_now prepares every list before it records and emits the commands, while host_at accepts any mapped resource. Repro: place a TLAS ARRAY_OF_POINTERS table in a DEFAULT buffer, then update that table with CopyBufferRegion earlier in the same submission. Preparation reads the old CPU mapping before the GPU copy runs; if the old entries are still valid, it succeeds and silently builds the TLAS from stale pointers. The added tests only populate an UPLOAD table from the CPU.
The PR documents this limitation, but the runtime does not refuse the unsupported input. Only expose ResourceBinding::host for sources known to be current on the CPU, and make host_at fail otherwise (or track earlier GPU writes). Please add a regression that verifies the GPU-written case fails instead of building from stale contents.
|
Tested
For the comparison @Kam471 asked for: on the same machine with the same steps, #4060 at its new head No game files. AI-assisted (Claude Code). |
What and why
The opt-in KHR acceleration-structure path recorded a TLAS
ARRAY_OF_POINTERSlayout as inline instance descriptions. The pointer table contains console GPU virtual addresses, so passing it directly to Vulkan makes the driver read invalid data.This change:
BuildAccelerationStructure;heap_base;The host snapshot has the same limitation as the XDXR gather path: a pointer table written by the GPU earlier in the same submission is not visible.
Related to #313 and the KHR follow-up noted in #3944.
Testing
Windows 11, MSVC RelWithDebInfo, AMD Radeon RX 6800 XT, Vulkan SDK 1.4.363.0.
d3d12_indirect_rt: pointer-array TLAS, RayQueryhit=1, miss=0.LEONIDA_VK_VALIDATION=1 d3d12_indirect_rt_test.exe: PASS with 0 validation errors.git diff --check: clean.No game files or extracted assets are included.
AI assistance
OpenAI Codex assisted with investigation, implementation and review. The result was compiled and tested locally on the GPU listed above.
Depois de preencheres, confirma que o destino no topo é:
ItsNotRexed/Leonida ← mtrw00w/Leonida