Skip to content

Commit

Permalink
Make Affine2 bytemuck::AnyBitPattern instead of bytemuck::Pod.
Browse files Browse the repository at this point in the history
Affine2 contains internal padding due to Mat2 using SIMD internally.
  • Loading branch information
bitshifter committed Nov 24, 2023
1 parent 03c2233 commit c432b1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/features/impl_bytemuck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use crate::{
};
use bytemuck::{AnyBitPattern, Pod, Zeroable};

unsafe impl Pod for Affine2 {}
// Affine2 contains internal padding due to Mat2 using SIMD
unsafe impl AnyBitPattern for Affine2 {}
unsafe impl Zeroable for Affine2 {}
unsafe impl AnyBitPattern for Affine3A {}
unsafe impl Zeroable for Affine3A {}
Expand Down Expand Up @@ -134,7 +135,7 @@ mod test {
};
}

test_pod_t!(affine2, Affine2);
test_any_bit_pattern_t!(affine2, Affine2);
test_any_bit_pattern_t!(affine3a, Affine3A);
test_pod_t!(mat2, Mat2);
test_pod_t!(mat3, Mat3);
Expand Down

0 comments on commit c432b1b

Please sign in to comment.