Skip to content

Commit 2e95a97

Browse files
committed
Revert "Don't use bytemuck derive on spirv. (#663)"
This reverts commit b3f3b08
1 parent b396e80 commit 2e95a97

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+81
-414
lines changed

src/f32/affine2.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,11 @@ use core::ops::{Deref, DerefMut, Mul, MulAssign};
66
/// A 2D affine transform, which can represent translation, rotation, scaling and shear.
77
#[derive(Copy, Clone)]
88
#[cfg_attr(
9-
all(
10-
feature = "bytemuck",
11-
not(any(feature = "scalar-math", target_arch = "spirv"))
12-
),
9+
all(feature = "bytemuck", not(feature = "scalar-math")),
1310
derive(bytemuck::AnyBitPattern)
1411
)]
1512
#[cfg_attr(
16-
all(
17-
feature = "bytemuck",
18-
feature = "scalar-math",
19-
not(target_arch = "spirv")
20-
),
13+
all(feature = "bytemuck", feature = "scalar-math"),
2114
derive(bytemuck::Pod, bytemuck::Zeroable)
2215
)]
2316
#[repr(C)]

src/f32/affine3a.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ use core::ops::{Deref, DerefMut, Mul, MulAssign};
77
///
88
/// This type is 16 byte aligned.
99
#[derive(Copy, Clone)]
10-
#[cfg_attr(
11-
all(feature = "bytemuck", not(target_arch = "spirv")),
12-
derive(bytemuck::AnyBitPattern)
13-
)]
10+
#[cfg_attr(feature = "bytemuck", derive(bytemuck::AnyBitPattern))]
1411
#[repr(C)]
1512
pub struct Affine3A {
1613
pub matrix3: Mat3A,

src/f32/coresimd/mat2.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ pub const fn mat2(x_axis: Vec2, y_axis: Vec2) -> Mat2 {
2020
///
2121
/// This type is 16 byte aligned.
2222
#[derive(Clone, Copy)]
23-
#[cfg_attr(
24-
all(feature = "bytemuck", not(target_arch = "spirv")),
25-
derive(bytemuck::Pod, bytemuck::Zeroable)
26-
)]
23+
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
2724
#[repr(transparent)]
2825
pub struct Mat2(pub(crate) f32x4);
2926

src/f32/coresimd/mat3a.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ pub const fn mat3a(x_axis: Vec3A, y_axis: Vec3A, z_axis: Vec3A) -> Mat3A {
4444
/// vectors respectively. These methods assume that `Self` contains a valid affine
4545
/// transform.
4646
#[derive(Clone, Copy)]
47-
#[cfg_attr(
48-
all(feature = "bytemuck", not(target_arch = "spirv")),
49-
derive(bytemuck::Pod, bytemuck::Zeroable)
50-
)]
47+
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
5148
#[repr(C)]
5249
pub struct Mat3A {
5350
pub x_axis: Vec3A,

src/f32/coresimd/mat4.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ pub const fn mat4(x_axis: Vec4, y_axis: Vec4, z_axis: Vec4, w_axis: Vec4) -> Mat
5050
/// The resulting perspective project can be use to transform 3D vectors as points with
5151
/// perspective correction using the [`Self::project_point3()`] convenience method.
5252
#[derive(Clone, Copy)]
53-
#[cfg_attr(
54-
all(feature = "bytemuck", not(target_arch = "spirv")),
55-
derive(bytemuck::Pod, bytemuck::Zeroable)
56-
)]
53+
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
5754
#[repr(C)]
5855
pub struct Mat4 {
5956
pub x_axis: Vec4,

src/f32/coresimd/quat.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ pub const fn quat(x: f32, y: f32, z: f32, w: f32) -> Quat {
3535
///
3636
/// This type is 16 byte aligned.
3737
#[derive(Clone, Copy)]
38-
#[cfg_attr(
39-
all(feature = "bytemuck", not(target_arch = "spirv")),
40-
derive(bytemuck::Pod, bytemuck::Zeroable)
41-
)]
38+
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
4239
#[repr(transparent)]
4340
pub struct Quat(pub(crate) f32x4);
4441

src/f32/coresimd/vec3a.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ pub const fn vec3a(x: f32, y: f32, z: f32) -> Vec3A {
2626
///
2727
/// This type is 16 byte aligned.
2828
#[derive(Clone, Copy)]
29-
#[cfg_attr(
30-
all(feature = "bytemuck", not(target_arch = "spirv")),
31-
derive(bytemuck::Pod, bytemuck::Zeroable)
32-
)]
29+
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
3330
#[repr(transparent)]
3431
pub struct Vec3A(pub(crate) f32x4);
3532

src/f32/coresimd/vec4.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ pub const fn vec4(x: f32, y: f32, z: f32, w: f32) -> Vec4 {
2222
///
2323
/// This type is 16 byte aligned.
2424
#[derive(Clone, Copy)]
25-
#[cfg_attr(
26-
all(feature = "bytemuck", not(target_arch = "spirv")),
27-
derive(bytemuck::Pod, bytemuck::Zeroable)
28-
)]
25+
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
2926
#[repr(transparent)]
3027
pub struct Vec4(pub(crate) f32x4);
3128

src/f32/mat3.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ pub const fn mat3(x_axis: Vec3, y_axis: Vec3, z_axis: Vec3) -> Mat3 {
4242
/// vectors respectively. These methods assume that `Self` contains a valid affine
4343
/// transform.
4444
#[derive(Clone, Copy)]
45-
#[cfg_attr(
46-
all(feature = "bytemuck", not(target_arch = "spirv")),
47-
derive(bytemuck::Pod, bytemuck::Zeroable)
48-
)]
45+
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
4946
#[repr(C)]
5047
pub struct Mat3 {
5148
pub x_axis: Vec3,

src/f32/neon/mat2.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ pub const fn mat2(x_axis: Vec2, y_axis: Vec2) -> Mat2 {
2626
///
2727
/// This type is 16 byte aligned.
2828
#[derive(Clone, Copy)]
29-
#[cfg_attr(
30-
all(feature = "bytemuck", not(target_arch = "spirv")),
31-
derive(bytemuck::Pod, bytemuck::Zeroable)
32-
)]
29+
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
3330
#[repr(transparent)]
3431
pub struct Mat2(pub(crate) float32x4_t);
3532

0 commit comments

Comments
 (0)