diff options
| author | sschirm <[email protected]> | 2017-02-27 16:40:12 +0100 |
|---|---|---|
| committer | sschirm <[email protected]> | 2017-03-01 18:04:26 +0100 |
| commit | 7840347c32755e94a807f978f1cbb558717ac8cf (patch) | |
| tree | 295cd3ca93a45f8fcc43cf3cbf3887c0e0c5526b /PxShared/include | |
| parent | Pre-release comments marking end of beta. (diff) | |
| download | physx-3.4-7840347c32755e94a807f978f1cbb558717ac8cf.tar.xz physx-3.4-7840347c32755e94a807f978f1cbb558717ac8cf.zip | |
PhysX 3.4, APEX 1.4 final release @21757769v3.4.0-rc-2
Diffstat (limited to 'PxShared/include')
| -rw-r--r-- | PxShared/include/foundation/PxIntrinsics.h | 2 | ||||
| -rw-r--r-- | PxShared/include/foundation/PxPreprocessor.h | 23 | ||||
| -rw-r--r-- | PxShared/include/foundation/unix/PxUnixIntrinsics.h | 4 |
3 files changed, 19 insertions, 10 deletions
diff --git a/PxShared/include/foundation/PxIntrinsics.h b/PxShared/include/foundation/PxIntrinsics.h index 3ee02c82..471f934c 100644 --- a/PxShared/include/foundation/PxIntrinsics.h +++ b/PxShared/include/foundation/PxIntrinsics.h @@ -38,6 +38,8 @@ #include "foundation/unix/PxUnixIntrinsics.h" #elif PX_XBOXONE #include "foundation/XboxOne/PxXboxOneIntrinsics.h" +#elif PX_NX +#include "foundation/nx/PxNXIntrinsics.h" #else #error "Platform not supported!" #endif diff --git a/PxShared/include/foundation/PxPreprocessor.h b/PxShared/include/foundation/PxPreprocessor.h index 6182de20..446ca762 100644 --- a/PxShared/include/foundation/PxPreprocessor.h +++ b/PxShared/include/foundation/PxPreprocessor.h @@ -31,8 +31,8 @@ #define PXFOUNDATION_PXPREPROCESSOR_H #include <stddef.h> -#if !(defined(__clang__) && (defined(_WIN32) || defined(_WIN64))) -#include <ciso646> // detect std::lib, unless clang on windows is used (PxMetaDataGenerator issue) +#if !defined(PX_GENERATE_META_DATA) +#include <ciso646> #endif /** \addtogroup foundation @{ @@ -87,6 +87,8 @@ Operating system defines, see http://sourceforge.net/p/predef/wiki/OperatingSyst #define PX_OSX 1 #elif defined(__ORBIS__) #define PX_PS4 1 +#elif defined(__NX__) +#define PX_NX 1 #else #error "Unknown operating system" #endif @@ -111,15 +113,17 @@ Architecture defines, see http://sourceforge.net/p/predef/wiki/Architectures/ /** SIMD defines */ -#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) || defined (__EMSCRIPTEN__) +#if !defined(PX_SIMD_DISABLED) +#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) || (defined (__EMSCRIPTEN__) && defined(__SSE2__)) #define PX_SSE2 1 #endif -#if defined(_M_ARM) || defined(__ARM_NEON__) +#if defined(_M_ARM) || defined(__ARM_NEON__) || defined(__ARM_NEON) #define PX_NEON 1 #endif #if defined(_M_PPC) || defined(__CELLOS_LV2__) #define PX_VMX 1 #endif +#endif /** define anything not defined on this platform to 0 @@ -157,6 +161,9 @@ define anything not defined on this platform to 0 #ifndef PX_PS4 #define PX_PS4 0 #endif +#ifndef PX_NX +#define PX_NX 0 +#endif #ifndef PX_X64 #define PX_X64 0 #endif @@ -418,7 +425,7 @@ General defines */ // static assert -#if(defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) || (PX_PS4) || (PX_APPLE_FAMILY) +#if(defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) || (PX_PS4) || (PX_APPLE_FAMILY) || (PX_NX) || (PX_CLANG && PX_ARM) #define PX_COMPILE_TIME_ASSERT(exp) typedef char PxCompileTimeAssert_Dummy[(exp) ? 1 : -1] __attribute__((unused)) #else #define PX_COMPILE_TIME_ASSERT(exp) typedef char PxCompileTimeAssert_Dummy[(exp) ? 1 : -1] @@ -462,13 +469,13 @@ PX_CUDA_CALLABLE PX_INLINE void PX_UNUSED(T const&) // This assert works on win32/win64, but may need further specialization on other platforms. // Some GCC compilers need the compiler flag -malign-double to be set. // Apparently the apple-clang-llvm compiler doesn't support malign-double. -#if PX_PS4 || PX_APPLE_FAMILY +#if PX_PS4 || PX_APPLE_FAMILY || (PX_CLANG && !PX_ARM) struct PxPackValidation { char _; long a; }; -#elif PX_ANDROID +#elif PX_ANDROID || (PX_CLANG && PX_ARM) struct PxPackValidation { char _; @@ -481,7 +488,7 @@ struct PxPackValidation long long a; }; #endif -#if !PX_APPLE_FAMILY +#if !PX_APPLE_FAMILY && !PX_EMSCRIPTEN PX_COMPILE_TIME_ASSERT(PX_OFFSET_OF(PxPackValidation, a) == 8); #endif diff --git a/PxShared/include/foundation/unix/PxUnixIntrinsics.h b/PxShared/include/foundation/unix/PxUnixIntrinsics.h index 7b9b9f37..351c83c1 100644 --- a/PxShared/include/foundation/unix/PxUnixIntrinsics.h +++ b/PxShared/include/foundation/unix/PxUnixIntrinsics.h @@ -37,8 +37,8 @@ #error "This file should only be included by Unix builds!!" #endif -#if PX_LINUX && PX_ARM - // Linux ARM toolchain can somehow end up including cmath header after math.h, which will undef a bunch of macros and place them in std namespace +#if PX_LINUX && !defined(__CUDACC__) + // Linux and CUDA compilation does not work with std::isfnite, as it is not marked as CUDA callable #ifndef isfinite #define isfinite std::isfinite #endif |