From fabb251458f4a2d6d4f87dd36038fac2774b378c Mon Sep 17 00:00:00 2001 From: Marijn Tamis Date: Fri, 20 Oct 2017 14:30:56 +0200 Subject: NvCloth 1.1.3 Release. (23014067) --- NvCloth/src/SwSolverKernel.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'NvCloth/src/SwSolverKernel.cpp') diff --git a/NvCloth/src/SwSolverKernel.cpp b/NvCloth/src/SwSolverKernel.cpp index eec7956..2181b1e 100644 --- a/NvCloth/src/SwSolverKernel.cpp +++ b/NvCloth/src/SwSolverKernel.cpp @@ -103,6 +103,7 @@ const uint32_t sAvxSupport = getAvxSupport(); // 0: no AVX, 1: AVX, 2: AVX+FMA #endif using namespace nv; +using namespace cloth; namespace { @@ -209,11 +210,14 @@ void constrainMotion(T4f* __restrict curIt, const T4f* __restrict curEnd, const T4f isPositive; if (anyGreater(slack, gSimd4fZero, isPositive)) { - // set invMass to zero if radius is zero + // set invMass to zero if radius is zero (xyz will be unchanged) + // curPos.w = radius > 0 ? curPos.w : 0 + // the first three components are compared against -FLT_MAX which is always true curPos0 = curPos0 & (splat<0>(radius) > sMinusFloatMaxXYZ); curPos1 = curPos1 & (splat<1>(radius) > sMinusFloatMaxXYZ); curPos2 = curPos2 & (splat<2>(radius) > sMinusFloatMaxXYZ); curPos3 = curPos3 & ((radius) > sMinusFloatMaxXYZ); + // we don't have to splat the last one as the 4th element is already in the right place slack = slack * stiffness & isPositive; @@ -367,7 +371,7 @@ void solveConstraints(float* __restrict posIt, const float* __restrict rIt, cons } } -#if PX_WINDOWS_FAMILY +#if PX_WINDOWS_FAMILY && NV_SIMD_SSE2 #include "sse2/SwSolveConstraints.h" #endif -- cgit v1.2.3