support glam v0.34 - #661
Draft
Firestar99 wants to merge 2 commits into
Draft
Firestar99 wants to merge 2 commits into
Firestar99 wants to merge 2 commits into
Conversation
eddyb
approved these changes
Oct 5, 2026
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 `!`.
This branch has not been deployed
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.
Requires #660 bitshifter/glam-rs#898
Updating from glam v0.34.0 to v0.34.1 (with bitshifter/glam-rs#898) is a breaking change for rust-gpu users. Thus, we will never offer rust-gpu with anything lower than glam v0.34.1.
How this will get merged: