Repository navigation
Runtime: validate XDXR build and refit buffer ranges (D3D-483) - #4640
gabrielsteglich wants to merge 3 commits into
Conversation
|
Tested 18e8c89 on Windows 11 with the NVIDIA GeForce RTX 4090 (32.0.16.2101) and AMD Radeon Graphics (32.0.21043.5001): the focused XDXR checks pass. I built the RelWithDebInfo targets with MSVC 14.51. I ran The existing AI-assisted. |
|
Tested
Code read: No game files. AI-assisted (Claude Code). |
|
Tested
Built only the targets this PR touches ( |
Kam471
left a comment
There was a problem hiding this comment.
Built and ran both at 995c55c10 on Windows 11, RTX 5070 Ti:
replay_xdxr_build_ranges_test-> exit 0,XDXR build ranges: exact spans replay and invalid ranges stop before recording.d3d12_xdxr_rt_test <out>-> exit 0,d3d12_xdxr_rt: BLAS 48768 bytes (prebuild 48768), TLAS (prebuild 640).
The runtime now validates the XDXR build/refit buffer ranges through the range-aware VA lookup, and an invalid range stops before recording; the added replay test covers exact spans and the invalid case. git diff --check clean. No blocking issue.
|
Verified on current main: the net delta over main is a 7-line BufferVaIndex::contains riding on main's range-aware find (b8273c0, present on main — verified), plus xdxr_build_supported upgrading the null-only xdxr_check to real per-build range checks, the new CPU test and CMake/docs lines; all hunks apply cleanly and compileall plus the docs path/flag tests pass. One trap worth flagging to reviewers: cherry-picking the raw commit silently replaces main's alias-preferring find from the #2823 review with a simpler version — the merge is clean and correct, but do not merge the bare commit. The runtime tests could not be built here (no cmake build). AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
|
Tested |
|
Integration check against A three-way merge of the PR head and All 22 CPU replay cases passed on that resolution: the original 18 with the valid refits marked |
|
Tested
AI-assisted (Claude Code). |
|
Tested
Negative control (test kept;
With the header restored it passes again. Not covered: I did not run the full ctest suite for this head. |
Claimed as D3D-483 in #4571.
Depends on: #3944, #4494, #4098, #3315
The branch builds directly on
main. These are merge conflicts with parallel XDXR work invulkan_backend.hord3d12_xdxr_rt_test.cpp, listed for coordination.What and why
Before recording an XDXR build, check that the result, scratch, any separate refit source, and the contiguous TLAS instance array each fit within one registered buffer. The range lookup accepts valid offsets and can find an enclosing placed-buffer alias. Builds with an empty TLAS and in-place refits remain supported. Replay returns
unsupportedfor incomplete spans during preparation.Tested
Windows 11 Pro 26300, MSVC 19.44.35229, Windows SDK 10.0.26100.0, Vulkan SDK 1.4.363.0, RelWithDebInfo, NVIDIA GeForce RTX 3090 with driver 621.01. Vulkan validation enabled with
LEONIDA_VK_VALIDATION=1andVK_LOADER_LAYERS_DISABLE=~implicit~.d0835dd9: 5/5 XDXR tests passed. Initial commit18e8c895: 7/7 focused tests passed. All 21 synthetic GPU cases matched the base in BVH sizes and traversal results, with zero Vulkan validation errors. The D3D12 fixture exercises 256-byte offsets and exact-fit result and TLAS instance spans.mainat7b7d73f8, commit995c55c1passed all seven focused tests on the same RTX 3090. The 21 synthetic GPU cases produced identical results with zero Vulkan validation errors. The full runtime suite recorded 156 passed, eight skipped, one disabled and zero failures. The integration reuses the range-aware VA lookup frommainand requires full containment for XDXR.18e8c895passed on an RTX 4090 and AMD Radeon Graphics. Test resultsAI-assisted: yes. Independently reviewed before submission.
Checklist