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.
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>
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>