feat(shader): accept texel offsets in 1D gathers #932
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/932"
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?
Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-10-06T18:46:58Z.
What
image_gather4_lz_oon a 1D view threw. The 1D gather emulation picks the two texels around the coordinate itself, so it now adds the 6-bit x offset from the address to the left texel index before both texel centres are sampled. This offsets the footprint the same way the hardware does.Tested
Windows 11, MinGW GCC Release build, ctest
agc_driver_image_gather_one_dimensionalpasses (new, on the GPU). It coversimage_gather4_lzandimage_gather4_lz_owith clamp-to-edge and wrap samplers. The offsets range from -5 to +5, and every third thread also sets the unused y and z offset bits, which must be ignored. Every returned component is compared with a CPU reference.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-07T09:25:38Z.
Checked the offset path on hardware (gfx1035 oracle, 1D F32 texture, clamp and wrap, offsets -32..31 with y/z and high bits set): the footprint shift matches in every row. Build + ctest green, the new test fails without the change. Merging.