Repository navigation
Conversation
|
Independent run on a second AMD Windows driver and on NVIDIA, head 42d6623, built with
The four tests are So the miscompile does not reproduce on this newer AMD driver: the BOX16 checks already pass on main here. The fix does not regress either card. I cannot confirm the failure itself, only that the rewritten form is also correct on these two drivers. The "main" column is AI-assisted: yes (Claude Code) |
|
Tested 42d6623 applied onto main 66d4f5a on an AMD Radeon RX 7900 XT: a discrete RDNA3 card on the current proprietary driver, next to the two iGPU runs. Setup: AMD Radeon RX 7900 XT (RDNA3, gfx1100), AMD proprietary driver 32.0.32029.2010 (26.11.2), Windows 11 build 26300, VS 2022 RelWithDebInfo, Vulkan SDK 1.4.363.0. No game files. The GPU, 2 runs each.
On this card and driver the BOX16 miscompile does not reproduce: |
|
Independent confirmation on a second AMD device: clean origin/main 4a50caf fails |
42d6623 to
536df5c
Compare
|
Confirmed on a second AMD part — Ryzen 5 7600 iGPU (Raphael gfx1036, driver 24.10.24, Vulkan 1.3.280, validation on, LEONIDA_PC_TAIL_UBO=1): at origin/main b4b7756 both |
536df5c to
512eae3
Compare
|
Dual-GPU verification on Runtime rebuild succeeded ( Results:
Together with the earlier |
(u >> 16) & 0x8000 and (u & 0x80000000) >> 16 are the same bits, but the AMD Windows shader compiler (24.10.24, Vulkan 1.3.280, gfx1035) miscompiles the first: every BOX16 box word comes out with flipped half signs, so every MINIMIZE_MEMORY BLAS fails xdxr_bvh.py check-build (thousands of 'child box not inside its parent' errors, all rays miss) while BOX32 builds of the same tree are bit-exact. Deterministic across runs and across -O levels, and NVIDIA produces correct output from the same SPIR-V module. AI-assisted; verified on AMD Radeon(TM) Graphics (RDNA2 gfx1035, driver 24.10.24, Vulkan 1.3.280) and NVIDIA RTX 4070 SUPER: vk_xdxr_build_test + xdxr_bvh.py check-build --rays 1000 goes from 20727 problems to 'all cases match' on AMD; d3d12_xdxr_rt + check likewise. Co-Authored-By: Devin <noreply@cognition.ai>
512eae3 to
4a4aa9b
Compare
|
Rebased cleanly onto current main ( |
Claimed in the coordination issue as: XDXR-BOX16-SIGN-AMD (claim)
Depends on: none
What and why
On the AMD Windows driver (24.10.24, Vulkan 1.3.280, gfx1035), every
MINIMIZE_MEMORYBOX16 build throughxdxr_build.compproduced corrupt boxes:tools/xdxr_bvh.py check-buildreported ~20,727 problems ("child box not inside its parent's box") and essentially all rays missed. BOX32 builds of the same trees were bit-exact, and NVIDIA produced correct output from the identical SPIR-V module — an AMD shader-compiler miscompile, not a logic bug.Bisection isolated
half_directed()inruntime/src/xdxr_build.comp: it computed the half's sign as(u >> 16) & 0x8000. The bit-equivalent(u & 0x80000000u) >> 16produces correct output on the same driver. In SPIR-V the old form isOpShiftRightLogical+OpBitwiseAndwith a0x8000mask; the new form reuses the existing0x80000000constant. Deterministic across runs and across-O/-O0glslc output.Changes:
runtime/src/xdxr_build.comp: one-line rewrite + comment.runtime/src/xdxr_build.inc: regenerated with glslc from Vulkan SDK 1.4.363.0 (the large diff is SPIR-V result-ID renumbering).docs/bvh.md: note in the BOX16 section.Tested
vk_xdxr_build_test+xdxr_bvh.py check-build --rays 1000on the AMD iGPU: 20,727 problems → all cases match (box16/paired/extremes/refit).d3d12_xdxr_rt+ its check on AMD iGPU: all match (was failing before).py -3.14 -I tests/test_xdxr_bvh.py: 47 tests OK.LEONIDA_VK_VALIDATION=1ctest sweep on AMD iGPU: 0 VUIDs (unrelated suite run the same session).GPUs tested: AMD Radeon Graphics (Ryzen 5 7600 iGPU, gfx1035-class RDNA2, driver 24.10.24, Vulkan 1.3.280, Windows 11); NVIDIA GeForce RTX 4070 SUPER (driver 610.88, Windows 11)
AI-assisted: yes (Devin)
Checklist
mainand merges cleanly