aboutsummaryrefslogtreecommitdiff
path: root/PxShared/src/foundation/include
diff options
context:
space:
mode:
authorSheikh Dawood Abdul Ajees <[email protected]>2018-11-27 13:02:50 -0600
committerSheikh Dawood Abdul Ajees <[email protected]>2018-11-27 13:02:50 -0600
commit78cab22a61786a23f2ee1ad7c5dcbec0024befca (patch)
tree27cb86e3add785670ddfdbfc901f1654d74d1cb2 /PxShared/src/foundation/include
parentPhysX 3.4, APEX 1.4 patch release @24990349 (diff)
downloadphysx-3.4-78cab22a61786a23f2ee1ad7c5dcbec0024befca.tar.xz
physx-3.4-78cab22a61786a23f2ee1ad7c5dcbec0024befca.zip
PhysX 3.4, APEX 1.4 patch release @25256367
Diffstat (limited to 'PxShared/src/foundation/include')
-rw-r--r--PxShared/src/foundation/include/PsVecMath.h20
-rw-r--r--PxShared/src/foundation/include/PsVecMathAoSScalar.h11
-rw-r--r--PxShared/src/foundation/include/PsVecMathAoSScalarInline.h11
-rw-r--r--PxShared/src/foundation/include/PsVecMathSSE.h12
-rw-r--r--PxShared/src/foundation/include/PsVecQuat.h11
-rw-r--r--PxShared/src/foundation/include/unix/PsUnixTrigConstants.h11
-rw-r--r--PxShared/src/foundation/include/unix/neon/PsUnixNeonAoS.h11
-rw-r--r--PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h11
-rw-r--r--PxShared/src/foundation/include/unix/sse2/PsUnixSse2AoS.h12
-rw-r--r--PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h11
-rw-r--r--PxShared/src/foundation/include/windows/PsWindowsAoS.h11
-rw-r--r--PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h11
-rw-r--r--PxShared/src/foundation/include/windows/PsWindowsTrigConstants.h11
13 files changed, 144 insertions, 10 deletions
diff --git a/PxShared/src/foundation/include/PsVecMath.h b/PxShared/src/foundation/include/PsVecMath.h
index 985e004f..eabda20e 100644
--- a/PxShared/src/foundation/include/PsVecMath.h
+++ b/PxShared/src/foundation/include/PsVecMath.h
@@ -71,6 +71,12 @@
#include <xmmintrin.h>
#endif
+#if COMPILE_VECTOR_INTRINSICS
+#include "PsAoS.h"
+#else
+#include "PsVecMathAoSScalar.h"
+#endif
+
namespace physx
{
namespace shdfnd
@@ -90,12 +96,6 @@ namespace aos
// col4).
// Mat44V - 16-byte aligned representation of any 4x4 matrix.
-#if COMPILE_VECTOR_INTRINSICS
-#include "PsAoS.h"
-#else
-#include "PsVecMathAoSScalar.h"
-#endif
-
//////////////////////////////////////////
// Construct a simd type from a scalar type
//////////////////////////////////////////
@@ -1322,6 +1322,10 @@ PX_FORCE_INLINE Vec3V V3LoadU_SafeReadW(const PxVec3& f)
return Vec3V_From_Vec4V(V4LoadU(&f.x));
}
+} // namespace aos
+} // namespace shdfnd
+} // namespace physx
+
// Now for the cross-platform implementations of the 16-byte aligned maths functions (win32/360/ppu/spu etc).
#if COMPILE_VECTOR_INTRINSICS
#include "PsInlineAoS.h"
@@ -1330,8 +1334,4 @@ PX_FORCE_INLINE Vec3V V3LoadU_SafeReadW(const PxVec3& f)
#endif // #if !COMPILE_VECTOR_INTRINSICS
#include "PsVecQuat.h"
-} // namespace aos
-} // namespace shdfnd
-} // namespace physx
-
#endif // PSFOUNDATION_PSVECMATH_H
diff --git a/PxShared/src/foundation/include/PsVecMathAoSScalar.h b/PxShared/src/foundation/include/PsVecMathAoSScalar.h
index 7ba912b4..cb37ea71 100644
--- a/PxShared/src/foundation/include/PsVecMathAoSScalar.h
+++ b/PxShared/src/foundation/include/PsVecMathAoSScalar.h
@@ -34,6 +34,13 @@
#error Scalar version should not be included when using vector intrinsics.
#endif
+namespace physx
+{
+namespace shdfnd
+{
+namespace aos
+{
+
struct VecI16V;
struct VecU16V;
struct VecI32V;
@@ -236,4 +243,8 @@ struct VecU16V
typedef VecI32V VecShiftV;
#define VecShiftVArg VecShiftV &
+} // namespace aos
+} // namespace shdfnd
+} // namespace physx
+
#endif // PX_PHYSICS_COMMON_VECMATH_INLINE_SCALAR
diff --git a/PxShared/src/foundation/include/PsVecMathAoSScalarInline.h b/PxShared/src/foundation/include/PsVecMathAoSScalarInline.h
index b98eb922..79f24a32 100644
--- a/PxShared/src/foundation/include/PsVecMathAoSScalarInline.h
+++ b/PxShared/src/foundation/include/PsVecMathAoSScalarInline.h
@@ -34,6 +34,13 @@
#error Scalar version should not be included when using vector intrinsics.
#endif
+namespace physx
+{
+namespace shdfnd
+{
+namespace aos
+{
+
#define BOOL_TO_U32(b) (PxU32)(- PxI32(b))
#define TRUE_TO_U32 (PxU32)(-1)
#define FALSE_TO_U32 (PxU32)(0)
@@ -2261,4 +2268,8 @@ PX_FORCE_INLINE VecU32V V4ConvertToU32VSaturate(const Vec4V a, PxU32 power)
}
*/
+} // namespace aos
+} // namespace shdfnd
+} // namespace physx
+
#endif // PSFOUNDATION_PSVECMATHAOSSCALARINLINE_H
diff --git a/PxShared/src/foundation/include/PsVecMathSSE.h b/PxShared/src/foundation/include/PsVecMathSSE.h
index 13e44663..fd7af011 100644
--- a/PxShared/src/foundation/include/PsVecMathSSE.h
+++ b/PxShared/src/foundation/include/PsVecMathSSE.h
@@ -30,6 +30,13 @@
#ifndef PSFOUNDATION_PSVECMATHSSE_H
#define PSFOUNDATION_PSVECMATHSSE_H
+namespace physx
+{
+namespace shdfnd
+{
+namespace aos
+{
+
namespace
{
const PX_ALIGN(16, PxF32) minus1w[4] = { 0.0f, 0.0f, 0.0f, -1.0f };
@@ -52,5 +59,10 @@ PX_FORCE_INLINE void QuatGetMat33V(const QuatVArg q, Vec3V& column0, Vec3V& colu
column2 = V4MulAdd(v, V4GetZ(q2), _mm_shuffle_ps(a2, a2, _MM_SHUFFLE(3, 0, 2, 1)));
}
+} // namespace aos
+} // namespace shdfnd
+} // namespace physx
+
+
#endif // PSFOUNDATION_PSVECMATHSSE_H
diff --git a/PxShared/src/foundation/include/PsVecQuat.h b/PxShared/src/foundation/include/PsVecQuat.h
index 4adb0367..77f8c1ba 100644
--- a/PxShared/src/foundation/include/PsVecQuat.h
+++ b/PxShared/src/foundation/include/PsVecQuat.h
@@ -32,6 +32,13 @@
//#include "PsInlineAoS.h"
+namespace physx
+{
+namespace shdfnd
+{
+namespace aos
+{
+
#ifndef PX_PIDIV2
#define PX_PIDIV2 1.570796327f
#endif
@@ -452,4 +459,8 @@ PX_FORCE_INLINE QuatV Mat33GetQuatV(const Mat33V& a)
}
}
+} // namespace aos
+} // namespace shdfnd
+} // namespace physx
+
#endif
diff --git a/PxShared/src/foundation/include/unix/PsUnixTrigConstants.h b/PxShared/src/foundation/include/unix/PsUnixTrigConstants.h
index 66d93aa4..0e4efd0e 100644
--- a/PxShared/src/foundation/include/unix/PsUnixTrigConstants.h
+++ b/PxShared/src/foundation/include/unix/PsUnixTrigConstants.h
@@ -30,6 +30,13 @@
#ifndef PSFOUNDATION_PSUNIXTRIGCONSTANTS_H
#define PSFOUNDATION_PSUNIXTRIGCONSTANTS_H
+namespace physx
+{
+namespace shdfnd
+{
+namespace aos
+{
+
//#define PX_GLOBALCONST extern const __declspec(selectany)
#define PX_GLOBALCONST extern const __attribute__((weak))
@@ -79,4 +86,8 @@ PX_GLOBALCONST PX_VECTORF32 g_PXPiConstants0 = { { PxPi, PxTwoPi, PxInvPi, PxInv
PX_GLOBALCONST PX_VECTORF32 g_PXReciprocalTwoPi = { { PxInvTwoPi, PxInvTwoPi, PxInvTwoPi, PxInvTwoPi } };
PX_GLOBALCONST PX_VECTORF32 g_PXTwoPi = { { PxTwoPi, PxTwoPi, PxTwoPi, PxTwoPi } };
+} // namespace aos
+} // namespace shdfnd
+} // namespace physx
+
#endif
diff --git a/PxShared/src/foundation/include/unix/neon/PsUnixNeonAoS.h b/PxShared/src/foundation/include/unix/neon/PsUnixNeonAoS.h
index 28916c91..92641a9e 100644
--- a/PxShared/src/foundation/include/unix/neon/PsUnixNeonAoS.h
+++ b/PxShared/src/foundation/include/unix/neon/PsUnixNeonAoS.h
@@ -39,6 +39,13 @@
// only ARM NEON compatible platforms should reach this
#include <arm_neon.h>
+namespace physx
+{
+namespace shdfnd
+{
+namespace aos
+{
+
typedef float32x2_t FloatV;
typedef float32x4_t Vec3V;
typedef float32x4_t Vec4V;
@@ -126,4 +133,8 @@ struct Mat44V
Vec4V PX_ALIGN(16, col3);
} PX_ALIGN_SUFFIX(16);
+} // namespace aos
+} // namespace shdfnd
+} // namespace physx
+
#endif // PSFOUNDATION_PSUNIXNEONAOS_H
diff --git a/PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h b/PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h
index 1db72c25..79fb051c 100644
--- a/PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h
+++ b/PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h
@@ -34,6 +34,13 @@
#error Vector intrinsics should not be included when using scalar implementation.
#endif
+namespace physx
+{
+namespace shdfnd
+{
+namespace aos
+{
+
// improved estimates
#define VRECIPEQ recipq_newton<1>
#define VRECIPE recip_newton<1>
@@ -3583,4 +3590,8 @@ PX_FORCE_INLINE void QuatGetMat33V(const QuatVArg q, Vec3V& column0, Vec3V& colu
column2 = V3Merge(FAdd(xz, yw), FSub(yz, xw), FSub(v, yy));
}
+} // namespace aos
+} // namespace shdfnd
+} // namespace physx
+
#endif // PSFOUNDATION_PSUNIXNEONINLINEAOS_H
diff --git a/PxShared/src/foundation/include/unix/sse2/PsUnixSse2AoS.h b/PxShared/src/foundation/include/unix/sse2/PsUnixSse2AoS.h
index 4227a04e..a57025a8 100644
--- a/PxShared/src/foundation/include/unix/sse2/PsUnixSse2AoS.h
+++ b/PxShared/src/foundation/include/unix/sse2/PsUnixSse2AoS.h
@@ -35,6 +35,14 @@
#if !COMPILE_VECTOR_INTRINSICS
#error Vector intrinsics should not be included when using scalar implementation.
#endif
+
+namespace physx
+{
+namespace shdfnd
+{
+namespace aos
+{
+
#if PX_EMSCRIPTEN
typedef int8_t __int8_t;
typedef int16_t __int16_t;
@@ -176,4 +184,8 @@ struct Mat44V
Vec4V PX_ALIGN(16, col3);
} PX_ALIGN_SUFFIX(16);
+} // namespace aos
+} // namespace shdfnd
+} // namespace physx
+
#endif // PSFOUNDATION_PSUNIXSSE2AOS_H
diff --git a/PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h b/PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h
index ba395e6b..739c9905 100644
--- a/PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h
+++ b/PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h
@@ -40,6 +40,13 @@
#include "../../PsVecMathSSE.h"
+namespace physx
+{
+namespace shdfnd
+{
+namespace aos
+{
+
#define PX_FPCLASS_SNAN 0x0001 /* signaling NaN */
#define PX_FPCLASS_QNAN 0x0002 /* quiet NaN */
#define PX_FPCLASS_NINF 0x0004 /* negative infinity */
@@ -3225,4 +3232,8 @@ PX_FORCE_INLINE VecU32V V4ConvertToU32VSaturate(const Vec4V in, PxU32 power)
return result;
}
+} // namespace aos
+} // namespace shdfnd
+} // namespace physx
+
#endif // PSFOUNDATION_PSUNIXSSE2INLINEAOS_H
diff --git a/PxShared/src/foundation/include/windows/PsWindowsAoS.h b/PxShared/src/foundation/include/windows/PsWindowsAoS.h
index 8d0f7510..a4d58c93 100644
--- a/PxShared/src/foundation/include/windows/PsWindowsAoS.h
+++ b/PxShared/src/foundation/include/windows/PsWindowsAoS.h
@@ -36,6 +36,13 @@
#error Vector intrinsics should not be included when using scalar implementation.
#endif
+namespace physx
+{
+namespace shdfnd
+{
+namespace aos
+{
+
typedef __m128 FloatV;
typedef __m128 Vec3V;
typedef __m128 Vec4V;
@@ -128,4 +135,8 @@ struct Mat44V
Vec4V PX_ALIGN(16, col3);
} PX_ALIGN_SUFFIX(16);
+} // namespace aos
+} // namespace shdfnd
+} // namespace physx
+
#endif // PSFOUNDATION_PSWINDOWSAOS_H
diff --git a/PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h b/PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h
index 2635311c..f5a2a44d 100644
--- a/PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h
+++ b/PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h
@@ -36,6 +36,13 @@
#include "../PsVecMathSSE.h"
+namespace physx
+{
+namespace shdfnd
+{
+namespace aos
+{
+
//////////////////////////////////////////////////////////////////////
//Test that Vec3V and FloatV are legal
//////////////////////////////////////////////////////////////////////
@@ -3118,4 +3125,8 @@ PX_FORCE_INLINE Vec4V V4ConvertFromI32V(const VecI32V in)
return _mm_cvtepi32_ps(internalWindowsSimd::m128_F2I(in));
}
+} // namespace aos
+} // namespace shdfnd
+} // namespace physx
+
#endif // PSFOUNDATION_PSWINDOWSINLINEAOS_H
diff --git a/PxShared/src/foundation/include/windows/PsWindowsTrigConstants.h b/PxShared/src/foundation/include/windows/PsWindowsTrigConstants.h
index 80a704bc..f78fe4cf 100644
--- a/PxShared/src/foundation/include/windows/PsWindowsTrigConstants.h
+++ b/PxShared/src/foundation/include/windows/PsWindowsTrigConstants.h
@@ -30,6 +30,13 @@
#ifndef PSFOUNDATION_PSWINDOWSTRIGCONSTANTS_H
#define PSFOUNDATION_PSWINDOWSTRIGCONSTANTS_H
+namespace physx
+{
+namespace shdfnd
+{
+namespace aos
+{
+
#define PX_GLOBALCONST extern const __declspec(selectany)
__declspec(align(16)) struct PX_VECTORF32
@@ -84,4 +91,8 @@ PX_GLOBALCONST PX_VECTORF32 g_PXPiConstants0 = { { PxPi, PxTwoPi, PxInvPi, PxInv
PX_GLOBALCONST PX_VECTORF32 g_PXReciprocalTwoPi = { { PxInvTwoPi, PxInvTwoPi, PxInvTwoPi, PxInvTwoPi } };
PX_GLOBALCONST PX_VECTORF32 g_PXTwoPi = { { PxTwoPi, PxTwoPi, PxTwoPi, PxTwoPi } };
+} // namespace aos
+} // namespace shdfnd
+} // namespace physx
+
#endif