API improvements to 4-way interleaved load/store - #298
Merged
Conversation
…r_interleaved that returns 4 128-bit vectors. This maps to the real-world usage better (in Vello, all uses of this function save one go through manual split/combine first), eliminates pointless split/combine in x86 implementations, and most importantly allows us to add wrappers for vld3q later which would perform the same operation for RGB rather than RGBA.
danderson
approved these changes
Aug 4, 2026
danderson
left a comment
Contributor
There was a problem hiding this comment.
Looks reasonable! I can't comment on Vello's use case obviously, but the linked draft looks like a nice reduction in conversion boilerplate.
LaurenzV
approved these changes
Aug 4, 2026
LaurenzV
left a comment
Collaborator
There was a problem hiding this comment.
Looking forward to better AVX2 impls and RGB interleaving!
# Conflicts: # fearless_simd_gen/src/ops.rs
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.
Change
load_interleaved_128that returns a 512-bit vector toload_four_interleavedthat returns four 128-bit vectors.This maps to the real-world usage better (in Vello, all uses of this function save one go through manual split/combine first), eliminates pointless split/combine in x86 implementations, and most importantly allows us to add wrappers for vld3q later which would perform the same operation for RGB rather than RGBA.
Here's how this change affects vello: linebender/vello#1796
Also supports interleaved load/store for all widths, addressing a part of #297
The implementations are untouched in this PR save for removing redundant split/combine. AVX2 leaves performance on the table because it uses the sse2 unpack tree for most types, but I don't want to write a bespoke implementation for what is just a swizzle. Instead let's merge #276, then I'll add a relaxed version for x86 that doesn't zero out-of-bounds indices (update: that's #304), and then we'll just lower interleaving into that on x86 since it would call literally all the same intrinsics.