Test report and cross-device VALU fuzz: RX 9070 (RDNA4) + gfx1036 iGPU (RDNA2) + WARP at 71652a2 #82
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD#82
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@alexdeliu on GitHub · 2026-11-25 13:35 UTC · original
One machine: an RX 9070 (RDNA4, the same family as this fork's RX 9070 XT, driver 32.0.32029.2010), a Ryzen 7 7700 iGPU (gfx1036, RDNA2, the console's architecture, driver 32.0.21045.29003), and WARP. Windows 11. No game data.
Test suite (
cargo test -p victory-shader --lib, unmodified71652a2,VICTORY_DXIL= dxil.dll 1.8.2502.11)dxil.dll, 5 tests fail instead, at the validator (PSV0 mismatch): 3barycentric_tests,packed_halves_with_row2_equal_to_row_read_the_unlisted_partnerandrectangle_geometry_validates. That may explain similar reports from other testers.VICTORY_ADAPTER=radeon(tm),--test-threads=1): 264 passed and 2 failed. The 2 are the wave-size tests from #2:scalar_counted_in_a_divergent_loop_read_after_itandscalar_counted_in_nested_divergent_loops. So #2 reproduces on a second RDNA2 GPU, and both tests pass on RDNA4.0xc0000005mid-run (once per GPU). Serial reruns were clean.Fuzz
This is the fuzzer from Marvisak/VIctory#1614, run on this fork: 307 opcodes, 160 inputs each, compared bit for bit across the three devices. 38 opcodes differ.
Both AMD GPUs give wrong results, and WARP and the CPU agree: the 8 ordered
v_cmp_*_{i64,u64}. The cause is AMD's compiler mis-ordering an i64 compare when the two operands share a dword. Fixed in #81 (a port of VIctory#1599, with a GPU test that fails here on both AMD GPUs and passes with the PR).16 opcodes differ here but agree on upstream
main940d32f (same fuzzer, same machine). Upstream fixed these after this fork's base8e79c80, among other places in77053a0(f16 rounding, f32 min/max denormals, med3):v_min_f32,v_max_f32,v_min3_f32,v_max3_f32,v_med3_f32;v_add_f16,v_sub_f16,v_subrev_f16,v_pk_add_f16;v_fma_legacy_f32,v_fmac_legacy_f32;v_fma_f16,v_fmac_f16,v_pk_fma_f16,v_pk_fmac_f16,v_fma_mix{lo,hi}_f16.In the f16 FMA family it is the gfx1036 that differs from the RX 9070 and WARP.
This fork's own f64 lowering:
v_add_f64andv_mul_f64(upstream refuses them). With separate source pairs (v[1:2],v[3:4]) all three devices match the CPU. With source pairs sharing a dword (v[1:2],v[2:3]), the RX 9070 is wrong. For example,1.5 + makeDouble(0x3ff80000, 0)gives the high dword0x40080000(3.0), as if both operands werev[1:2]. The gfx1036 is right through this fork's i64 path, but goes wrong too when the dwords are passed tomakeDoubledirectly. So this is the same family of AMD compiler bug, and I have no clean workaround yet. It matters only if titles use overlapping f64 pairs. Standalone DXIL vectors made from this fork's lowering, with disjoint controls, are in rdna2-conformance (bug 2). The same operation written in HLSL passes everywhere.WARP alone differs; known and harmless for AMD:
v_cubesc/tc_f32,v_sin/cos_f32,v_sin_f16,v_cvt_f32_u32,v_log_f32, and bothv_cvtf32/f64 conversions.v_cmp_f/v_cmp_tru(f16 and f32) suspend the WARP device (upstream VIctory#1326).The full report, with the inputs and the instruction words of each finding: results/2026-11-25-fuzz-belobug-71652a2.md.
AI use: Claude Code (Claude Opus 5.5) ran this on my machine.