Repository navigation
d3d12: validate DXR acceleration-structure prebuild and recording inputs - #6825
Conversation
|
Verified on Windows 11 (MSVC 19.44 / Ninja, Vulkan SDK 1.4.363.0) at
|
devnull34
left a comment
There was a problem hiding this comment.
Hardware & Environment
- Host: Windows 11 Build 26300 x64
- GPU: AMD Radeon RX 7900 GRE (16 GB VRAM, RDNA3 gfx1100, Vulkan 1.3.296)
- Toolchain: MSVC 19.44 (Visual Studio 2022), CMake 4.4, Windows SDK 10.0.26100.0, Vulkan SDK 1.4.363.0
Verification Summary
Targets compiled with MSVC 19.44 and executed natively on AMD Radeon RX 7900 GRE:
-
**\command_list_test.exe**:
- Passed with zero errors.
-
**\d3d12_dxr_validation_test.exe**:
ative WARP (tier=11): valid prebuild, GPU BLAS+TLAS build, and recording parity OK\
ative HW (AMD Radeon RX 7900 GRE) (tier=11): valid prebuild, GPU BLAS+TLAS build, and recording parity OK\- \Leonida Vulkan (tier=0): valid prebuild, GPU BLAS+TLAS build, and all strict validation checks OK\
- Verified DXR acceleration structure prebuild info validation:
- Null desc pointer checks.
- Type validation (TopLevel vs BottomLevel).
- Geometry counts, vertex/index format combinations, stride alignment, transform buffer alignment.
- Destination and scratch address 256-byte alignment and overlap guards.
- Direct and Compute command list type checks; rejection on Copy lists.
- Post-close command list state immutability.
-
CTest Suite:
- \command_list: Passed (0.01s)
- \d3d12_dxr_validation: Passed (0.31s)
- \d3d12_dxr_validation_khr: Passed (0.81s)
- Total: 3/3 passed (100%).
-
Hygiene & Compliance:
- Clean-room compliant: pure synthetic unit tests; zero game assets or proprietary code.
- \git diff HEAD~1..HEAD --check: Clean.
LGTM!
shayderrr
left a comment
There was a problem hiding this comment.
Summary
d3d12_com.cpp:GraphicsCommandList now rejects null postbuild arrays, invalid InfoTypes, unknown Inputs.Type/DescsLayout, and invalid copy modes via new valid_postbuild_info_type()/valid_copy_mode() helpers. d3d12_vulkan_device.cpp:GetRaytracingAccelerationStructurePrebuildInfo validates desc, type/layout and geometry-descriptor pointers. command_list.h adds 256-byte AS/scratch alignment checks, aligned update sources, and mode <= 4 / type <= 3 bounds. New d3d12_dxr_validation_test.cpp and CMake targets cover both RT backends.
Why merge
Brings DXR prebuild/record validation to parity with standard D3D12, stopping malformed descriptors before they reach Vulkan and giving executable-analysis runs a trustworthy DXR shim.
Verdict: Approve
Summary
Why mergeBrings DXR prebuild/record validation to parity with standard D3D12, stopping malformed descriptors before they reach Vulkan and giving executable-analysis runs a trustworthy DXR shim. Verdict: Approve |
|
Tested
Synthetic tests only, zero game files used. AI-assisted. |
|
ℹ️ Automated security review: SCAN-ONLY (commit
Scope: static analysis of added diff lines only; no code was executed. Please review findings manually. |
Claim: #6603 (comment)
Summary
Hardens DXR acceleration-structure prebuild and command-list recording validation (100% generic standard D3D12 API parity, zero game data, disjoint from #5252 queue-type checks):
untime/shims/d3d12_com.cpp** (BuildRaytracingAccelerationStructure, EmitRaytracingAccelerationStructurePostbuildInfo, CopyRaytracingAccelerationStructure):