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/CmakeGenerateAndroid.bat | 120 ++++++++
NvCloth/CmakeGenerateProjects.bat | 87 +++---
NvCloth/GenerateProjectsLinux.sh | 40 ++-
NvCloth/GenerateProjectsOsx.sh | 21 +-
NvCloth/ReleaseNotes.txt | 88 ++++--
NvCloth/clean.bat | 9 +
NvCloth/compiler/cmake/Linux/NvCloth.cmake | 86 +++++-
NvCloth/compiler/cmake/android/CMakeLists.txt | 62 ++++
NvCloth/compiler/cmake/android/NvCloth.cmake | 39 +++
NvCloth/compiler/cmake/windows/NvCloth.cmake | 2 +
NvCloth/docs/documentation/Compiling/index.html | 319 +++++++++++++++++++++
NvCloth/docs/documentation/CopyRight/Index.html | 27 +-
NvCloth/docs/documentation/Modules/Index.html | 33 ++-
NvCloth/docs/documentation/NvCloth.html | 140 ---------
NvCloth/docs/documentation/ReleaseNotes/index.html | 156 +++++-----
NvCloth/docs/documentation/UserGuide/Index.html | 27 +-
NvCloth/docs/documentation/genindex.html | 27 +-
NvCloth/docs/documentation/index.html | 28 +-
NvCloth/docs/documentation/search.html | 27 +-
NvCloth/docs/documentation/searchindex.js | 2 +-
NvCloth/docs/doxy/files/_solver_8h-source.html | 105 +++----
NvCloth/docs/doxy/files/_solver_8h.html | 1 +
.../doxy/files/classnv_1_1cloth_1_1_cloth.html | 2 +-
.../files/classnv_1_1cloth_1_1_solver-members.html | 1 +
.../doxy/files/classnv_1_1cloth_1_1_solver.html | 25 ++
NvCloth/docs/doxy/files/functions.html | 2 +
NvCloth/docs/doxy/files/functions_func.html | 2 +
NvCloth/include/NvCloth/Cloth.h | 2 +-
NvCloth/include/NvCloth/Solver.h | 4 +
NvCloth/samples/SampleBase/scene/Scene.cpp | 18 ++
NvCloth/samples/SampleBase/scene/Scene.h | 4 +-
.../samples/SampleBase/scene/scenes/CCDScene.cpp | 2 +-
.../SampleBase/scene/scenes/CapsuleScene.cpp | 2 +-
.../scene/scenes/ConvexCollisionScene.cpp | 2 +-
.../scene/scenes/DistanceConstraintScene.cpp | 2 +-
.../SampleBase/scene/scenes/FrictionScene.cpp | 2 +-
.../SampleBase/scene/scenes/GeodesicScene.cpp | 2 +-
.../scene/scenes/InterCollisionScene.cpp | 2 +-
.../SampleBase/scene/scenes/LocalGlobalScene.cpp | 2 +-
.../SampleBase/scene/scenes/MultiSolverScene.cpp | 2 +-
.../scene/scenes/PlaneCollisionScene.cpp | 2 +-
.../SampleBase/scene/scenes/ScaledScene.cpp | 2 +-
.../SampleBase/scene/scenes/SelfCollisionScene.cpp | 2 +-
.../SampleBase/scene/scenes/SimpleScene.cpp | 3 +-
.../SampleBase/scene/scenes/SphereScene.cpp | 2 +-
.../scene/scenes/StiffnessPerConstraintScene.cpp | 2 +-
.../SampleBase/scene/scenes/TetherScene.cpp | 2 +-
.../SampleBase/scene/scenes/TriangleScene.cpp | 2 +-
.../samples/SampleBase/scene/scenes/WindScene.cpp | 2 +-
.../samples/SampleBase/ui/CommonUIController.cpp | 2 +
.../SampleBase/utils/ClothMeshGenerator.cpp | 1 +
.../samples/SampleBase/utils/ClothMeshGenerator.h | 4 +-
NvCloth/samples/SampleBase/utils/JobManager.cpp | 5 +-
NvCloth/samples/SampleBase/utils/MeshGenerator.cpp | 81 ++++--
NvCloth/scripts/packman/config.packman.xml | 9 +
NvCloth/scripts/packman/packages/cmake.packman.xml | 7 +
NvCloth/scripts/packman/packman.cmd | 41 +++
NvCloth/scripts/packman/packman.sh | 97 +++++++
NvCloth/scripts/packman/packman_config.txt | 5 +
NvCloth/scripts/packman/test_packman.cmd | 6 +
NvCloth/scripts/packman/test_packman.sh | 8 +
NvCloth/scripts/packman/test_postscript.bat | 2 +
.../scripts/packman/win-bootstrap/configure.bat | 112 ++++++++
.../packman/win-bootstrap/fetch_file_from_s3.cmd | 22 ++
.../packman/win-bootstrap/fetch_file_from_s3.ps1 | 60 ++++
.../packman/win-bootstrap/fetch_file_from_url.ps1 | 37 +++
.../win-bootstrap/generate_temp_file_name.ps1 | 2 +
.../packman/win-bootstrap/install_package.py | 39 +++
NvCloth/src/BoundingBox.h | 40 +--
NvCloth/src/ClothClone.h | 10 +-
NvCloth/src/ClothImpl.h | 2 +-
NvCloth/src/IterationState.h | 122 ++++----
NvCloth/src/NvSimd/NvSimdTypes.h | 6 +-
NvCloth/src/PointInterpolator.h | 32 +--
NvCloth/src/SwCollision.cpp | 85 ++++--
NvCloth/src/SwInterCollision.cpp | 1 +
NvCloth/src/SwSelfCollision.cpp | 78 +++--
NvCloth/src/SwSolver.cpp | 34 ++-
NvCloth/src/SwSolver.h | 5 +
NvCloth/src/SwSolverKernel.cpp | 8 +-
NvCloth/src/cuda/CuCloth.cpp | 2 +-
NvCloth/src/cuda/CuClothData.h | 2 +-
NvCloth/src/cuda/CuFabric.cpp | 1 +
NvCloth/src/cuda/CuPinnedAllocator.h | 18 +-
NvCloth/src/cuda/CuSolver.cpp | 52 ++--
NvCloth/src/cuda/CuSolver.h | 5 +
NvCloth/src/dx/DxBatchedVector.h | 2 +-
NvCloth/src/dx/DxClothData.h | 2 +-
NvCloth/src/dx/DxFactory.cpp | 42 +--
NvCloth/src/dx/DxSolver.cpp | 68 +++--
NvCloth/src/dx/DxSolver.h | 5 +
NvCloth/src/neon/NeonSolverKernel.cpp | 12 +-
NvCloth/src/scalar/SwCollisionHelpers.h | 3 +
NvCloth/src/sse2/SwCollisionHelpers.h | 3 +
94 files changed, 2043 insertions(+), 680 deletions(-)
create mode 100644 NvCloth/CmakeGenerateAndroid.bat
create mode 100644 NvCloth/compiler/cmake/android/CMakeLists.txt
create mode 100644 NvCloth/compiler/cmake/android/NvCloth.cmake
create mode 100644 NvCloth/docs/documentation/Compiling/index.html
delete mode 100644 NvCloth/docs/documentation/NvCloth.html
create mode 100644 NvCloth/scripts/packman/config.packman.xml
create mode 100644 NvCloth/scripts/packman/packages/cmake.packman.xml
create mode 100644 NvCloth/scripts/packman/packman.cmd
create mode 100644 NvCloth/scripts/packman/packman.sh
create mode 100644 NvCloth/scripts/packman/packman_config.txt
create mode 100644 NvCloth/scripts/packman/test_packman.cmd
create mode 100644 NvCloth/scripts/packman/test_packman.sh
create mode 100644 NvCloth/scripts/packman/test_postscript.bat
create mode 100644 NvCloth/scripts/packman/win-bootstrap/configure.bat
create mode 100644 NvCloth/scripts/packman/win-bootstrap/fetch_file_from_s3.cmd
create mode 100644 NvCloth/scripts/packman/win-bootstrap/fetch_file_from_s3.ps1
create mode 100644 NvCloth/scripts/packman/win-bootstrap/fetch_file_from_url.ps1
create mode 100644 NvCloth/scripts/packman/win-bootstrap/generate_temp_file_name.ps1
create mode 100644 NvCloth/scripts/packman/win-bootstrap/install_package.py
(limited to 'NvCloth')
diff --git a/NvCloth/CmakeGenerateAndroid.bat b/NvCloth/CmakeGenerateAndroid.bat
new file mode 100644
index 0000000..00a0307
--- /dev/null
+++ b/NvCloth/CmakeGenerateAndroid.bat
@@ -0,0 +1,120 @@
+@echo off
+set EXIT_CODE=0
+
+REM Make sure the various variables that we need are set
+
+CD /D %~dp0
+REM echo "Note: You need to run this with admin rights for the first time to set GW_DEPS_ROOT globally."
+call "./scripts/locate_gw_root.bat" GW_DEPS_ROOT_F
+@echo on
+set GW_DEPS_ROOT=%GW_DEPS_ROOT_F%
+echo GW_DEPS_ROOT = %GW_DEPS_ROOT%
+call "./scripts/locate_cmake.bat" CMAKE_PATH_F
+echo CMAKE_PATH_F = %CMAKE_PATH_F%
+
+SET PATH=%PATH%;%CMAKE_PATH_F%
+
+@echo off
+
+IF EXIST %~dp0..\Externals\CMakeModules (
+ set GW_DEPS_ROOT=%~dp0..\
+)
+
+IF NOT DEFINED GW_DEPS_ROOT GOTO GW_DEPS_ROOT_UNDEFINED
+
+set PX_OUTPUT_ROOT=%~dp0
+
+REM Generate projects here
+
+:: 1. Use system NDK
+IF %ANDROID_NDK_ROOT%. EQU . (
+ echo The ANDROID_NDK_ROOT environment variable is not set. Please set it to point to NDK root folder
+ set EXIT_CODE=1
+ GOTO :End
+)
+set "NDK=%ANDROID_NDK_ROOT:\=/%"
+set "NDK_MAKE=%NDK%/prebuilt/windows-x86_64/bin/make.exe"
+:: 2. Use NDK from physx externals
+REM set "PHYSX_ROOT=%GW_DEPS_ROOT:\=/%sw/physx"
+REM set "NDK=%PHYSX_ROOT%/externals/android-ndk/r13b-win32"
+REM set "NDK_MAKE=%NDK%/prebuilt/windows/bin/make.exe"
+::
+
+:: IF [%1] == []
+set CONFIG_NAME=%1
+IF %CONFIG_NAME%. EQU debug. (
+ GOTO :Build
+)
+IF %CONFIG_NAME%. EQU profile. (
+ GOTO :Build
+)
+IF %CONFIG_NAME%. EQU checked. (
+ GOTO :Build
+)
+IF %CONFIG_NAME%. EQU release. (
+ GOTO :Build
+)
+echo "Usage CmakeGenerateAndroid.bat "
+set EXIT_CODE=1
+GOTO :End
+
+:Build
+set ANDROID_API=21
+REM set ANDROID_ABI="armeabi-v7a with NEON"
+REM set ANDROID_ABI="armeabi-v7a"
+set ANDROID_ABI="arm64-v8a"
+set ANDROID_DIR_NAME=android-%ANDROID_ABI%-%CONFIG_NAME%-cmake
+
+rmdir /s /q compiler\%ANDROID_DIR_NAME%\
+mkdir compiler\%ANDROID_DIR_NAME%\
+pushd compiler\%ANDROID_DIR_NAME%\
+
+REM https://cmake.org/cmake/help/v3.7/manual/cmake-toolchains.7.html#cross-compiling-for-android-with-nvidia-nsight-tegra-visual-studio-edition
+REM https://developer.android.com/ndk/guides/cmake.html
+
+REM REM Common cmd line params
+set CMAKE_COMMON_PARAMS=-DANDROID_NDK=%NDK% -DANDROID_ABI=%ANDROID_ABI% -DGW_DEPS_ROOT=%GW_DEPS_ROOT% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\%ANDROID_DIR_NAME% -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\%ANDROID_DIR_NAME% -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\%ANDROID_DIR_NAME%
+
+REM Compiler dependent cmd line params
+set CMAKE_COMPILER_PARAMS=-G "MinGW Makefiles" -DCMAKE_MAKE_PROGRAM=%NDK_MAKE% -DCMAKE_BUILD_TYPE=%CONFIG_NAME% -DCMAKE_ANDROID_ARCH_ABI=%ANDROID_ABI%
+REM set CMAKE_COMPILER_PARAMS=-G "Visual Studio 14 2015" -DCMAKE_ANDROID_ARCH=%ANDROID_ABI%
+
+REM Toolchain dependent cmd line params
+REM set CMAKE_TOOLCHAIN_PARAMS=-DCMAKE_TOOLCHAIN_FILE=C:\Users\lpanov\projects\nvidia\NvCloth\Externals\CMakeModules\Android\android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=android-%ANDROID_API% -DANDROID_ABI=%ANDROID_ABI% -DANDROID_STL="gnustl_static" -DTARGET_BUILD_PLATFORM=android
+set CMAKE_TOOLCHAIN_PARAMS=-DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_API_MIN=%ANDROID_API% -DCMAKE_ANDROID_API=%ANDROID_API%
+
+cmake ..\cmake\android %CMAKE_COMPILER_PARAMS% %CMAKE_TOOLCHAIN_PARAMS% %CMAKE_COMMON_PARAMS%
+IF %ERRORLEVEL% NEQ 0 (
+ set EXIT_CODE=%ERRORLEVEL%
+ GOTO :End
+)
+
+REM reference cmd line
+REM cmake ..\cmake\android -G "MinGW Makefiles" -DANDROID_NDK=%NDK% -DCMAKE_MAKE_PROGRAM=%NDK_MAKE% -DTARGET_BUILD_PLATFORM=android -DCMAKE_BUILD_TYPE=%CONFIG_NAME% -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_API_MIN=%ANDROID_API% -DCMAKE_ANDROID_API=%ANDROID_API% -DCMAKE_ANDROID_ARCH=%ANDROID_ABI% -DCMAKE_ANDROID_ARCH_ABI=%ANDROID_ABI% -DANDROID_ABI=%ANDROID_ABI% -DCMAKE_ANDROID_GUI=FALSE -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\%ANDROID_DIR_NAME%-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\%ANDROID_DIR_NAME%-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\%ANDROID_DIR_NAME%-cmake
+
+REM To build the project, go to compiler/%ANDROID_DIR_NAME% and run
+REM %ANDROID_NDK_ROOT%\prebuilt\windows-x86_64\bin\make.exe
+
+popd
+
+
+GOTO :End
+
+:GW_DEPS_ROOT_UNDEFINED
+ECHO GW_DEPS_ROOT has to be defined, pointing to the root of the dependency tree.
+PAUSE
+GOTO END
+
+:BOOST_ROOT_UNDEFINED
+ECHO BOOST_ROOT has to be defined, pointing to the root of your local Boost install.
+PAUSE
+GOTO END
+
+:End
+IF /I "%EXIT_CODE%" NEQ "0" (
+ echo The error code is %EXIT_CODE%
+ exit /b %EXIT_CODE%
+)
+
+echo Configuration succeeded!
+exit /b 0
\ No newline at end of file
diff --git a/NvCloth/CmakeGenerateProjects.bat b/NvCloth/CmakeGenerateProjects.bat
index 36bddde..469e0f3 100644
--- a/NvCloth/CmakeGenerateProjects.bat
+++ b/NvCloth/CmakeGenerateProjects.bat
@@ -1,16 +1,16 @@
@echo off
+REM Usage: CmakeGenerateProjects.bat <0|1:use_cuda (default is 1)> <0|1:use_dx11 (default is 1)>
+set EXIT_CODE=0
+REM Make sure the various variables that we need are set
CD /D %~dp0
echo "Note: You need to run this with admin rights for the first time to set GW_DEPS_ROOT globally."
call "./scripts/locate_gw_root.bat" GW_DEPS_ROOT_F
-@echo on
+REM single " is not a mistake
setx GW_DEPS_ROOT "%GW_DEPS_ROOT_F%
+REM this one is for local use
+set GW_DEPS_ROOT=%GW_DEPS_ROOT_F%
echo GW_DEPS_ROOT = %GW_DEPS_ROOT%
-call "./scripts/locate_cmake.bat" CMAKE_PATH_F
-echo CMAKE_PATH_F = %CMAKE_PATH_F%
-
-
-SET PATH=%PATH%;"%CMAKE_PATH_F%"
REM Make sure the various variables that we need are set
@@ -21,65 +21,84 @@ IF EXIST %~dp0..\Externals\CMakeModules (
set GW_DEPS_ROOT=%~dp0..\
)
-IF NOT DEFINED GW_DEPS_ROOT GOTO GW_DEPS_ROOT_UNDEFINED
+IF NOT DEFINED GW_DEPS_ROOT goto GW_DEPS_ROOT_UNDEFINED
set PX_OUTPUT_ROOT=%~dp0
-REM Generate projects here
-REM you can disable cuda/dx11 support by adding -DNV_CLOTH_ENABLE_CUDA=0 / -DNV_CLOTH_ENABLE_DX11=0
+REM handle optional command line arguments
+set USE_CUDA=1
+set USE_DX11=1
+IF %1. NEQ . (set USE_CUDA=%1)
+IF %2. NEQ . (set USE_DX11=%2)
+
+REM Install cmake using packman
+set PACKMAN=call scripts/packman/packman.cmd
+%PACKMAN% pull -p windows "scripts/packman/packages/cmake.packman.xml"
+IF %ERRORLEVEL% NEQ 0 (
+ set EXIT_CODE=%ERRORLEVEL%
+ goto End
+)
+set CMAKE=%PM_PACKAGES_ROOT%/cmake-x64/3.7.0/bin/cmake.exe
-rmdir /s /q compiler\vc11win32-cmake\
-mkdir compiler\vc11win32-cmake\
-pushd compiler\vc11win32-cmake\
-cmake ..\cmake\windows -G "Visual Studio 11 2012" -AWin32 -DTARGET_BUILD_PLATFORM=windows -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DSTATIC_WINCRT=1 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\vc11win32-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\vc11win32-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\vc11win32-cmake
-popd
+REM Common for all generators
+set CMAKE_COMMON_PARAMS=-DTARGET_BUILD_PLATFORM=windows -DNV_CLOTH_ENABLE_DX11=%USE_DX11% -DNV_CLOTH_ENABLE_CUDA=%USE_CUDA% -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DWIN8SDK_PATH="%WIN8SDK_PATH%" -DSTATIC_WINCRT=1
-rmdir /s /q compiler\vc11win64-cmake\
-mkdir compiler\vc11win64-cmake\
-pushd compiler\vc11win64-cmake\
-cmake ..\cmake\windows -G "Visual Studio 11 2012" -Ax64 -DTARGET_BUILD_PLATFORM=windows -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DSTATIC_WINCRT=1 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\vc11win64-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\vc11win64-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\vc11win64-cmake
-popd
+REM Generate projects here
+
+REM vc11 isn't officially supported
+REM rmdir /s /q compiler\vc11win32-cmake\
+REM mkdir compiler\vc11win32-cmake\
+REM pushd compiler\vc11win32-cmake\
+REM %CMAKE% ..\cmake\windows -G "Visual Studio 11 2012" -AWin32 %CMAKE_COMMON_PARAMS% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\bin\vc11win32-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\lib\vc11win32-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\bin\vc11win32-cmake
+REM popd
+REM rmdir /s /q compiler\vc11win64-cmake\
+REM mkdir compiler\vc11win64-cmake\
+REM pushd compiler\vc11win64-cmake\
+REM %CMAKE% ..\cmake\windows -G "Visual Studio 11 2012" -Ax64 %CMAKE_COMMON_PARAMS% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\bin\vc11win64-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\lib\vc11win64-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\bin\vc11win64-cmake
+REM popd
rmdir /s /q compiler\vc12win32-cmake\
mkdir compiler\vc12win32-cmake\
pushd compiler\vc12win32-cmake\
-cmake ..\cmake\windows -G "Visual Studio 12 2013" -AWin32 -DTARGET_BUILD_PLATFORM=windows -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DSTATIC_WINCRT=1 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\vc12win32-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\vc12win32-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\vc12win32-cmake
+%CMAKE% ..\cmake\windows -G "Visual Studio 12 2013" -AWin32 %CMAKE_COMMON_PARAMS% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\bin\vc12win32-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\lib\vc12win32-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\bin\vc12win32-cmake
popd
rmdir /s /q compiler\vc12win64-cmake\
mkdir compiler\vc12win64-cmake\
pushd compiler\vc12win64-cmake\
-cmake ..\cmake\windows -G "Visual Studio 12 2013" -Ax64 -DTARGET_BUILD_PLATFORM=windows -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DSTATIC_WINCRT=1 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\vc12win64-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\vc12win64-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\vc12win64-cmake
+%CMAKE% ..\cmake\windows -G "Visual Studio 12 2013" -Ax64 %CMAKE_COMMON_PARAMS% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\bin\vc12win64-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\lib\vc12win64-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\bin\vc12win64-cmake
popd
rmdir /s /q compiler\vc14win32-cmake\
mkdir compiler\vc14win32-cmake\
pushd compiler\vc14win32-cmake\
-cmake ..\cmake\windows -G "Visual Studio 14 2015" -AWin32 -DTARGET_BUILD_PLATFORM=windows -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DSTATIC_WINCRT=1 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\vc14win32-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\vc14win32-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\vc14win32-cmake
+%CMAKE% ..\cmake\windows -G "Visual Studio 14 2015" -AWin32 %CMAKE_COMMON_PARAMS% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\bin\vc14win32-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\lib\vc14win32-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\bin\vc14win32-cmake
popd
rmdir /s /q compiler\vc14win64-cmake\
mkdir compiler\vc14win64-cmake\
pushd compiler\vc14win64-cmake\
-cmake ..\cmake\windows -G "Visual Studio 14 2015" -Ax64 -DTARGET_BUILD_PLATFORM=windows -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DSTATIC_WINCRT=1 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\vc14win64-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\vc14win64-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\vc14win64-cmake
+%CMAKE% ..\cmake\windows -G "Visual Studio 14 2015" -Ax64 %CMAKE_COMMON_PARAMS% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\bin\vc14win64-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\lib\vc14win64-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\bin\vc14win64-cmake
popd
+goto End
-GOTO :End
:GW_DEPS_ROOT_UNDEFINED
-ECHO GW_DEPS_ROOT has to be defined, pointing to the root of the dependency tree.
-PAUSE
-GOTO END
-
-:BOOST_ROOT_UNDEFINED
-ECHO BOOST_ROOT has to be defined, pointing to the root of your local Boost install.
-PAUSE
-GOTO END
+echo GW_DEPS_ROOT has to be defined, pointing to the root of the dependency tree.
+set EXIT_CODE=1
+pause
+goto End
:CUDA_ROOT_UNDEFINED
-ECHO CUDA_BIN_PATH has to be defined, pointing to the bin folder of your local CUDA install.
-PAUSE
+echo CUDA_BIN_PATH has to be defined, pointing to the bin folder of your local CUDA install.
+set EXIT_CODE=1
+pause
+goto End
:End
+if /I "%EXIT_CODE%" EQU "1" (
+ echo CmakeGenerateProjects.bat: the error code is %EXIT_CODE%
+)
+exit /b 0
diff --git a/NvCloth/GenerateProjectsLinux.sh b/NvCloth/GenerateProjectsLinux.sh
index b56176b..c660b15 100644
--- a/NvCloth/GenerateProjectsLinux.sh
+++ b/NvCloth/GenerateProjectsLinux.sh
@@ -1,4 +1,4 @@
-#!/bin/sh +x
+#!/usr/bin/env bash
# Make sure the various variables that we need are set
@@ -14,28 +14,56 @@ fi
export PX_OUTPUT_ROOT="$PWD"
+# Check for the right g++ version (we need at least 4.7 for c++11)
+cur_ver="$(g++ -dumpversion)"
+req_ver="4.7"
+if [ "$(printf "$req_ver\n$cur_ver" | sort -V | head -n1)" == "$cur_ver" ] && [ "$cur_ver" != "$req_ver" ]; then
+ echo "g++ version $cur_ver < $req_ver"
+ if [ -f /usr/bin/g++-4.7 ]; then
+ echo "Forcing cmake to use g++ 4.7"
+ export CC=/usr/bin/gcc-4.7
+ export CXX=/usr/bin/g++-4.7
+ else
+ echo "Unable to find any compatible g++ version. Exiting now"
+ exit 1
+ fi
+ else
+ echo "g++ version $cur_ver >= $req_ver"
+ fi
+
+
+# Install cmake using packman
+export PACKMAN="scripts/packman/packman.sh"
+source $PACKMAN pull -p linux "scripts/packman/packages/cmake.packman.xml" || exit 1
+export CMAKE="$PM_PACKAGES_ROOT/cmake-linux-x86_64/3.7.2/bin/cmake"
+
+
+# You can enable/disable cuda support here
+export USE_CUDA=0
+
+
# Generate projects here
rm -r -f compiler/linux64-debug-cmake/
mkdir compiler/linux64-debug-cmake/
cd compiler/linux64-debug-cmake/
-cmake ../cmake/linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=debug -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake
+$CMAKE ../cmake/linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=debug -DNV_CLOTH_ENABLE_CUDA=$USE_CUDA -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake || exit 1
cd ../../
rm -r -f compiler/linux64-checked-cmake/
mkdir compiler/linux64-checked-cmake/
cd compiler/linux64-checked-cmake/
-cmake ../cmake/linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=checked -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake
+$CMAKE ../cmake/linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=checked -DNV_CLOTH_ENABLE_CUDA=$USE_CUDA -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake || exit 1
cd ../../
rm -r -f compiler/linux64-profile-cmake/
mkdir compiler/linux64-profile-cmake/
cd compiler/linux64-profile-cmake/
-cmake ../cmake/linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=profile -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake
+$CMAKE ../cmake/linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=profile -DNV_CLOTH_ENABLE_CUDA=$USE_CUDA -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake || exit 1
cd ../../
rm -r -f compiler/linux64-release-cmake/
mkdir compiler/linux64-release-cmake/
cd compiler/linux64-release-cmake/
-cmake ../cmake/linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=release -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake
-cd ../../
\ No newline at end of file
+$CMAKE ../cmake/linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=release -DNV_CLOTH_ENABLE_CUDA=$USE_CUDA -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake || exit 1
+cd ../../
diff --git a/NvCloth/GenerateProjectsOsx.sh b/NvCloth/GenerateProjectsOsx.sh
index 576ad2c..ea53921 100644
--- a/NvCloth/GenerateProjectsOsx.sh
+++ b/NvCloth/GenerateProjectsOsx.sh
@@ -2,10 +2,10 @@
# Make sure the various variables that we need are set
-export GW_DEPS_ROOT="$PWD""/../../../../../"
+export GW_DEPS_ROOT="$PWD""/../../../../"
if [ -e $PWD"/../Externals/CMakeModules" ]; then
- export GW_DEPS_ROOT="$PWD""/../"
+ export GW_DEPS_ROOT="$PWD""/../../"
fi
[ -z "$GW_DEPS_ROOT" ] && echo "GW_DEPS_ROOT not defined." && exit 1;
@@ -14,19 +14,28 @@ fi
export PX_OUTPUT_ROOT="$PWD"
+
+# Install cmake using packman
+export PACKMAN="./scripts/packman/packman.sh"
+source $PACKMAN pull -p mac "./scripts/packman/packages/cmake.packman.xml" || exit 1
+export CMAKE="$PM_PACKAGES_ROOT/cmake-mac-x86_64/3.7.2/bin/cmake"
+
+
+# Cuda isn't supported on mac yet
+export USE_CUDA=0
+
+
# Generate projects here
rm -r -f compiler/osx32-cmake/
mkdir compiler/osx32-cmake/
cd compiler/osx32-cmake/
-cmake ../cmake/mac -G Xcode -DTARGET_BUILD_PLATFORM=mac -DPX_32BIT=1 -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/Lib/osx32-cmake
+$CMAKE ../cmake/mac -G Xcode -DTARGET_BUILD_PLATFORM=mac -DCMAKE_OSX_ARCHITECTURES=i386 -DPX_32BIT=1 -DNV_CLOTH_ENABLE_CUDA=$USE_CUDA -DUSE_CUDA=$USE_CUDA -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/osx32-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/osx32-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/osx32-cmake || exit 1
cd ../../
rm -r -f compiler/osx64-cmake/
mkdir compiler/osx64-cmake/
cd compiler/osx64-cmake/
-cmake ../cmake/mac -G Xcode -DTARGET_BUILD_PLATFORM=mac -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/Lib/osx64-cmake
+$CMAKE ../cmake/mac -G Xcode -DTARGET_BUILD_PLATFORM=mac -DNV_CLOTH_ENABLE_CUDA=$USE_CUDA -DUSE_CUDA=$USE_CUDA -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/osx64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/osx64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/osx64-cmake || exit 1
cd ../../
-
-
diff --git a/NvCloth/ReleaseNotes.txt b/NvCloth/ReleaseNotes.txt
index d8ef679..3a398d6 100644
--- a/NvCloth/ReleaseNotes.txt
+++ b/NvCloth/ReleaseNotes.txt
@@ -1,57 +1,101 @@
NvCloth Release notes.
-[1.1.2]
+***************************
+Release Notes
+***************************
+
+1.1.3
+===========================================================================================
Supported platforms:
+
* Windows (CPU, CUDA, DX11)
* Mac (beta, tested on Sierra)
* Linux (beta, tested on Ubuntu 16.04.1 LTS x64)
* PlayStation 4 (beta) with PS4 SDK 4.5
* Xbox one (CPU, DX11, beta)
+* Android (arm64-v8a, API >= 21), tested on Shield TV
+
Note: beta platforms are not yet optimized.
Supported compilers (via cmake 3.7)
+
* Windows: Visual Studio 12, 14 (2013, 2015)
-* Linux: gcc (only x64)
+* Linux: gcc 5.4 (only x64)
* Mac: xcode
* PlayStation 4: Visual studio 14 (2015)
* Xbox one: Visual studio 14 (2015)
+* Android: NDK r12b and above
+
Fixed:
-Dynamic allocations at runtime removed from MovingAverage.
-Possible error when starting samples due to gpu incompatible with dx debug mode.
-Cuda crash on older hardware.
+
+- Incorrect assertion in ClothImpl::setFluidDensity.
+- Make the simulation with MultithreadedSolverHelper work when no cloth present in the solver.
+- Correct number of simulation chunks calculation for DX11/CUDA solvers when no cloths were added to the solver.
+- Cuda wind simulation crashed on older hardware.
+- Internal simd library now lives inside the nv::cloth namespace to avoid issues when statically linked with PhysX.
+
New:
-Added cmake flags to disable dx11 and/or cuda support.
+
+- Introduce addCloths() method for all the solvers, which allows to perform a fast batch addition of multiple cloths.
+- Cuda support on linux (experimental)
+- Android support
+
Known issues:
-DirectX 11 solver has issues with ccd sphere/capsule collision.
+- DirectX 11 solver has issues with ccd sphere/capsule collision.
-[1.1.1]
+1.1.2
+===========================================================================================
Fixed:
-Air drag/lift did react to flow speed only linearly, model was changed to be more physically correct.
-Fixed issue where scaling units would result in different air drag/lift behavior (by adding fluid density parameter).
-Fixed "unused typedef `__t100`" warning in xcode.
+
+- Dynamic allocations at runtime removed from MovingAverage.
+- Possible error when starting samples due to gpu incompatible with dx debug mode.
+
+
+New:
+
+- Added cmake flags to disable dx11 and/or cuda support.
+
Known issues:
-DirectX 11 solver has issues with ccd sphere/capsule collision.
+- DirectX 11 solver has issues with ccd sphere/capsule collision.
+
-[1.1.0]
+1.1.1
+===========================================================================================
Fixed:
-DirectX 11 solver now supports triangle collision shapes and air drag/lift.
-Fixed bug where changing friction on cloth already in simulation would cause assert or crash.
-Optimization flag now working on PS4 release build.
-New:
-Solver::getNumCloths and Solver::getClothList interface.
-Improved samples (new scenes and debug visualization)
+- Air drag/lift did react to flow speed only linearly, model was changed to be more physically correct.
+- Fixed issue where scaling units would result in different air drag/lift behavior (by adding fluid density parameter).
+- Fixed "unused typedef `__t100`" warning in xcode.
Known issues:
-DirectX 11 solver has issues with ccd sphere/capsule collision.
+- DirectX 11 solver has issues with ccd sphere/capsule collision.
+
+
+1.1.0
+===========================================================================================
+Fixed:
+
+- DirectX 11 solver now supports triangle collision shapes and air drag/lift.
+- Fixed bug where changing friction on cloth already in simulation would cause assert or crash.
+- Optimization flag now working on PS4 release build.
+
+
+New:
+
+- Solver::getNumCloths and Solver::getClothList interface.
+- Improved samples (new scenes and debug visualization)
+
-[1.0.0]
Known issues:
-DirectX 11 solver doesn’t support triangle collision shapes and air drag/lift
+- DirectX 11 solver has issues with ccd sphere/capsule collision.
+1.0.0
+===========================================================================================
+Known issues:
+- DirectX 11 solver doesn't support triangle collision shapes and air drag/lift
diff --git a/NvCloth/clean.bat b/NvCloth/clean.bat
index 7afce3a..a66d0a9 100644
--- a/NvCloth/clean.bat
+++ b/NvCloth/clean.bat
@@ -34,4 +34,13 @@ for /d %%G in (".\samples\compiler\vc*") do (
rd %%G /s /q
)
+for /d %%G in (".\compiler\android-*") do (
+rd %%G /s /q
+)
+
+for /d %%G in (".\test\compiler\android-*") do (
+rd %%G /s /q
+)
+
+
pause
diff --git a/NvCloth/compiler/cmake/Linux/NvCloth.cmake b/NvCloth/compiler/cmake/Linux/NvCloth.cmake
index 19038c6..323efd5 100644
--- a/NvCloth/compiler/cmake/Linux/NvCloth.cmake
+++ b/NvCloth/compiler/cmake/Linux/NvCloth.cmake
@@ -7,11 +7,26 @@ MESSAGE("[NvCloth]cmake/linux/NvCloth.cmake")
SET(GW_DEPS_ROOT $ENV{GW_DEPS_ROOT})
FIND_PACKAGE(PxShared REQUIRED)
+IF(NOT DEFINED NV_CLOTH_ENABLE_CUDA)
+MESSAGE("NV_CLOTH_ENABLE_CUDA is not defined, setting to 0")
+SET(NV_CLOTH_ENABLE_CUDA 0)
+ENDIF()
+IF(NOT DEFINED NV_CLOTH_ENABLE_DX11)
+SET(NV_CLOTH_ENABLE_DX11 0)
+ENDIF()
+
+MESSAGE("NV_CLOTH_ENABLE_CUDA = " ${NV_CLOTH_ENABLE_CUDA})
+
+IF(${NV_CLOTH_ENABLE_CUDA})
+FIND_PACKAGE(CUDA 8 REQUIRED)
+MESSAGE("Found CUDA:" ${CUDA_INCLUDE_DIRS})
+ENDIF()
#FIND_PACKAGE(nvToolsExt REQUIRED)
SET(NVCLOTH_PLATFORM_INCLUDES
${NVTOOLSEXT_INCLUDE_DIRS}
+ PRIVATE ${CUDA_INCLUDE_DIRS}
)
SET(NVCLOTH_PLATFORM_SOURCE_FILES
@@ -20,12 +35,71 @@ SET(NVCLOTH_PLATFORM_SOURCE_FILES
#${PROJECT_ROOT_DIR}/src/neon/NeonSolverKernel.cpp
#${PROJECT_ROOT_DIR}/src/neon/SwCollisionHelpers.h
)
+IF(${NV_CLOTH_ENABLE_CUDA})
+LIST(APPEND NVCLOTH_PLATFORM_SOURCE_FILES
+ ${PROJECT_ROOT_DIR}/src/cuda/CuCheckSuccess.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuCloth.cpp
+ ${PROJECT_ROOT_DIR}/src/cuda/CuCloth.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuClothClone.cpp
+ ${PROJECT_ROOT_DIR}/src/cuda/CuClothData.cpp
+ ${PROJECT_ROOT_DIR}/src/cuda/CuClothData.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuCollision.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuContextLock.cpp
+ ${PROJECT_ROOT_DIR}/src/cuda/CuContextLock.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuDevicePointer.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuDeviceVector.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuFabric.cpp
+ ${PROJECT_ROOT_DIR}/src/cuda/CuFabric.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuFactory.cpp
+ ${PROJECT_ROOT_DIR}/src/cuda/CuFactory.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuPhaseConfig.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuPinnedAllocator.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuSelfCollision.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuSolver.cpp
+ ${PROJECT_ROOT_DIR}/src/cuda/CuSolver.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuSolverKernel.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuSolverKernelBlob.h
+)
+ENDIF()
+
+
+IF(${NV_CLOTH_ENABLE_CUDA})
+set(
+ CUDA_NVCC_FLAGS
+ ${CUDA_NVCC_FLAGS};
+
+ # Options are documented on http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#command-option-types-and-notation
+ # Important: to be able to debug CUDA kernel (correct stepping and workable warp watches),
+ # you should add the -G (short for --device-debug) option to the line below.
+ # Don't forget to remove it afterwards, since the code execution will be very slow with this flag.
+ -use_fast_math -ftz=true -prec-div=false -prec-sqrt=false -lineinfo -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 -D_USE_MATH_DEFINES -DNDEBUG -DPX_PROFILE=1
+)
+SET(NVCLOTH_CUDA_FILES
+ ${PROJECT_ROOT_DIR}/src/cuda/CuSolverKernel.cu
+)
+set(CUDA_BLOB "${PROJECT_ROOT_DIR}/src/cuda/CuSolverKernelBlob.h")
+cuda_include_directories(
+ ${PXSHARED_ROOT_DIR}/include
+ ${PXSHARED_ROOT_DIR}/src/foundation/include
+ ${PROJECT_ROOT_DIR}/include/NvCloth
+)
+cuda_compile_fatbin(CUDA_FATBIN ${NVCLOTH_CUDA_FILES})
+SET(NVCLOTH_PLATFORM_SOURCE_FILES ${NVCLOTH_PLATFORM_SOURCE_FILES} ${CUDA_BLOB} ${NVCLOTH_CUDA_FILES})
+add_custom_command(
+ OUTPUT ${CUDA_BLOB}
+COMMAND ${CUDA_TOOLKIT_ROOT_DIR}/bin/bin2c --name kCuSolverKernel ${CUDA_FATBIN} > ${CUDA_BLOB}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+DEPENDS ${CUDA_FATBIN}
+ VERBATIM
+)
+ENDIF()
+
+
# Use generator expressions to set config specific preprocessor definitions
SET(NVCLOTH_COMPILE_DEFS
NV_CLOTH_IMPORT=PX_DLL_EXPORT
NV_CLOTH_ENABLE_DX11=0
- NV_CLOTH_ENABLE_CUDA=0
# Common to all configurations
${PHYSX_LINUX_COMPILE_DEFS};PX_PHYSX_CORE_EXPORTS
@@ -35,6 +109,15 @@ SET(NVCLOTH_COMPILE_DEFS
$<$:${PHYSX_LINUX_PROFILE_COMPILE_DEFS};PX_PHYSX_DLL_NAME_POSTFIX=PROFILE;>
$<$:${PHYSX_LINUX_RELEASE_COMPILE_DEFS};>
)
+IF(${NV_CLOTH_ENABLE_CUDA})
+LIST(APPEND NVCLOTH_COMPILE_DEFS
+ NV_CLOTH_ENABLE_CUDA=1
+)
+ELSE()
+LIST(APPEND NVCLOTH_COMPILE_DEFS
+ NV_CLOTH_ENABLE_CUDA=0
+)
+ENDIF()
SET(NVCLOTH_LIBTYPE SHARED)
@@ -46,6 +129,7 @@ INCLUDE(../common/NvCloth.cmake)
# TARGET_LINK_LIBRARIES(NvCloth PUBLIC ${NVTOOLSEXT_LIBRARIES} LowLevel LowLevelAABB LowLevelCloth LowLevelDynamics LowLevelParticles PhysXCommon PhysXGpu PxFoundation PxPvdSDK PxTask SceneQuery SimulationController)
TARGET_LINK_LIBRARIES(NvCloth PUBLIC PxFoundation)
+TARGET_LINK_LIBRARIES(NvCloth PUBLIC ${CUDA_CUDA_LIBRARY})
SET_TARGET_PROPERTIES(NvCloth PROPERTIES
LINK_FLAGS_DEBUG ""
diff --git a/NvCloth/compiler/cmake/android/CMakeLists.txt b/NvCloth/compiler/cmake/android/CMakeLists.txt
new file mode 100644
index 0000000..61a6892
--- /dev/null
+++ b/NvCloth/compiler/cmake/android/CMakeLists.txt
@@ -0,0 +1,62 @@
+cmake_minimum_required(VERSION 3.3)
+MESSAGE("[NvCloth]cmake/android/CMakeList.txt")
+include(../common/CMakeLists.txt)
+
+STRING(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWERCASE)
+
+IF(NOT DEFINED TARGET_BUILD_PLATFORM) # Not defined, default to android
+ SET(TARGET_BUILD_PLATFORM "android")
+ENDIF()
+
+SET(PLATFORM_LIST android)
+
+IF (NOT ${TARGET_BUILD_PLATFORM} IN_LIST PLATFORM_LIST)
+ MESSAGE(FATAL_ERROR "Invalid platform:" ${TARGET_BUILD_PLATFORM})
+ENDIF()
+
+if(${ANDROID_ABI} STREQUAL "armeabi-v7a")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -funwind-tables -fomit-frame-pointer -funswitch-loops -finline-limit=300 -fno-strict-aliasing -fstack-protector -Wno-invalid-offsetof ")
+elseif(${ANDROID_ABI} STREQUAL "armeabi-v7a with NEON")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -ffast-math -fno-exceptions -ffunction-sections -funwind-tables -fomit-frame-pointer -funswitch-loops -finline-limit=300 -fno-strict-aliasing -fstack-protector -Wno-invalid-offsetof ")
+elseif(${ANDROID_ABI} STREQUAL "arm64-v8a")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Wno-invalid-offsetof ")
+elseif(${ANDROID_ABI} STREQUAL "x86")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Wno-invalid-offsetof -fpack-struct=8 -malign-double ")
+elseif(${ANDROID_ABI} STREQUAL "x86_64")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Wno-invalid-offsetof -mstackrealign -msse3 ")
+endif()
+
+SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
+SET(CMAKE_CXX_FLAGS_CHECKED "-O3")
+SET(CMAKE_CXX_FLAGS_PROFILE "-O3")
+SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
+
+# a version from pxshared
+#SET(NVCLOTH_ANDROID_COMPILE_DEFS _LIB;__STDC_LIMIT_MACROS;)
+# TODO: __ARM_NEON__;__arm64__ only on supporting archs
+SET(NVCLOTH_ANDROID_COMPILE_DEFS _LIB;__STDC_LIMIT_MACROS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;PX_NVCLOTH_STATIC_LIB;__ARM_NEON__;__arm64__)
+SET(NVCLOTH_ANDROID_DEBUG_COMPILE_DEFS _DEBUG;PX_DEBUG=1;PX_CHECKED=1)
+SET(NVCLOTH_ANDROID_CHECKED_COMPILE_DEFS NDEBUG;PX_CHECKED=1)
+SET(NVCLOTH_ANDROID_PROFILE_COMPILE_DEFS NDEBUG;PX_PROFILE=1)
+SET(NVCLOTH_ANDROID_RELEASE_COMPILE_DEFS NDEBUG)
+
+
+SET(PX_SELECT_COMPONENTS PxFoundation)
+FIND_PACKAGE(PxShared REQUIRED)
+
+################################################################################
+# TODO
+################################################################################
+# Include the PxShared-exports.cmake file that PxShared created. There's other ways to do this, but there's a bunch of issues with it in a CI environment
+# such as - we don't want to be installing any built artifacts on this server, etc. So for now we hack it.
+
+# Add PxShared as a dependency so that we can use project references
+#ADD_SUBDIRECTORY(${PXSHARED_ROOT_DIR}/src/compiler/cmake/android "${CMAKE_CURRENT_BINARY_DIR}/pxshared_bin")
+################################################################################
+
+# Include all of the projects
+INCLUDE(NvCloth.cmake)
+
+TARGET_LINK_LIBRARIES(NvCloth PUBLIC PxFoundation)
+
+MESSAGE("[NvCloth]cmake/android/CMakeList.txt END")
\ No newline at end of file
diff --git a/NvCloth/compiler/cmake/android/NvCloth.cmake b/NvCloth/compiler/cmake/android/NvCloth.cmake
new file mode 100644
index 0000000..544a3b5
--- /dev/null
+++ b/NvCloth/compiler/cmake/android/NvCloth.cmake
@@ -0,0 +1,39 @@
+#
+# Build NvCloth
+#
+
+SET(GW_DEPS_ROOT $ENV{GW_DEPS_ROOT})
+
+SET(NVCLOTH_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../../../)
+
+SET(NVCLOTH_PLATFORM_SOURCE_FILES
+ ${PROJECT_ROOT_DIR}/src/neon/NeonCollision.cpp
+ ${PROJECT_ROOT_DIR}/src/neon/NeonSelfCollision.cpp
+ ${PROJECT_ROOT_DIR}/src/neon/NeonSolverKernel.cpp
+ ${PROJECT_ROOT_DIR}/src/neon/SwCollisionHelpers.h
+)
+
+SET(NVCLOTH_PLATFORM_INCLUDES
+ ${LL_SOURCE_DIR}/include/linux
+ ${ANDROID_NDK}/sources/android/cpufeatures
+)
+
+# Use generator expressions to set config specific preprocessor definitions
+SET(NVCLOTH_COMPILE_DEFS
+ ${NVCLOTH_ANDROID_COMPILE_DEFS};
+ NvCloth_STATIC_LIB; # TODO: needed?
+
+ NV_ANDROID
+ NV_SIMD_SCALAR=1 # always compile scalar paths on android, so we may use them as fallback
+ NV_CLOTH_IMPORT=PX_DLL_EXPORT
+ NV_CLOTH_ENABLE_DX11=0
+ NV_CLOTH_ENABLE_CUDA=0
+
+ $<$:${NVCLOTH_ANDROID_DEBUG_COMPILE_DEFS};>
+ $<$:${NVCLOTH_ANDROID_CHECKED_COMPILE_DEFS};>
+ $<$:${NVCLOTH_ANDROID_PROFILE_COMPILE_DEFS};>
+ $<$:${NVCLOTH_ANDROID_RELEASE_COMPILE_DEFS};>
+)
+
+# include common low level settings
+INCLUDE(../common/NvCloth.cmake)
diff --git a/NvCloth/compiler/cmake/windows/NvCloth.cmake b/NvCloth/compiler/cmake/windows/NvCloth.cmake
index a867a75..2a757f5 100644
--- a/NvCloth/compiler/cmake/windows/NvCloth.cmake
+++ b/NvCloth/compiler/cmake/windows/NvCloth.cmake
@@ -6,9 +6,11 @@ MESSAGE("[NvCloth]cmake/windows/NvCloth.cmake")
IF(NOT DEFINED NV_CLOTH_ENABLE_CUDA)
SET(NV_CLOTH_ENABLE_CUDA 1)
+MESSAGE("Setting NV_CLOTH_ENABLE_CUDA 1")
ENDIF()
IF(NOT DEFINED NV_CLOTH_ENABLE_DX11)
SET(NV_CLOTH_ENABLE_DX11 1)
+MESSAGE("Setting NV_CLOTH_ENABLE_DX11 1")
ENDIF()
SET(GW_DEPS_ROOT $ENV{GW_DEPS_ROOT})
diff --git a/NvCloth/docs/documentation/Compiling/index.html b/NvCloth/docs/documentation/Compiling/index.html
new file mode 100644
index 0000000..90fe4a3
--- /dev/null
+++ b/NvCloth/docs/documentation/Compiling/index.html
@@ -0,0 +1,319 @@
+
+
+
+
+
+
+
+
+ Compiling — NvCloth 1.1.3 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Compiling
+
Cmake is automatically obtained using nvidia’s packman scripts for all platforms (except for Android).
+Internet connection is required for this.
+
+
Windows
+
For windows: Download and install the following dependencies:
+
+
Edit scripts/locate_cuda.bat to point to the CUDA installation folder (that contains the bin, include and lib folder), edit scripts/locate_win8sdk.bat to point to the windows SDK (C:\Program Files (x86)\Windows Kits\8.1 by default)
+
Run CmakeGenerateAll.bat to generate the visual studio solution files in compiler/vcXXwinXX-cmake/ .
+Run samples/CmakeGenerateProjects.bat to generate the visual studio solution files in samples/compiler/vcXXwinXX-cmake/ .
+For example Visual Studio 2015 solution with 64-bit target processor will be placed to compiler/vc14win64-cmake/ folder.
+Then open NvCloth.sln , choose the release/debug configuration and build the solution. The library binaries will be put to the bin folder next to the compiler folder.
+
The above project generation script has optional command line arguments to control whether CUDA/DX11 solvers should be enabled:
+
CmakeGenerateProjects.bat <0|1:use_cuda (default is 1)> <0|1:use_dx11 (default is 1)>
+
+
E.g.:
+
CmakeGenerateProjects.bat 1 0
+
+
will include CUDA solver into the compilation but exclude the DX11 solver.
+
+
+
Linux
+
Run GenerateProjectsLinux.sh to generate make files in compiler/linux64-XXXXX-cmake/
+
Enable or disable CUDA support by simply changing the following line in the BuildProjectsLinux.sh script included to the distribution:
+
export USE_CUDA=0 # 0 for disable 1 for enable
+
+
Run BuildProjectsLinux.sh script. It will generate various makefile-based projects in the compiler folder.
+Choose the one you need, e.g.:
+
cd compiler/linux64-release-cmake
+
+
then run the build process (using 5 compilation processes in parallel):
+
+
The library binaries will be put to the bin folder next to the compiler folder.
+
Note: In case you run the Linux project generation scripts GenerateProjectsLinux.sh and see an error like this:
+
env: bash\r: No such file or directory
+
+
this command will help to fix the line endings:
+
sed $'s/\r$//' GenerateProjectsLinux.sh > GenerateProjectsLinux.sh.fixed && mv GenerateProjectsLinux.sh.fixed GenerateProjectsLinux.sh && chmod +x GenerateProjectsLinux.sh
+
+
or use your favorite text editor.
+
+
+
Mac
+
Running BuildProjectsOsx.sh will generate various xcode-based projects in the compiler folder.
+Choose the one you need, e.g. cd compiler/osx64-cmake , open the project in XCode and build inside the IDE.
+
The library binaries will be put to the bin folder next to the compiler folder.
+
Note: In case if you run the Mac project generation scripts GenerateProjectsOsx.sh and see an error like this:
+
env: bash\r: No such file or directory
+
+
this command will help to fix the line endings:
+
sed $'s/\r$//' GenerateProjectsOsx.sh > GenerateProjectsOsx.sh.fixed && mv GenerateProjectsOsx.sh.fixed GenerateProjectsOsx.sh && chmod +x GenerateProjectsOsx.sh
+
+
+
+
Android
+
Download and install CMake 3.7 from https://cmake.org/download/ . Edit scripts/locate_cmake.bat to point to the cmake executable.
+
Download NDK from https://developer.android.com/ndk/downloads/index.html (tested versions are r15c, r13b, r12b). Set ANDROID_NDK_ROOT environment variable to point to the root NDK folder.
+Run project generation script:
+
CmakeGenerateAndroid.bat release
+
+
You need cmake to be in your PATH.
+
Go to compiler\android-arm64-v8a-release-cmake folder and run:
+
+
The library binaries will be put to the bin folder next to the compiler folder.
+
Note: To be able to build the Android binaries using CMake you need to make sure a certain folders in your NDK point to needed binaries.
+Specifically, you need to create a symlink/copy/rename:
+
<path_to_android_ndk>/toolchains/aarch64-linux-android-4.9/prebuilt/windows
+
+
to:
+
<path_to_android_ndk>/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64
+
+
Newer NDK versions might not require doing that at all, but some versions do.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NvCloth/docs/documentation/CopyRight/Index.html b/NvCloth/docs/documentation/CopyRight/Index.html
index a570acb..3aa2c88 100644
--- a/NvCloth/docs/documentation/CopyRight/Index.html
+++ b/NvCloth/docs/documentation/CopyRight/Index.html
@@ -7,7 +7,7 @@
- NVIDIA Copyright Notice — NvCloth 1.0.0 documentation
+ NVIDIA Copyright Notice — NvCloth 1.1.3 documentation
@@ -18,7 +18,7 @@
-
+
@@ -56,7 +56,7 @@
@@ -67,11 +67,18 @@
Table Of Contents
diff --git a/NvCloth/docs/documentation/Modules/Index.html b/NvCloth/docs/documentation/Modules/Index.html
index a959e4c..e65c6ff 100644
--- a/NvCloth/docs/documentation/Modules/Index.html
+++ b/NvCloth/docs/documentation/Modules/Index.html
@@ -7,7 +7,7 @@
- Modules — NvCloth 1.0.0 documentation
+ Modules — NvCloth 1.1.3 documentation
@@ -18,7 +18,7 @@
-
+
-
+
@@ -57,7 +57,7 @@
@@ -68,11 +68,18 @@
Table Of Contents
Release Notes
+
+Compiling
Modules
@@ -108,8 +115,8 @@
Previous topic
- Release Notes
+ Compiling
Next topic
User Guide
@@ -156,7 +163,7 @@ Users that want to use their own cooking or offline cooking can bypass these fun
diff --git a/NvCloth/docs/documentation/NvCloth.html b/NvCloth/docs/documentation/NvCloth.html
deleted file mode 100644
index 1c86187..0000000
--- a/NvCloth/docs/documentation/NvCloth.html
+++ /dev/null
@@ -1,140 +0,0 @@
-
-
-
-
-
-
-
-
- NVIDIA(R) NvCloth Documentation — NVIDIA NvCloth Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
NVIDIA(R) NvCloth Documentation
-
-(NVIDIA(R) NvCloth)
-Contents:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/NvCloth/docs/documentation/ReleaseNotes/index.html b/NvCloth/docs/documentation/ReleaseNotes/index.html
index 214a7db..694273a 100644
--- a/NvCloth/docs/documentation/ReleaseNotes/index.html
+++ b/NvCloth/docs/documentation/ReleaseNotes/index.html
@@ -7,7 +7,7 @@
- Release Notes — NvCloth 1.0.0 documentation
+ Release Notes — NvCloth 1.1.3 documentation
@@ -18,7 +18,7 @@
-
-
+
+
@@ -57,7 +57,7 @@
@@ -68,11 +68,18 @@
Table Of Contents