Repository navigation
disallow Vec3A for spirv intrinsics and asm - #660
Merged
Merged
Conversation
Firestar99
added this pull request to stack #662
October 5, 2026 14:24
Firestar99
force-pushed
the
disallow_vec3a_intrinsics
branch
from
October 5, 2026 14:27
ab1e567 to
3de7c32
Compare
2 tasks
eddyb
approved these changes
Oct 5, 2026
Firestar99
marked this pull request as ready for review
October 5, 2026 16:11
Firestar99
force-pushed
the
disallow_vec3a_intrinsics
branch
from
October 5, 2026 16:17
3de7c32 to
679457f
Compare
bitshifter
pushed a commit
to bitshifter/glam-rs
that referenced
this pull request
Oct 6, 2026
Related rust-gpu PRs: Rust-GPU/rust-gpu#660 Rust-GPU/rust-gpu#661 # Objective **Main change: don't special case `Vec3A` as a rust-gpu SPIR-V vector** * changes it's SPIR-V representation from `OpTypeVector %f32 3` to `OpTypeStruct %f32 %f32 %f32 %f32` * this makes `Vec3A` incompatible with certain SPIR-V intrinsics * rust-gpu removes it's `unsafe impl Vector for Vec3A` to disallow it's use * Migration: use `Vec3` instead and convert back and forward with `Vec3::to_vec3a()` and `Vec3A::to_vec3()` * as it's no longer special cased, glam can add back the `_w: f32` member and derive `Pod` and such * so we can revert the hack from #861 Best reviewed commit by commit, as the first commit is just a revert (that needed a little manual conflict resolution) and the second commit is the actual 3 line change. **I would like this change to be released as a minor patch like v0.34.1**. Upgrading from 0.34.0 to 0.34.1 is *technically* a breaking change for any rust-gpu user, but rust-gpu doesn't support glam 0.34.0 yet. So when I do add support for 0.34, I can just require at least version 0.34.1 to mitigate it. To prevent future breakages: Changing the members of a struct annotated with `#[rust_gpu::vector::v1]` is considered a breaking change for rust-gpu, even if they're just private. When I added those annotations, I assumed that'll basically never happen, but #786 changed `Vec3A` to have a private `_w: f32` member. ## Checklist - [ ] `cargo run -p ci` passes. - [ ] PR title follows [Conventional Commits](CONTRIBUTING.md#pull-request-titles); mark breaking changes with `!`.
Closed
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.
From bitshifter/glam-rs#898
Context:
This PR:
This change affects ALL glam versions, not just v0.34.