Skip to content

Commit 0f82c2b

Browse files
committed
Merge branch 'master' into mobile_hacks
2 parents ee767a6 + b5f5052 commit 0f82c2b

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

cl_dll/studio_util.cpp

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,10 @@ AngleQuaternion
253253
254254
====================
255255
*/
256-
#if XASH_SIMD_NEON
257-
static const uint32x4_t AngleQuaternion_sign2 = vzipq_u32(vdupq_n_u32(0x80000000), vdupq_n_u32(0x00000000)).val[0]; // { 0x80000000, 0x00000000, 0x80000000, 0x00000000 };
258-
#endif
259256
void AngleQuaternion( float *angles, vec4_t quaternion )
260257
{
261258
#if XASH_SIMD_NEON
259+
static const uint32x4_t AngleQuaternion_sign2 = vzipq_u32(vdupq_n_u32(0x80000000), vdupq_n_u32(0x00000000)).val[0]; // { 0x80000000, 0x00000000, 0x80000000, 0x00000000 };
262260
float32x4_t angles_reg = {};
263261
memcpy(&angles_reg, angles, sizeof(float) * 3);
264262
float32x4x2_t sr_sp_sy_0_cr_cp_cy_1;
@@ -463,18 +461,15 @@ QuaternionMatrix
463461
464462
====================
465463
*/
466-
#if XASH_SIMD_NEON
467-
static const uint32x4_t QuaternionMatrix_sign1 = vsetq_lane_u32(0x80000000, vdupq_n_u32(0x00000000), 0); // { 0x80000000, 0x00000000, 0x00000000, 0x00000000 };
468-
static const uint32x4_t QuaternionMatrix_sign2 = vsetq_lane_u32(0x80000000, vdupq_n_u32(0x00000000), 1); // { 0x00000000, 0x80000000, 0x00000000, 0x00000000 };
469-
static const uint32x4_t QuaternionMatrix_sign3 = vsetq_lane_u32(0x00000000, vdupq_n_u32(0x80000000), 2); // { 0x80000000, 0x80000000, 0x00000000, 0x80000000 };
470-
static const float32x4_t matrix3x4_identity_0 = vsetq_lane_f32(1, vdupq_n_f32(0), 0); // { 1, 0, 0, 0 }
471-
static const float32x4_t matrix3x4_identity_1 = vsetq_lane_f32(1, vdupq_n_f32(0), 1); // { 0, 1, 0, 0 }
472-
static const float32x4_t matrix3x4_identity_2 = vsetq_lane_f32(1, vdupq_n_f32(0), 2); // { 0, 0, 1, 0 }
473-
#endif
474-
475464
void QuaternionMatrix( vec4_t quaternion, float (*matrix)[4] )
476465
{
477466
#if XASH_SIMD_NEON
467+
static const uint32x4_t QuaternionMatrix_sign1 = vsetq_lane_u32(0x80000000, vdupq_n_u32(0x00000000), 0); // { 0x80000000, 0x00000000, 0x00000000, 0x00000000 };
468+
static const uint32x4_t QuaternionMatrix_sign2 = vsetq_lane_u32(0x80000000, vdupq_n_u32(0x00000000), 1); // { 0x00000000, 0x80000000, 0x00000000, 0x00000000 };
469+
static const uint32x4_t QuaternionMatrix_sign3 = vsetq_lane_u32(0x00000000, vdupq_n_u32(0x80000000), 2); // { 0x80000000, 0x80000000, 0x00000000, 0x80000000 };
470+
static const float32x4_t matrix3x4_identity_0 = vsetq_lane_f32(1, vdupq_n_f32(0), 0); // { 1, 0, 0, 0 }
471+
static const float32x4_t matrix3x4_identity_1 = vsetq_lane_f32(1, vdupq_n_f32(0), 1); // { 0, 1, 0, 0 }
472+
static const float32x4_t matrix3x4_identity_2 = vsetq_lane_f32(1, vdupq_n_f32(0), 2); // { 0, 0, 1, 0 }
478473
float32x4_t quaternion_reg;
479474
memcpy(&quaternion_reg, quaternion, sizeof(float) * 4);
480475

0 commit comments

Comments
 (0)