Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to #[repr(simd)] in nightly break XYZ structs on SPIR-V targets #132

Closed
Arc-blroth opened this issue Feb 20, 2021 · 2 comments
Closed

Comments

@Arc-blroth
Copy link

Arc-blroth commented Feb 20, 2021

Since rust-lang/rust#80652, #repr(simd)] types on nightly Rust are now required to have a power-of-two size. This change breaks glam::core::storage::XYZ and everything that depends on it on SPIR-V targets:

error[E0075]: SIMD vector length must be a power of two
    --> .cargo\registry\src\github.com-1ecc6299db9ec823\glam-0.12.0\src\core\storage.rs:12:1
     |
  12 | / pub struct XYZ<T> {
  13 | |     pub x: T,
  14 | |     pub y: T,
  15 | |     pub z: T,
  16 | | }
     | |_^
  error: monomorphising SIMD type `XYZ<f32>` of non-power-of-two length

Whether or not non-power-of-two support for SIMD types is coming back is still being discussed, so it's possible that someone will re-add non-power-of-two support in the future. For now though, this issue would make it hard for downstream consumers like EmbarkStudios/rust-gpu to move to the latest nightly.

@bitshifter
Copy link
Owner

Thanks for the heads up @Arc-blroth!

@workingjubilee
Copy link

Whoops! Our bad.

Going to figure out how to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants