Commit Graph

3 Commits

Author SHA1 Message Date
773891bdff fix: pack D16 explicit-LOD gather results
Route both four-tap gather paths through the existing binary16 conversion so explicit LOD and offsets keep the two-word result and the following register intact.
2026-11-22 06:48:05 +01:00
0b2ca369c2 Gather address modes: emit only the needed code, document FORCE_UNNORMALIZED, discriminating tests
A literal S# mode emits only its own wrap/mirror/mirror-once code (no dead
chains); a run-time S# still selects among all four. The S# value mapping now
cites Mesa gfx6.json and RADV radv_tex_wrap. FORCE_UNNORMALIZED on a run-time
S# is not applied (not confirmed on hardware, so not guessed): documented as
the second remaining approximation. Tests cover all 16 literal x/y mode pairs
with per-axis op counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:50:47 +01:00
f2df1ed542 Translator: image_gather4_l applies the S# address mode at the border (SHADER-36)
The four-fetch emulation of image_gather4_l(_o) clamped every texel to the
edge. Each coordinate now goes through the S#'s CLAMP_X/CLAMP_Y (wrap, mirror,
clamp to last texel, mirror once), read at translation time from a literal S#
and from the SGPR at run time otherwise. A literal S# with a border mode or
FORCE_UNNORMALIZED is Unsupported.

GPU test ps_gather_wrap (vk_texture_test) with hand-derived expected values;
wired into check.py, scripts/run_gpu_tests.py and tests/test_shader_checks.py;
pytest cases in tests/test_translate.py; docs/design.md row updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:36:09 +01:00