Skip to content

Regression: creating arrays of glam vecs mispiles #189

Closed
@Firestar99

Description

@Firestar99

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions