diff options
| author | Sheikh Dawood Abdul Ajees <[email protected]> | 2017-09-15 15:41:57 -0500 |
|---|---|---|
| committer | Sheikh Dawood Abdul Ajees <[email protected]> | 2017-09-15 15:41:57 -0500 |
| commit | d1c812f1162e5fdb13c215792725b2591d7428f5 (patch) | |
| tree | 407056c45c7e9320c48fca6a3697d81a061c4ea0 /PxShared/src/foundation/include | |
| parent | PhysX 3.4, APEX 1.4 patch release @22121272 (diff) | |
| download | physx-3.4-3.4.1.tar.xz physx-3.4-3.4.1.zip | |
PhysX 3.4.1, APEX 1.4.1 Release @22845541v3.4.1
Diffstat (limited to 'PxShared/src/foundation/include')
16 files changed, 24 insertions, 35 deletions
diff --git a/PxShared/src/foundation/include/PsAllocator.h b/PxShared/src/foundation/include/PsAllocator.h index cbf32d38..f988b6c5 100644 --- a/PxShared/src/foundation/include/PsAllocator.h +++ b/PxShared/src/foundation/include/PsAllocator.h @@ -108,7 +108,7 @@ #elif PX_XBOXONE #include <malloc.h> #define PxAlloca(x) alloca(x) -#elif PX_NX +#elif PX_SWITCH #include <malloc.h> #define PxAlloca(x) alloca(x) #endif diff --git a/PxShared/src/foundation/include/PsAoS.h b/PxShared/src/foundation/include/PsAoS.h index 641a40a3..5a7c82de 100644 --- a/PxShared/src/foundation/include/PsAoS.h +++ b/PxShared/src/foundation/include/PsAoS.h @@ -34,7 +34,7 @@ #if PX_WINDOWS && !PX_NEON #include "windows/PsWindowsAoS.h" -#elif(PX_UNIX_FAMILY || PX_PS4 || PX_NX) +#elif(PX_UNIX_FAMILY || PX_PS4 || PX_SWITCH) #include "unix/PsUnixAoS.h" #elif PX_XBOXONE #include "XboxOne/PsXboxOneAoS.h" diff --git a/PxShared/src/foundation/include/PsInlineAoS.h b/PxShared/src/foundation/include/PsInlineAoS.h index 6d43607f..6ae15cf3 100644 --- a/PxShared/src/foundation/include/PsInlineAoS.h +++ b/PxShared/src/foundation/include/PsInlineAoS.h @@ -35,7 +35,7 @@ #if PX_WINDOWS #include "windows/PsWindowsTrigConstants.h" #include "windows/PsWindowsInlineAoS.h" -#elif(PX_UNIX_FAMILY || PX_PS4 || PX_NX) +#elif(PX_UNIX_FAMILY || PX_PS4 || PX_SWITCH) #include "unix/PsUnixTrigConstants.h" #include "unix/PsUnixInlineAoS.h" #elif PX_XBOXONE diff --git a/PxShared/src/foundation/include/PsIntrinsics.h b/PxShared/src/foundation/include/PsIntrinsics.h index 1e1b9d1a..38b91baf 100644 --- a/PxShared/src/foundation/include/PsIntrinsics.h +++ b/PxShared/src/foundation/include/PsIntrinsics.h @@ -38,8 +38,8 @@ #include "unix/PsUnixIntrinsics.h" #elif PX_XBOXONE #include "XboxOne/PsXboxOneIntrinsics.h" -#elif PX_NX -#include "nx/PsNXIntrinsics.h" +#elif PX_SWITCH +#include "switch/PsSwitchIntrinsics.h" #else #error "Platform not supported!" #endif diff --git a/PxShared/src/foundation/include/PsMutex.h b/PxShared/src/foundation/include/PsMutex.h index 7c937965..23033d09 100644 --- a/PxShared/src/foundation/include/PsMutex.h +++ b/PxShared/src/foundation/include/PsMutex.h @@ -82,7 +82,7 @@ class PX_FOUNDATION_API MutexImpl /** Size of this class. */ - static const uint32_t& getSize(); + static uint32_t getSize(); }; template <typename Alloc = ReflectionAllocator<MutexImpl> > diff --git a/PxShared/src/foundation/include/PsSList.h b/PxShared/src/foundation/include/PsSList.h index f811c373..961010b2 100644 --- a/PxShared/src/foundation/include/PsSList.h +++ b/PxShared/src/foundation/include/PsSList.h @@ -91,7 +91,7 @@ struct PX_FOUNDATION_API SListImpl void push(SListEntry* entry); SListEntry* pop(); SListEntry* flush(); - static const uint32_t& getSize(); + static uint32_t getSize(); }; template <typename Alloc = ReflectionAllocator<SListImpl> > diff --git a/PxShared/src/foundation/include/PsSync.h b/PxShared/src/foundation/include/PsSync.h index 8b997312..1fd72f53 100644 --- a/PxShared/src/foundation/include/PsSync.h +++ b/PxShared/src/foundation/include/PsSync.h @@ -70,9 +70,9 @@ class PX_FOUNDATION_API SyncImpl void reset(); /** - Size of this class. - */ - static const uint32_t& getSize(); + Size of this class. + */ + static uint32_t getSize(); }; /*! diff --git a/PxShared/src/foundation/include/PsThread.h b/PxShared/src/foundation/include/PsThread.h index 8ba553af..ec9f999a 100644 --- a/PxShared/src/foundation/include/PsThread.h +++ b/PxShared/src/foundation/include/PsThread.h @@ -41,7 +41,7 @@ #if PX_WINDOWS_FAMILY || PX_XBOXONE #define PxSpinLockPause() __asm pause -#elif PX_LINUX || PX_ANDROID || PX_PS4 || PX_APPLE_FAMILY || PX_NX +#elif PX_LINUX || PX_ANDROID || PX_PS4 || PX_APPLE_FAMILY || PX_SWITCH #define PxSpinLockPause() asm("nop") #else #error "Platform not supported!" @@ -173,7 +173,7 @@ class PX_FOUNDATION_API ThreadImpl Change the affinity mask for this thread. The mask is a platform specific value. - On Windows, Linux, PS4, XboxOne and NX platforms, each set mask bit represents + On Windows, Linux, PS4, XboxOne and Switch platforms, each set mask bit represents the index of a logical processor that the OS may schedule thread execution on. Bits outside the range of valid logical processors may be ignored or cause the function to return an error. @@ -206,9 +206,9 @@ class PX_FOUNDATION_API ThreadImpl static uint32_t getNbPhysicalCores(); /** - Size of this class. - */ - static const uint32_t& getSize(); + Size of this class. + */ + static uint32_t getSize(); }; /** diff --git a/PxShared/src/foundation/include/PsUtilities.h b/PxShared/src/foundation/include/PsUtilities.h index 32fe4ec0..cd0f200a 100644 --- a/PxShared/src/foundation/include/PsUtilities.h +++ b/PxShared/src/foundation/include/PsUtilities.h @@ -122,7 +122,7 @@ PX_CUDA_CALLABLE PX_FORCE_INLINE void order(T& x, T& y, E1& xe1, E1& ye1) } } -#if PX_GCC_FAMILY && !PX_EMSCRIPTEN +#if PX_GCC_FAMILY && !PX_EMSCRIPTEN && !PX_LINUX __attribute__((noreturn)) #endif PX_INLINE void debugBreak() @@ -132,7 +132,11 @@ __attribute__((noreturn)) #elif PX_ANDROID raise(SIGTRAP); // works better than __builtin_trap. Proper call stack and can be continued. #elif PX_LINUX - asm("int $3"); + #if (PX_X64 || PX_X64) + asm("int $3"); + #else + raise(SIGTRAP); + #endif #elif PX_GCC_FAMILY __builtin_trap(); #else diff --git a/PxShared/src/foundation/include/PsVecMath.h b/PxShared/src/foundation/include/PsVecMath.h index 4e891d8f..ffd2de86 100644 --- a/PxShared/src/foundation/include/PsVecMath.h +++ b/PxShared/src/foundation/include/PsVecMath.h @@ -54,7 +54,7 @@ #define COMPILE_VECTOR_INTRINSICS 1 #elif PX_IOS&& PX_NEON #define COMPILE_VECTOR_INTRINSICS 1 -#elif PX_NX +#elif PX_SWITCH #define COMPILE_VECTOR_INTRINSICS 1 #else #define COMPILE_VECTOR_INTRINSICS 0 diff --git a/PxShared/src/foundation/include/PsVecMathAoSScalar.h b/PxShared/src/foundation/include/PsVecMathAoSScalar.h index beb6cdc2..b7fe8e40 100644 --- a/PxShared/src/foundation/include/PsVecMathAoSScalar.h +++ b/PxShared/src/foundation/include/PsVecMathAoSScalar.h @@ -34,9 +34,6 @@ #error Scalar version should not be included when using vector intrinsics. #endif -// Remove this define when all platforms use simd solver. -#define PX_SUPPORT_SIMD - struct VecI16V; struct VecU16V; struct VecI32V; diff --git a/PxShared/src/foundation/include/unix/PsUnixInlineAoS.h b/PxShared/src/foundation/include/unix/PsUnixInlineAoS.h index e54f2c8c..74002d51 100644 --- a/PxShared/src/foundation/include/unix/PsUnixInlineAoS.h +++ b/PxShared/src/foundation/include/unix/PsUnixInlineAoS.h @@ -34,9 +34,6 @@ #error Vector intrinsics should not be included when using scalar implementation. #endif -// Remove this define when all platforms use simd solver. -#define PX_SUPPORT_SIMD - #if PX_INTEL_FAMILY #include "sse2/PsUnixSse2InlineAoS.h" #elif PX_NEON diff --git a/PxShared/src/foundation/include/unix/PsUnixIntrinsics.h b/PxShared/src/foundation/include/unix/PsUnixIntrinsics.h index 4c6c8920..e15b3b5a 100644 --- a/PxShared/src/foundation/include/unix/PsUnixIntrinsics.h +++ b/PxShared/src/foundation/include/unix/PsUnixIntrinsics.h @@ -34,7 +34,7 @@ #include "foundation/PxAssert.h" #include <math.h> -#if PX_ANDROID +#if PX_ANDROID || (PX_LINUX && !(PX_X64 || PX_X64)) // x86[_64] Linux uses inline assembly for debug break #include <signal.h> // for Ns::debugBreak() { raise(SIGTRAP); } #endif diff --git a/PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h b/PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h index 2a0578d1..4df3ff6c 100644 --- a/PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h +++ b/PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h @@ -42,7 +42,7 @@ // "exact" #define VRECIPQ recipq_newton<4> -#if PX_NX +#if PX_SWITCH // StabilizationTests.AveragePoint needs more precision to succeed. #define VRECIP recip_newton<5> #else @@ -53,9 +53,6 @@ #define VECMATH_AOS_EPSILON (1e-3f) -// Remove this define when all platforms use simd solver. -#define PX_SUPPORT_SIMD - ////////////////////////////////////////////////////////////////////// //Test that Vec3V and FloatV are legal ////////////////////////////////// diff --git a/PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h b/PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h index 03555381..cdb20fa8 100644 --- a/PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h +++ b/PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h @@ -34,9 +34,6 @@ #error Vector intrinsics should not be included when using scalar implementation. #endif -// Remove this define when all platforms use simd solver. -#define PX_SUPPORT_SIMD - #ifdef __SSE4_2__ #include "smmintrin.h" #endif diff --git a/PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h b/PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h index 14a311fc..5fd1b8de 100644 --- a/PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h +++ b/PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h @@ -34,9 +34,6 @@ #error Vector intrinsics should not be included when using scalar implementation. #endif -// Remove this define when all platforms use simd solver. -#define PX_SUPPORT_SIMD - #include "../PsVecMathSSE.h" ////////////////////////////////////////////////////////////////////// |