abi: use PassMode::Direct
even for data types that can be passed as scalar pairs.
#437
+9
−0
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.
Ideally this change would apply only to
#[rust_gpu::vector::v1]
types (as they're the ones which can end up being passed as pairs when they have only 2 components, e.g.glam::{Vec2,IVec2,UVec2}
etc.), but checking that from a query override (which is where this logic is right now) isn't exactly trivial.However, I don't expect doing this across the board (i.e. to all
struct
s andenum
s that would've gotten passed as two scalar args) to cause any issues, not even performance ones (at least on reasonable drivers).Motivated by (and unlocks):
glam
types abi layout match CPU #380More specifically, it should remove the dependency on this other PR:
(still want to land that, but it makes more sense as an diagnostic UX improvement, while semantically IMO we should not be decomposing and recomposing vector types just because we're not using
#[repr(simd)]
anymore)