diff options
Diffstat (limited to 'APEX_1.4/module')
3 files changed, 21 insertions, 3 deletions
diff --git a/APEX_1.4/module/clothing/embedded/LowLevelCloth/src/SimdTypes.h b/APEX_1.4/module/clothing/embedded/LowLevelCloth/src/SimdTypes.h index 667604bc..556d0ad2 100644 --- a/APEX_1.4/module/clothing/embedded/LowLevelCloth/src/SimdTypes.h +++ b/APEX_1.4/module/clothing/embedded/LowLevelCloth/src/SimdTypes.h @@ -32,12 +32,21 @@ #include <cmath> // ps4 compiler defines _M_X64 without value -#if((defined _M_IX86) || (defined _M_X64) || (defined __i386__) || (defined __x86_64__)) +#if !defined(PX_SIMD_DISABLED) +#if((defined _M_IX86) || (defined _M_X64) || (defined __i386__) || (defined __x86_64__) || (defined __EMSCRIPTEN__ && defined __SSE2__)) #define NVMATH_SSE2 1 #else #define NVMATH_SSE2 0 #endif -#define NVMATH_NEON (defined _M_ARM || defined __ARM_NEON__) +#if((defined _M_ARM) || (defined __ARM_NEON__) || (defined __ARM_NEON_FP)) +#define NVMATH_NEON 1 +#else +#define NVMATH_NEON 0 +#endif +#else +#define NVMATH_SSE2 0 +#define NVMATH_NEON 0 +#endif // which simd types are implemented (one or both are all valid options) #define NVMATH_SIMD (NVMATH_SSE2 || NVMATH_NEON) @@ -51,7 +60,11 @@ // Simd4f and Simd4i map to different types #define NVMATH_DISTINCT_TYPES (NVMATH_SSE2 || NVMATH_NEON) // support inline assembler -#define NVMATH_INLINE_ASSEMBLER !((defined _M_ARM) || (defined SN_TARGET_PSP2) || (defined __arm64__)) +#if !((defined _M_ARM) || (defined SN_TARGET_PSP2) || (defined __arm64__) || (defined __aarch64__)) +#define NVMATH_INLINE_ASSEMBLER 1 +#else +#define NVMATH_INLINE_ASSEMBLER 0 +#endif // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // expression template diff --git a/APEX_1.4/module/clothing/embedded/LowLevelCloth/src/sse2/SwCollisionHelpers.h b/APEX_1.4/module/clothing/embedded/LowLevelCloth/src/sse2/SwCollisionHelpers.h index a4e332f7..aec68737 100644 --- a/APEX_1.4/module/clothing/embedded/LowLevelCloth/src/sse2/SwCollisionHelpers.h +++ b/APEX_1.4/module/clothing/embedded/LowLevelCloth/src/sse2/SwCollisionHelpers.h @@ -14,6 +14,9 @@ #pragma once #ifdef PX_GCC_FAMILY +#ifdef PX_EMSCRIPTEN +#include <emmintrin.h> +#endif #include <xmmintrin.h> // _BitScanForward #else #pragma warning(push) diff --git a/APEX_1.4/module/clothing/embedded/Simulation.cpp b/APEX_1.4/module/clothing/embedded/Simulation.cpp index 2bb17402..1ed2e94d 100644 --- a/APEX_1.4/module/clothing/embedded/Simulation.cpp +++ b/APEX_1.4/module/clothing/embedded/Simulation.cpp @@ -1677,6 +1677,7 @@ void Simulation::getVelocities(PxVec3* velocities) const PX_PROFILE_ZONE("SimulationPxCloth::getVelocities", GetInternalApexSDK()->getContextId()); PX_ALIGN(16, PxMat44 oldFrameDiff) = PxMat44(PxIdentity); + bool useOldFrame = false; if (mGlobalPose != mGlobalPosePrevious && mLocalSpaceSim && mLastTimestep > 0.0f) { @@ -1687,6 +1688,7 @@ void Simulation::getVelocities(PxVec3* velocities) const const float w = mCloth->getPreviousIterationDt() / mLastTimestep; oldFrameDiff = interpolateMatrix(w, oldFrameDiff, mGlobalPoseNormalized); oldFrameDiff = mGlobalPoseNormalized.inverseRT() * oldFrameDiff; + oldFrameDiff.column3[3] = 0.f; //V3StoreU internally check that vec3 has zero at index 3 useOldFrame = true; } |