Repository navigation
RT-54: bvh_builder_test uses WARP on NVIDIA; record why the 49th PSO fails - #1089
Merged
Merged
Conversation
…der shapes The package's 53 compute shaders are Xbox DXIL (target triple dxil-ms-xb2, xbox.compiler.options metadata; dxil.dll rejects all 53). NVIDIA's DXIL reader rejects the 49th, the only one with a resource in a function signature, and either returns E_OUTOFMEMORY or aborts the process inside nvwgf2umx.dll. The proxy forwards the bytecode unchanged, so the fix is in the test: an NVIDIA adapter switches to WARP unless LEONIDA_BVH_HARDWARE=1. LEONIDA_BVH_RECORD62 now prints each container's shape before the call, and LEONIDA_BVH_DXIL=1 adds dx.op counts and masked validator error kinds (names and counts only). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
quackottu
reviewed
Nov 22, 2026
quackottu
left a comment
Contributor
There was a problem hiding this comment.
Tested 39d5d0e on NVIDIA GeForce RTX 5070, driver 621.24, Windows 11 Pro (26300), VS 2022 Build Tools, Vulkan SDK 1.4.363.0, with LEONIDA_VK_VALIDATION=1 and LEONIDA_D3D12=vulkan: pass
- Build ok.
ctest: 50/50 (gameinputdisabled, no SDL3). bvh_builder_test(changed here): exit 0, SKIP without the game package, so its NVIDIA path wasn't exercised. The first full run hadloaderfail its Defender-scan timing check andd3d12_fence_timing_testmiss calibration, with three builds running at once. Both pass when rerun alone, and neither is touched here.- 49 test programs exit 0 with 0 validation messages.
- Same on
main, not from this PR:d3d12_clear_test(NVIDIA 0.5 tie rounding, #521),vk_binary_occlusion_test(needs an input file), and the 3VUID-vkCreateDevice-ppEnabledExtensionNames-01387ind3d12_fence_timing_test/d3d12_vulkan_device_test(#1027).
|
Tested 39d5d0e on RTX 5070 (Blackwell), NVIDIA 621.01, Windows 11 Pro (10.0.26200), MSVC 19.51 (VS 2026 Build Tools), with my own 1.0.2.1 copy: pass. Same failure point as the RTX 4090 run in the description, now on Blackwell with driver 621. AI-assisted (Claude). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RT-54 from #1006 (finding: @rafaelpssz in #634, reproduced by @Thatters).
On NVIDIA, the package's
XboxBvhBuilderconstructor dies inCreateComputePipelineState. The cause is the input, not Leonida's proxy: the builder's shaders are Xbox DXIL, which no PC driver has to accept. This PR makesbvh_builder_testget past construction on NVIDIA by using WARP there. It also records why, in shapes and counts only.Findings (RTX 4090, 621.14, Windows 11 26200, my own 1.0.2.1 copy)
S_OK. Call 49 (a 38,248-byte CS) either returnsE_OUTOFMEMORY, which the constructor throws, or ends the process inside the driver. The abort matches @Thatters's report: NVIDIA's LLVM 7.0.1 bitcode reader printsNever resolved value found in function, orInvalid recordin their runs, and exits with code 127 here or0xC0000409there. It can't be caught, and the D3D12 debug layer prints nothing first.0x80aa0009:dxil-ms-xb2andxbox.compiler.optionsmetadata;extractvalueon non-DXIL types;extractvalueerrors and is created, so those aren't the trigger.Changes
bvh_builder_test:0x10DEadapter it switches to WARP and says why.LEONIDA_BVH_HARDWARE=1keeps the NVIDIA device, to check a newer driver.LEONIDA_BVH_RECORD62=1now prints each container's shape before the call, so the last line before an abort names the shader.LEONIDA_BVH_DXIL=1adds counts of dx.op calls and a few type markers from dxcompiler.dll's disassembly in memory, plus dxil.dll's error kinds with quoted text masked. Nothing from the DLL is printed or written: only names of DXIL ops and counts.docs/d3d12_vulkan.mdA.2: the NVIDIA results and the cause. The runtime still needs to lower or translate these shaders (section 7.2 / M6) before they can run on hardware.Unlike a driver workaround in the proxy, this doesn't hide anything from the runtime: the proxy still forwards everything, and the shaders still need a real DXIL path.
Tested
RTX 4090, NVIDIA 621.14, Windows 11 build 26200, MSVC 19.44, Vulkan SDK 1.4.363.0:
bvh_builderskips without a package.bvh_builder_testwith my own 1.0.2.1 copy:LEONIDA_BVH_HARDWARE=1: still aborts at call 49, as documented;LEONIDA_BVH_RECORD62=1 LEONIDA_BVH_DXIL=1on WARP: produced the counts above.Not tested: AMD Windows 11 hardware. An AMD run would show whether its driver takes all 53.
No game data in this PR or its description: counts, sizes, part names, DXIL op names and a target-triple name only. AI-assisted (Claude Code).
🤖 Generated with Claude Code