Repository navigation
feat(shader): accept texel offsets in 1D gathers - #932
Merged
Merged
Conversation
image_gather4_lz_o on a 1D view threw. The 1D gather emulation picks the two texels around the coordinate itself, so the 6-bit x offset of the address is added to the left texel index before both texel centres are sampled, as the hardware offsets the footprint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 tasks done
This was referenced Oct 6, 2026
Collaborator
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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