Repository navigation
d3d12_dxr_validation_test: skip before allocating AS buffers on non-RT GPUs - #7241
KarolKurzyna wants to merge 1 commit into
Conversation
…ffer allocation Leonida reports OPTIONS5.RaytracingTier == NOT_SUPPORTED even when XDXR or KHR acceleration structures are active, so run_suite() had a skip path (exit 77) when GetRaytracingAccelerationStructurePrebuildInfo returned zero. However, make_buffer() allocated RAYTRACING_ACCELERATION_STRUCTURE buffers earlier in run_suite(), which CreateCommittedResource refuses when neither backend is available (such as d3d12_dxr_validation_khr with LEONIDA_RT_AS=khr on a GPU without VK_KHR_acceleration_structure). That made the skip path unreachable and turned a non-RT GPU skip into exit 1. Move the minimal BLAS PrebuildInfo probe ahead of synthetic buffer allocation so non-RT GPUs cleanly exit 77 in d3d12_dxr_validation_khr while XDXR and RT-capable KHR runs remain unchanged.
|
Tested 50aef11 on NVIDIA GeForce RTX 2070 SUPER (Turing), driver 610.88, Vulkan 1.4.341, Windows 11 (10.0.26200): pass Built d3d12_dxr_validation_test with MSVC 14.51 (VS 2026), CMake, Visual Studio generator, RelWithDebInfo, Vulkan SDK 1.4.363.0. Ran ctest -C RelWithDebInfo -R "^d3d12_dxr_validation" with LEONIDA_VK_DEVICE=nvidia. Results:
Both print "valid prebuild, GPU BLAS+TLAS build, and all strict validation checks OK", so on an RT-capable Turing card the new early probe does not skip by mistake. I could not exercise the skip path: this machine's other adapter (AMD Radeon integrated) is not picked by the runtime (no Vulkan 1.3 device with the required features), so with LEONIDA_VK_DEVICE=amd both tests are Not Run before reaching the probe. Also read the diff: the probe uses the same 1-triangle BLAS inputs as the later prebuild check, and the removed branch is unreachable after it. Looks good to me. |
|
Tested
AI-assisted (Claude Code). Synthetic test only, no game files. |
|
Tested 50aef11 on Windows 11, AMD Radeon RX 9070 XT (RDNA4), driver 32.0.32029.2010: pass
AI-assisted (Claude Code). |
|
Tested
That's an independent confirmation, after the UHD 770, that the skip is now reachable on a non-RT iGPU. AI-assisted (Claude Code). |
|
Tested |
|
Tested on an RX 5700 XT (RDNA1), AMD Software 26.8.1 (driver 32.0.21045.5002), Windows build 26300.9974, MSVC 14.44, merged alone onto main No hardware ray tracing on this card. With AI-assisted (Claude Code). Synthetic test only, no game files. |
|
Tested
|
…otRexed#7145 ItsNotRexed#7327 ItsNotRexed#7391 ItsNotRexed#7186 ItsNotRexed#7220 ItsNotRexed#7260 ItsNotRexed#7279 ItsNotRexed#7294 ItsNotRexed#7301 ItsNotRexed#7404 ItsNotRexed#7449 ItsNotRexed#7459 ItsNotRexed#7481 ItsNotRexed#7029 ItsNotRexed#7157 ItsNotRexed#7161 ItsNotRexed#7210 ItsNotRexed#7213 ItsNotRexed#7241 ItsNotRexed#7256 ItsNotRexed#7268 ItsNotRexed#8919 fork integration. Each parent after the first is an exact reviewed PR head. ItsNotRexed#5180 554ddf4 ItsNotRexed#5180 (comment) ItsNotRexed#5887 1894146 ItsNotRexed#5887 (comment) ItsNotRexed#7145 8366ec8 ItsNotRexed#7145 (comment) ItsNotRexed#7327 0392f03 ItsNotRexed#7327 (comment) ItsNotRexed#7391 4abe9b3 ItsNotRexed#7391 (comment) ItsNotRexed#7186 f27a7e8 ItsNotRexed#7186 (comment) ItsNotRexed#7220 7fe517a ItsNotRexed#7220 (comment) ItsNotRexed#7260 007d10f ItsNotRexed#7260 (comment) ItsNotRexed#7279 d6b5221 ItsNotRexed#7279 (comment) ItsNotRexed#7294 d895219 ItsNotRexed#7294 (comment) ItsNotRexed#7301 ec5b887 ItsNotRexed#7301 (comment) ItsNotRexed#7404 3e2978f ItsNotRexed#7404 (comment) ItsNotRexed#7449 dfedc14 ItsNotRexed#7449 (comment) ItsNotRexed#7459 90045c5 ItsNotRexed#7459 (comment) ItsNotRexed#7481 fd9231a ItsNotRexed#7481 (comment) ItsNotRexed#7029 97211c7 ItsNotRexed#7029 (comment) ItsNotRexed#7157 4d13060 ItsNotRexed#7157 (comment) ItsNotRexed#7161 40066d7 ItsNotRexed#7161 (comment) ItsNotRexed#7210 9c8950e ItsNotRexed#7210 (comment) ItsNotRexed#7213 43e0772 ItsNotRexed#7213 (comment) ItsNotRexed#7241 50aef11 ItsNotRexed#7241 (comment) ItsNotRexed#7256 e83aa4e ItsNotRexed#7256 (comment) ItsNotRexed#7268 b75d669 ItsNotRexed#7268 (comment) AI-assisted integration.
Follow-up to #6825. Claimed in #7231 (comment) (reproduced on Intel UHD Graphics 770 in #166 (comment)).
Problem
d3d12_dxr_validation_test.cppskips native adapters whenOPTIONS5.RaytracingTier == D3D12_RAYTRACING_TIER_NOT_SUPPORTED, and intentionally lets Leonida continue becaused3d12_vulkan_device.cppreportsRaytracingTier == NOT_SUPPORTEDeven when XDXR or KHR acceleration structures are enabled. To skip on a Leonida device with neither backend active (e.g.d3d12_dxr_validation_khrwithLEONIDA_RT_AS=khron a GPU withoutVK_KHR_acceleration_structure),run_suite()checked for zeroGetRaytracingAccelerationStructurePrebuildInfosizes and returned77.However,
run_suite()allocatedblas_buf,tlas_buf, andsrc_aswithD3D12_RESOURCE_STATE_RAYTRACING_ACCELERATION_STRUCTUREbefore that prebuild query. On a device without acceleration structures,CreateCommittedResourcerefusesRAYTRACING_ACCELERATION_STRUCTURE(initial_state_refusalind3d12_vulkan_device.cpp), so the test failed with exit1(Leonida Vulkan: failed to allocate synthetic buffers) and thereturn 77skip was unreachable.Fix
Probe a minimal 1-triangle BLAS
GetRaytracingAccelerationStructurePrebuildInfobefore allocating the synthetic buffers whencheck_strict_validation && o5.RaytracingTier == D3D12_RAYTRACING_TIER_NOT_SUPPORTED, returning77if the backend reports zero sizes, and drop the unreachable duplicate skip check below.Testing
Built on Windows 11 x64 (
10.0.26300), MSVC19.52.37029(VS 2026), Windows SDK10.0.26100.0, CMake + NinjaRelWithDebInfo(0 warnings ond3d12_dxr_validation_test.cpp), commit50aef11:b3c972b):LEONIDA_VK_DEVICE=intelctest -R "^d3d12_dxr_validation_khr$"failed (exit 1,ID3D12Device::CreateCommittedResource refused (acceleration-structure state on a device without acceleration structures)).101.6129, Vulkan1.3.295, noVK_KHR_acceleration_structure),LEONIDA_VK_VALIDATIONoff & on:d3d12_dxr_validation(XDXR): PASSd3d12_dxr_validation_khr(LEONIDA_RT_AS=khr): SKIP (exit 77:Leonida Vulkan: neither XDXR nor KHR acceleration structures supported, skipping)621.24, Vulkan1.4.357),LEONIDA_VK_VALIDATIONoff & on:d3d12_dxr_validation(XDXR): PASSd3d12_dxr_validation_khr(LEONIDA_RT_AS=khr): PASS (0 Vulkan validation errors)Synthetic tests only, no game data. AI-assisted.