Browse Source

client: studio: another NEON type fix for AngleQuaternion, static-ize global NEON vectors

fix-cwd-path
Alibek Omarov 1 year ago
parent
commit
d4995df92c
  1. 18
      cl_dll/studio_util.cpp

18
cl_dll/studio_util.cpp

@ -254,11 +254,7 @@ AngleQuaternion
==================== ====================
*/ */
#if XASH_SIMD_NEON #if XASH_SIMD_NEON
static const float32x4_t AngleQuaternion_sign2 = static const uint32x4_t AngleQuaternion_sign2 = vzipq_u32(vdupq_n_u32(0x80000000), vdupq_n_u32(0x00000000)).val[0]; // { 0x80000000, 0x00000000, 0x80000000, 0x00000000 };
vzipq_f32(
vreinterpretq_f32_u32(vdupq_n_u32(0x80000000)),
vreinterpretq_f32_u32(vdupq_n_u32(0x00000000))
).val[0]; // { 0x80000000, 0x00000000, 0x80000000, 0x00000000 };
#endif #endif
void AngleQuaternion( float *angles, vec4_t quaternion ) void AngleQuaternion( float *angles, vec4_t quaternion )
{ {
@ -411,12 +407,12 @@ QuaternionMatrix
==================== ====================
*/ */
#if XASH_SIMD_NEON #if XASH_SIMD_NEON
const uint32x4_t QuaternionMatrix_sign1 = vsetq_lane_u32(0x80000000, vdupq_n_u32(0x00000000), 0); // { 0x80000000, 0x00000000, 0x00000000, 0x00000000 }; static const uint32x4_t QuaternionMatrix_sign1 = vsetq_lane_u32(0x80000000, vdupq_n_u32(0x00000000), 0); // { 0x80000000, 0x00000000, 0x00000000, 0x00000000 };
const uint32x4_t QuaternionMatrix_sign2 = vsetq_lane_u32(0x80000000, vdupq_n_u32(0x00000000), 1); // { 0x00000000, 0x80000000, 0x00000000, 0x00000000 }; static const uint32x4_t QuaternionMatrix_sign2 = vsetq_lane_u32(0x80000000, vdupq_n_u32(0x00000000), 1); // { 0x00000000, 0x80000000, 0x00000000, 0x00000000 };
const uint32x4_t QuaternionMatrix_sign3 = vsetq_lane_u32(0x00000000, vdupq_n_u32(0x80000000), 2); // { 0x80000000, 0x80000000, 0x00000000, 0x80000000 }; static const uint32x4_t QuaternionMatrix_sign3 = vsetq_lane_u32(0x00000000, vdupq_n_u32(0x80000000), 2); // { 0x80000000, 0x80000000, 0x00000000, 0x80000000 };
const float32x4_t matrix3x4_identity_0 = vsetq_lane_f32(1, vdupq_n_f32(0), 0); // { 1, 0, 0, 0 } static const float32x4_t matrix3x4_identity_0 = vsetq_lane_f32(1, vdupq_n_f32(0), 0); // { 1, 0, 0, 0 }
const float32x4_t matrix3x4_identity_1 = vsetq_lane_f32(1, vdupq_n_f32(0), 1); // { 0, 1, 0, 0 } static const float32x4_t matrix3x4_identity_1 = vsetq_lane_f32(1, vdupq_n_f32(0), 1); // { 0, 1, 0, 0 }
const float32x4_t matrix3x4_identity_2 = vsetq_lane_f32(1, vdupq_n_f32(0), 2); // { 0, 0, 1, 0 } static const float32x4_t matrix3x4_identity_2 = vsetq_lane_f32(1, vdupq_n_f32(0), 2); // { 0, 0, 1, 0 }
#endif #endif
void QuaternionMatrix( vec4_t quaternion, float (*matrix)[4] ) void QuaternionMatrix( vec4_t quaternion, float (*matrix)[4] )

Loading…
Cancel
Save