Skip to content

Commit

Permalink
PhysX SDK 5.3.0 (33308187)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoub-belarbi authored and preist-nvidia committed Sep 19, 2023
1 parent e8c8deb commit a2af52e
Show file tree
Hide file tree
Showing 458 changed files with 15,503 additions and 7,745 deletions.
164 changes: 164 additions & 0 deletions physx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,167 @@
# v5.3.0

## Supported Platforms

### Runtime

* Linux (tested on Ubuntu 20.04)
* Microsoft Windows 10 or later (GPU acceleration: display driver and GPU supporting CUDA 11 / CUDA ARCH 3.0)

### Development

* Microsoft Windows 10 or later
* Microsoft Visual Studio 2017, 2019, 2022

## General

### Changed

* The method PxLineStripSkinning::evaluateInterpolatedVertices changed the transform argument from `PxReal*` to ` PxMat44*` to be more explicit about the underlying data that is expected.
* The apply* and copy* functions in PxScene changed their event arguments from `void*` to `CUevent` to fix misunderstandings about the type of those arguments. This also fixes a bug where pointers to events where passed but not dereferenced when recording/awaiting them.
* The TGS solver on CPU and GPU now computes the number of position and velocity iteration according to the requested numbers by the actors in each island, matching the behavior of the PGS solver. Previously TGS velocity iterations in excess of 4 were silently converted to position iterations. To preserve the old behavior any actor requesting more than 4 velocity iterations should convert excess velocity iteration counts to position iteration counts, e.g., formerly 10 position and 10 velocity iterations should become 16 position and 4 velocity iterations.
* The `acquire()` and `release()` functions in `PxCudaContextManager` that manage the PhysX CUDA context now use push/pop semantics. This fixes bug that led to a wrong context being bound after `release()` when sharing an existing CUDA context with PhysX.
* Calling `setCMassLocalPose()` on a rigid body when using the direct-GPU API is now allowed. Note that calling `updateArticulationsKinematic()` after updating CMassLocalPose but before the next call to `simulate()` will still use the old CMassLocalPose.

### Fixed

* A memory leak has been fixed in the actor pairs management code.
* A race condition was fixed that led to nondeterministic contact reports in some scenarios.
* Fix FEM cloth attachment filtering bug
* Fix FEM narrow phase collision crash
* Sphere-Trianglemesh collision bug is fixed
* A bug that led to aggregated shapes being processed as part of the regular broadphase when changing transforms using the direct-GPU API has been fixed.
* A bug that led to missed collisions and phantom collisions when changing transforms using the direct-GPU API has been fixed.
* A bug that led to incorrect and nondeterministic behaviour for convex-trianglemesh, convex-heightfield, sphere-trianglemesh, capsule-trianglemesh, sphere-heightfield and capsule-heightfield collisions on GPU has been fixed.
* A bug that led to contact target velocities spilling over from one contact to other contacts in the same solver batch.
* A bug that led to incorrect and nondeterministic behaviour for trianglemesh-trianglemesh collisions on GPU has been fixed.
* A bug that led to incorrect materials being used for convex-convex collisions on GPU has been fixed.

### Removed

* Context creation for CUDA/Graphics interoperability has been deprecated. interopMode has been removed from PxCudaContextManagerDesc.
* PxSceneFlag::eFORCE_READBACK has been removed. There is no replacement.
* PxSceneFlag::eSUPPRESS_READBACK was deprecated and has been removed. Use PxSceneFlag::eENABLE_DIRECT_GPU_API instead.

## Rigid Body

### Added

* Possibility to use the GPU to cook an SDF making the process a lot faster.
* Option to launch CUDA kernels synchronously when creating the CUDA Context Manager. This option is required to accurately determine the correct kernel that returns a CUDA error.

### Fixed

* The torsional patch radius parameter (see PxShape::setTorsionalPatchRadius()) was potentially ignored when running the simulation on GPU.
* Potential race condition related to activating/deactivating trigger pairs.
* A small misalignment of SDFs with the triangle mesh.
* A small error in the gradient calculation of SDFs.
* A sphere could tunnel through the edge between two triangles in a triangle mesh.
* Race condition in SDF computation cuda kernel is fixed.
* Fixed invalid access problem when selecting the SDF contact handler.

### Deprecated

* PxFrictionType::eONE_DIRECTIONAL has been deprecated and will be removed in the future. Please use ePATCH or eTWO_DIRECTIONAL instead.

## Articulations

### Changed

* `PxScene::copyArticulationData()` and `PxScene::applyArticulationData()` do not allow reading write-only and writing read-only data anymore. Read/write properties are specified in the API doc of `PxArticulationGpuDataType`.

### Fixed

* A bug that led to wrong joint targets being set when using the direct-GPU API has been fixed.
* A bug that led to link constraint-force-mixing scale not being included in collision constraints when using GPU dynamics has been fixed.
* Articulation drive did not produce the same force magnitude for drives with velocity biases that were equally positive and negative. This was true of the CPU and GPU solver pipelines. This has been fixed.
* Articulation drive produced unphysically large forces when run in combination with PxSolverType::eTGS and non-zero velocity iteration count. This was true of the CPU and GPU solver pipelines. This has been fixed by no longer updating joint drive force during velocity iterations with PxSolverType::eTGS. The expectation is that there are sufficient position iterations such that the drive force that accumulated over the position iterations is an accurate force. This avoids numerical discrepancies arising from the difference in effective simulation timestep employed by the position and velocity iterations. This discrepancy was particularly acute with a large number of velocity iterations.
* Articulation drive suffered from an unphysical damping term with all combinations of PxSolverType::eTGS/PxSolverType::ePGS/PxSceneFlag::eENABLE_GPU_DYNAMICS. This has been fixed.
* Potential crashes due to reading uninitialized memory were fixed.
* The function PxArticulationReducedCoordinate::setMaxCOMAngularVelocity() had no effect if called after the 1st sim step with PxSceneFlag::eENABLE_GPU_DYNAMICS raised. This has been fixed.
* The function PxArticulationReducedCoordinate::setMaxCOMLinearVelocity() had no effect if called after the 1st sim step with PxSceneFlag::eENABLE_GPU_DYNAMICS raised. This has been fixed.
* Raising or lowering PxArticulationFlag::eFIX_BASE had no effect if modified after the 1st sim step with PxSceneFlag::eENABLE_GPU_DYNAMICS raised. This has been fixed.
* The root link acceleration was reported as {0} even when the root link was not fixed. This affected GPU only. The fix has been applied to PxArticulationReducedCoordinate::copyInternalStateToCache(), PxArticulationReducedCoordinate::getLinkAcceleration() and PxScene::copyArticulationData().
* Only half the expected friction force was applied in certain scenarios when using PxSolverType::eTGS, PxFrictionType::ePATCH, PxMaterialFlag::eIMPROVED_PATCH_FRICTION and running on CPU.

### Deprecated

* The functions PxArticulationReducedCoordinate::setMaxCOMLinearVelocity(), PxArticulationReducedCoordinate::getMaxCOMLinearVelocity(), PxArticulationReducedCoordinate::setMaxCOMAngularVelocity(), PxArticulationReducedCoordinate::getMaxCOMAngularVelocity() have all been marked as deprecated and will be removed in a future release.

## Joints

### Deprecated

* Px1DConstraintFlag::eDRIVE_ROW has been marked as deprecated and will be removed in a later release. It has been renamed to Px1DConstraintFlag::eDEPRECATED_DRIVE_ROW to signal the intention to remove this flag in a later release.

## Vehicles2

### Added

* A new snippet that shows an example of using a custom tire model has been added (see SnippetVehicle2CustomTire).

### Changed

* The snippet SnippetVehicle2Customization has been renamed to SnippetVehicle2CustomSuspension.
* PxVehicleCommandNonLinearResponseParams::nbSpeedRenponsesPerCommandValue was misspelled and now renamed to nbSpeedResponsesPerCommandValue.
* More parameters get recorded by OmniPVD. As a consequence, PxVehiclePVDComponent and some other PVD related vehicle APIs changed.
* It is now legal to set entries in PxVehicleTankDriveDifferentialParams::nbWheelsPerTrack to 0 or 1.
* The APIs of some methods use more specific input parameters now to decrease dependency on certain data structures. See the migration guide for more details. This applies to the methods: PxVehicleTireDirsUpdate(), PxVehicleTireCamberAnglesUpdate() and PxVehicleTireGripUpdate().

### Fixed

* Nonlinear command responses were broken for negative steer command values. Now they are treated symmetrically as intended.
* PxVehiclePhysXActorDestroy() triggered a warning if the articulation link was not a leaf link.

### Removed

* PxVehicleTankDriveDifferentialParams::nbWheelsInTracks has been removed. The entries in ::nbWheelsPerTrack can be summed up to compute that value instead.

## Cooking

### Added

* PxTriangleMeshCookingResult::eEMPTY_MESH has been added. This cooking result is output when the mesh cleaning process removes all the triangles of a mesh.
* PxCookingParams::meshAreaMinLimit has been added. This is used in the mesh cleaning process to remove triangles whose area is too small.
* PxCookingParams::meshEdgeLengthMaxLimit has been added.

### Changed

* The requirements for convex meshes being GPU compatible have been tightened. Overly oblong meshes are now rejected by the cooking with an error message. Collision
detection will fall back to CPU for these meshes.

### Fixed
* Fixed out of memory crash when cooking a convex hull of a very high resolution mesh.

## Soft Body

### Added

* Support for voxel meshes with 5 tetrahedra per voxel to counteract anisotropy in the mesh.

### Changed:

* Defaults of PxConeLimitedConstraint::mLowLimit, mHighLimit have been changed to -1.0 indicating no limit.
* Soft body sleep damping is improved to minimize an effect that looks like a soft body would lower its stiffness before it goes to sleep.

### Fixed
* Overflow of the soft body contact buffer will result in a warning.

## Extensions

### Added

* CCD support for PxCustomGeometryExt::CylinderCallbacks and PxCustomGeometryExt::ConeCallbacks.

### Changed

* PxCustomGeometryExt::CylinderCallbacks and PxCustomGeometryExt::ConeCallbacks classes have their public member variables (height, radius, axis and margin) replaced with setter and getter member functions.

## Pvd

### Fixed

* Better coverage in OVD of attribute mirroring for : PxActor, PxRigidActor, PxRigidBody, PxRigidStatic and PxRigidDynamic, specifically for initial values, user set functions and post simulation updates.

# v5.2.0 & v5.2.1

## Supported Platforms
Expand Down
38 changes: 26 additions & 12 deletions physx/buildtools/cmake_generate_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class CMakePreset:
presetName = ''
targetPlatform = ''
compiler = ''
generator = ''
cmakeSwitches = []
cmakeParams = []

Expand All @@ -87,8 +88,11 @@ def __init__(self, presetName):
for platform in presetNode.findall('platform'):
self.targetPlatform = platform.attrib['targetPlatform']
self.compiler = platform.attrib['compiler']
self.generator = platform.get('generator')
print('Target platform: ' + self.targetPlatform +
' using compiler: ' + self.compiler)
if self.generator is not None:
print(' using generator: ' + self.generator)

for cmakeSwitch in presetNode.find('CMakeSwitches'):
cmSwitch = '-D' + \
Expand Down Expand Up @@ -127,7 +131,7 @@ def getCMakeSwitches(self):
if os.environ.get('PM_CUDA_PATH') is not None:
outString = outString + ' -DCUDAToolkit_ROOT_DIR=' + \
os.environ['PM_CUDA_PATH']
if self.compiler in ['vc15', 'vc16', 'vc17']:
if self.compiler in ['vc15', 'vc16', 'vc17'] and self.generator != 'ninja':
outString = outString + ' -T cuda=' + os.environ['PM_CUDA_PATH']
# TODO: Need to do the same for gcc (aarch64) when we package it with Packman
elif self.compiler == 'clang':
Expand All @@ -145,21 +149,31 @@ def getCMakeParams(self):
def getPlatformCMakeParams(self):
cmake_modules_root = os.environ['PHYSX_ROOT_DIR'] + '/source/compiler/cmake/modules'
outString = ' '
if self.compiler == 'vc15':
outString = outString + '-G \"Visual Studio 15 2017\"'
elif self.compiler == 'vc16':
outString = outString + '-G \"Visual Studio 16 2019\"'
elif self.compiler == 'vc17':
outString = outString + '-G \"Visual Studio 17 2022\"'

vs_versions = {
'vc15': '\"Visual Studio 15 2017\"',
'vc16': '\"Visual Studio 16 2019\"',
'vc17': '\"Visual Studio 17 2022\"'
}

# Visual studio
if self.compiler in vs_versions:
generator = '-G \"Ninja Multi-Config\"' if self.generator == 'ninja' else '-G ' + vs_versions[self.compiler]
outString += generator
# mac
elif self.compiler == 'xcode':
outString = outString + '-G Xcode'
elif self.targetPlatform == 'linux':
outString = outString + '-G \"Unix Makefiles\"'
elif self.targetPlatform == 'linuxAarch64':
outString = outString + '-G \"Unix Makefiles\"'
# Linux
elif self.targetPlatform in ['linux', 'linuxAarch64']:
if self.generator is not None and self.generator == 'ninja':
outString = outString + '-G \"Ninja\"'
outString = outString + ' -DCMAKE_MAKE_PROGRAM=' + os.environ['PM_ninja_PATH'] + '/ninja'
else:
outString = outString + '-G \"Unix Makefiles\"'

if self.targetPlatform == 'win64':
outString = outString + ' -Ax64'
if self.generator != 'ninja':
outString = outString + ' -Ax64'
outString = outString + ' -DTARGET_BUILD_PLATFORM=windows'
outString = outString + ' -DPX_OUTPUT_ARCH=x86'
return outString
Expand Down
16 changes: 9 additions & 7 deletions physx/compiler/public/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,21 @@

cmake_minimum_required(VERSION 3.7)

IF(NOT DEFINED PHYSX_CMAKE_MODULES_PATH OR PHYSX_CMAKE_MODULES_PATH STREQUAL "")
IF(DEFINED ENV{PM_cmake_PATH} AND NOT "$ENV{PM_cmake_PATH}" STREQUAL "")
LIST(APPEND PHYSX_CMAKE_MODULES_PATH "$ENV{PM_cmake_PATH}/share/cmake-3.25/Modules")
ENDIF()
LIST(APPEND PHYSX_CMAKE_MODULES_PATH ${PHYSX_ROOT_DIR}/source/compiler/cmake/modules CACHE INTERNAL "Path to PhysX CMake Modules")
ENDIF()

LIST(APPEND CMAKE_MODULE_PATH ${PHYSX_CMAKE_MODULES_PATH})

project(PhysXSDK C CXX)

OPTION(PX_BUILDSNIPPETS "Generate the snippets" OFF)
OPTION(PX_BUILDPVDRUNTIME "Generate the OmniPVD project" OFF)
OPTION(PX_CMAKE_SUPPRESS_REGENERATION "Disable zero_check projects" OFF)

IF(DEFINED ENV{PM_cmake_PATH} AND NOT "$ENV{PM_cmake_PATH}" STREQUAL "")
SET(CMAKEMODULES_PATH "$ENV{PM_cmake_PATH}/share/cmake-3.25/Modules")
ENDIF()

LIST(APPEND CMAKEMODULES_PATH ${PHYSX_ROOT_DIR}/source/compiler/cmake/modules)
SET(CMAKE_MODULE_PATH ${CMAKEMODULES_PATH} CACHE INTERNAL "Path to CMakeModules")

IF(PX_CMAKE_SUPPRESS_REGENERATION)
SET(CMAKE_SUPPRESS_REGENERATION true)
ENDIF()
Expand Down
10 changes: 6 additions & 4 deletions physx/dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@
</dependency>

<dependency name="vswhere">
<package name="VsWhere" version="2.7.3111.17308_1.0" platforms="vc15win64 vc16win64 vc17win64 linux-crosscompile linux-aarch64-crosscompile "/>
<package name="VsWhere" version="2.7.3111.17308_1.0" platforms="vc15win64 vc16win64 vc17win64 linux-crosscompile linux-aarch64-crosscompile "/>
</dependency>

<dependency name="PhysXDevice">
<package name="PhysXDevice" version="18.12.7.4" platforms="vc15win64 vc16win64 vc17win64"/>
<package name="PhysXDevice" version="18.12.7.4" platforms="vc15win64 vc16win64 vc17win64"/>
</dependency>

<dependency name="freeglut">
<package name="freeglut-windows" version="3.4_1.1" platforms="vc15win64 vc16win64 vc17win64"/>
<package name="freeglut-windows" version="3.4_1.1" platforms="vc15win64 vc16win64 vc17win64"/>
</dependency>

<dependency name="PhysXGpu">
<package name="PhysXGpu" version="105.0-5.2.498.33012328-public-signed" platforms="vc15win64 vc16win64 vc17win64 linux linux-aarch64"/>
<package name="PhysXGpu" version="105.1-5.3.4207.33265367-windows-public" platforms="vc15win64 vc16win64 vc17win64"/>
<package name="PhysXGpu" version="105.1-5.3.4207.33265367-linux-x86_64-public" platforms="linux"/>
<package name="PhysXGpu" version="105.1-5.3.4207.33265367-linux-aarch64-public" platforms="linux-aarch64"/>
</dependency>

<dependency name="opengllinux" tags="requiredForDistro">
Expand Down
15 changes: 9 additions & 6 deletions physx/documentation/platformreadme/linux/README_LINUX.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,26 @@ Compilers:

## Generating Makefiles:

* Makefiles are generated through a script in physx root directory: generate_projects.sh
* Script generate_projects.sh expects a preset name as a parameter, if a parameter is not provided it does list the available presets and you can select one.
* Supported presets for linux platform are: linux, linux-aarch64.
* Generated solutions are in folder compiler/linux-debug, compiler/linux-checked, compiler/linux-profile, compiler/linux-release.
* Makefiles are generated through a script in the physx root directory: generate_projects.sh
* The script generate_projects.sh expects a preset name as a parameter, if a parameter is not provided it does list the available presets and you can select one.
* Generated solutions are placed in the folders compiler/linux-debug, compiler/linux-checked, compiler/linux-profile, compiler/linux-release.


## Building SDK:

* Makefiles are in compiler/linux-debug etc
* Clean solution: make clean
* Build solution: make
* Install solution: make install

Note:
Compile errors on unsupported compilers or platforms are frequently caused by additional warnings that are treated as errors by default.
While we cannot offer support in this case we recommend removing all occurences of the `-Werror` flag in the file `physx/source/compiler/cmake/linux/CMakeLists.txt`.

## PhysX GPU Acceleration:

* Requires CUDA 11.8 compatible display driver. The corresponding driver version can be found [here](https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#cuda-major-component-versions__table-cuda-toolkit-driver-versions).

* Running GPU-accelerated simulations requires a CUDA 11.8 compatible display driver. The corresponding driver version can be found [here](https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#cuda-major-component-versions__table-cuda-toolkit-driver-versions).
* Note that CUDA is not required for building PhysX, it is only a runtime requirement for GPU-accelerated scenes.

## Required Packages for Building and Running PhysX Snippets:

Expand Down
2 changes: 1 addition & 1 deletion physx/include/PxActor.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class PxActor : public PxBase
PX_INLINE PxActor(PxType concreteType, PxBaseFlags baseFlags) : PxBase(concreteType, baseFlags), userData(NULL) {}
PX_INLINE PxActor(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
virtual ~PxActor() {}
virtual bool isKindOf(const char* name) const { return !::strcmp("PxActor", name) || PxBase::isKindOf(name); }
virtual bool isKindOf(const char* name) const { PX_IS_KIND_OF(name, "PxActor", PxBase); }


};
Expand Down
2 changes: 1 addition & 1 deletion physx/include/PxAggregate.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class PxAggregate : public PxBase
PX_INLINE PxAggregate(PxType concreteType, PxBaseFlags baseFlags) : PxBase(concreteType, baseFlags), userData(NULL) {}
PX_INLINE PxAggregate(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
virtual ~PxAggregate() {}
virtual bool isKindOf(const char* name) const { return !::strcmp("PxAggregate", name) || PxBase::isKindOf(name); }
virtual bool isKindOf(const char* name) const { PX_IS_KIND_OF(name, "PxAggregate", PxBase); }
};

#if !PX_DOXYGEN
Expand Down
Loading

0 comments on commit a2af52e

Please sign in to comment.