upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/gameinput_test.cpp
diff options
context:
space:
mode:
authorBora Sevim <sevimbora@gmail.com>2026-11-22 19:56:45 +0300
committerBora Sevim <sevimbora@gmail.com>2026-11-22 19:56:45 +0300
commitc55056ff408fe9fd9c28d2c62ca04ff11637b963 (patch)
tree4347a9ab71cfa501047e16afa859a375fa33f6d2 /runtime/test/gameinput_test.cpp
parent49475796c226c8511b9470bf97a4daf57b8af323 (diff)
rdna2spirv: v_cvt_pknorm_i16/u16_f32 round the exact product once, as RDNA2 does (SHADER-363)
The f32 OpFMul of the clamped value and 32767 (or 65535) can land exactly on k + 0.5 while the exact product is just below or above it; RoundEven then picked the even neighbour, one off from the hardware on 28 of 28 such inputs on an RDNA2 iGPU (gfx1036, SHADER-339). The product's error Fma(c, s, -p) is exact, so on such a tie the translator now takes floor(p) + 1 when it is positive, floor(p) when negative, and RoundEven when it is 0. Away from a tie both roundings agree. tools/pknorm_probe.py --oracle hw on the same iGPU now exits 0: all 134 words equal the translator's in wave32 and wave64 under five MODEs. tests/semantic/test_alu_cvt_pknorm_f32.py's reference rounds the exact product once and checks the twelve measured near-tie words (they fail on the old translation); tests/test_pknorm_probe.py expects single rounding. docs/design.md: the three copies of the pknorm row become one, with both RDNA2 measurements.
Diffstat (limited to 'runtime/test/gameinput_test.cpp')
0 files changed, 0 insertions, 0 deletions