Skip to content

Regression: creating arrays of glam vecs mispiles #189

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

Closed
Firestar99 opened this issue Dec 26, 2024 · 3 comments
Closed

Regression: creating arrays of glam vecs mispiles #189

Firestar99 opened this issue Dec 26, 2024 · 3 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@Firestar99
Copy link
Member

Firestar99 commented Dec 26, 2024

Confirmed regression on master bfa63c1 vs last release:

// build-pass

use spirv_std::spirv;
use glam::Vec2;

#[spirv(fragment)]
pub fn main() {
	let works = [1.; 4];
	let fails = [Vec2::default(); 4];
}

fails with:

error: cannot cast between pointer types
       from `*f32`
         to `*f32x2`
 --> $DIR/array_of_vectors.rs:9:22
  |
9 |     let array_of_vec2 = [Vec2::default(); 4];
  |                         ^^^^^^^^^^^^^^^^^^^^
  |
note: used from within `array_of_vectors::main`
 --> $DIR/array_of_vectors.rs:9:22
  |
9 |     let array_of_vec2 = [Vec2::default(); 4];
  |                         ^^^^^^^^^^^^^^^^^^^^
note: called by `main`
 --> $DIR/array_of_vectors.rs:7:8
  |
7 | pub fn main() {
  |        ^^^^

System Info

rust-gpu master bfa63c1

@Firestar99 Firestar99 added the bug Something isn't working label Dec 26, 2024
@Firestar99 Firestar99 changed the title Creating arrays of glam vecs mispiles Regression: creating arrays of glam vecs mispiles Dec 26, 2024
@LegNeato
Copy link
Collaborator

I think this is #46 ?

@Firestar99
Copy link
Member Author

Firestar99 commented Dec 26, 2024

I think it is #46, just that arrays of arrays is rather uncommon, whereas arrays of vectors is quite common. Feel free to mark as duplicate.

@LegNeato LegNeato added the duplicate This issue or pull request already exists label Dec 26, 2024
@LegNeato
Copy link
Collaborator

Yeah, let's dupe and track there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants