feat(shader): implement 1D array gathers #940
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/940"
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:47:14Z.
What
image_gather4_lz(_o)on a 1D array view threw. The 1D gather emulation now takes the width from the array view's size, keeps the layer coordinate and samples both texel centres of that layer. As a result, 1D array gathers return the same footprint as 1D ones.It builds on #931 (1D array textures) and #932 (1D gather offsets), both merged.
Tested
Windows 11, MinGW GCC Release build, ctest
agc_driver_graphics,agc_driver_image_one_dimensional_array,agc_driver_image_gather_one_dimensionalandagc_driver_image_gather_one_dimensional_arraypass. The newagc_driver_image_gather_one_dimensional_arraytest (on the GPU) runsimage_gather4_lzandimage_gather4_lz_owith clamp-to-edge and wrap samplers on a 3-layer 1D array. It uses offsets from -5 to +5 and fractional and out-of-range layer coordinates, and compares every component 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-07T21:05:21Z.
Checked on hardware (gfx1035 oracle, 1D array 32_FLOAT T#, 3 layers):
image_gather4_lzandimage_gather4_lz_o, clamp-to-edge and wrap, 37 coordinates × offsets -32..31 (y/z bits set) × 19 layer values (ties 0.5/1.5/2.5, ±1e30, ±inf, out of range): 5624 rows, all match the emitted footprint and layer selection (round to nearest even + clamp, as Vulkan does). Build + ctest green, the new test passes on CI's lavapipe and fails without the emitter change.What I added on your branch:
main, dropping the three merge commits (CONTRIBUTING: no merge commits). The diff is unchanged.Merging once CI is green.