Skip to content

Commit 5a5d2bd

Browse files
committed
Fixed ARM-NEON GCC conformance issue with half-precision optimizations on ARM64
1 parent 5d15267 commit 5a5d2bd

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Inc/DirectXPackedVector.inl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -644,13 +644,13 @@ inline HALF* XMConvertFloatToHalfStream
644644

645645
uint16x4_t vHalf = vreinterpret_u16_f16(vcvt_f16_f32(vFloat));
646646

647-
vst1_lane_u16(reinterpret_cast<float*>(pHalf), vHalf, 0);
647+
vst1_lane_u16(reinterpret_cast<uint16_t*>(pHalf), vHalf, 0);
648648
pHalf += OutputStride;
649-
vst1_lane_u16(reinterpret_cast<float*>(pHalf), vHalf, 1);
649+
vst1_lane_u16(reinterpret_cast<uint16_t*>(pHalf), vHalf, 1);
650650
pHalf += OutputStride;
651-
vst1_lane_u16(reinterpret_cast<float*>(pHalf), vHalf, 2);
651+
vst1_lane_u16(reinterpret_cast<uint16_t*>(pHalf), vHalf, 2);
652652
pHalf += OutputStride;
653-
vst1_lane_u16(reinterpret_cast<float*>(pHalf), vHalf, 3);
653+
vst1_lane_u16(reinterpret_cast<uint16_t*>(pHalf), vHalf, 3);
654654
pHalf += OutputStride;
655655
i += 4;
656656
}
@@ -701,13 +701,13 @@ inline HALF* XMConvertFloatToHalfStream
701701

702702
uint16x4_t vHalf = vreinterpret_u16_f16(vcvt_f16_f32(vFloat));
703703

704-
vst1_lane_u16(reinterpret_cast<float*>(pHalf), vHalf, 0);
704+
vst1_lane_u16(reinterpret_cast<uint16_t*>(pHalf), vHalf, 0);
705705
pHalf += OutputStride;
706-
vst1_lane_u16(reinterpret_cast<float*>(pHalf), vHalf, 1);
706+
vst1_lane_u16(reinterpret_cast<uint16_t*>(pHalf), vHalf, 1);
707707
pHalf += OutputStride;
708-
vst1_lane_u16(reinterpret_cast<float*>(pHalf), vHalf, 2);
708+
vst1_lane_u16(reinterpret_cast<uint16_t*>(pHalf), vHalf, 2);
709709
pHalf += OutputStride;
710-
vst1_lane_u16(reinterpret_cast<float*>(pHalf), vHalf, 3);
710+
vst1_lane_u16(reinterpret_cast<uint16_t*>(pHalf), vHalf, 3);
711711
pHalf += OutputStride;
712712
i += 4;
713713
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2011-2020 Microsoft Corp
3+
Copyright (c) 2011-2021 Microsoft Corp
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this
66
software and associated documentation files (the "Software"), to deal in the Software

0 commit comments

Comments
 (0)