diff options
| author | x2Tweek <x2Tweek@users.noreply.github.com> | 2026-11-22 22:19:12 +0100 |
|---|---|---|
| committer | x2Tweek <x2Tweek@users.noreply.github.com> | 2026-11-22 22:19:12 +0100 |
| commit | 1f4721da6dc9374a870885a43eab4a75ac1637bc (patch) | |
| tree | 9a484dd33dbbfe691bbd1171b3cf14d0c70f75d4 /runtime/test/gameinput_test.cpp | |
| parent | f847748cc76bd3777f9c070c4034eb2fc1c04e64 (diff) | |
test(semantic): add translation test for v_log_f32
Adds tests/semantic/test_alu_log_f32.py — semantic translation tests for
RDNA2 32-bit base-2 logarithm v_log_f32, translating a synthetic pixel-shader
listing through rdna2spirv.translate() -> SPIR-V -> spirv_mini_interp and
comparing against a plain-Python reference math.log2(x) for finite positive x.
Covers exact values (log2(1)=0, log2(2)=1, log2(4)=2, log2(8)=3, log2(0.5)=-1),
log2(3) with 1e-6 tolerance, log2(+inf) -> +inf, reference comparison across
varied positive bit patterns, 50 randomized positive cases, and a negative
control. log2(0) is excluded because GLSL.std.450 leaves it undefined (the
interpreter raises UnsupportedConstruct). No translator/runtime changes — pure
test coverage. Standard library only; no GPU; no game data.
4 passed, 65 subtests; compileall clean.
Co-Authored-By: Claude Code <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/gameinput_test.cpp')
0 files changed, 0 insertions, 0 deletions