Skip to content

Commit a2af52e

Browse files
ayoub-belarbipreist-nvidia
authored andcommitted
PhysX SDK 5.3.0 (33308187)
1 parent e8c8deb commit a2af52e

File tree

458 files changed

+15503
-7745
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

458 files changed

+15503
-7745
lines changed

physx/CHANGELOG.md

+164
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,167 @@
1+
# v5.3.0
2+
3+
## Supported Platforms
4+
5+
### Runtime
6+
7+
* Linux (tested on Ubuntu 20.04)
8+
* Microsoft Windows 10 or later (GPU acceleration: display driver and GPU supporting CUDA 11 / CUDA ARCH 3.0)
9+
10+
### Development
11+
12+
* Microsoft Windows 10 or later
13+
* Microsoft Visual Studio 2017, 2019, 2022
14+
15+
## General
16+
17+
### Changed
18+
19+
* The method PxLineStripSkinning::evaluateInterpolatedVertices changed the transform argument from `PxReal*` to ` PxMat44*` to be more explicit about the underlying data that is expected.
20+
* 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.
21+
* 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.
22+
* 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.
23+
* 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.
24+
25+
### Fixed
26+
27+
* A memory leak has been fixed in the actor pairs management code.
28+
* A race condition was fixed that led to nondeterministic contact reports in some scenarios.
29+
* Fix FEM cloth attachment filtering bug
30+
* Fix FEM narrow phase collision crash
31+
* Sphere-Trianglemesh collision bug is fixed
32+
* 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.
33+
* A bug that led to missed collisions and phantom collisions when changing transforms using the direct-GPU API has been fixed.
34+
* 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.
35+
* A bug that led to contact target velocities spilling over from one contact to other contacts in the same solver batch.
36+
* A bug that led to incorrect and nondeterministic behaviour for trianglemesh-trianglemesh collisions on GPU has been fixed.
37+
* A bug that led to incorrect materials being used for convex-convex collisions on GPU has been fixed.
38+
39+
### Removed
40+
41+
* Context creation for CUDA/Graphics interoperability has been deprecated. interopMode has been removed from PxCudaContextManagerDesc.
42+
* PxSceneFlag::eFORCE_READBACK has been removed. There is no replacement.
43+
* PxSceneFlag::eSUPPRESS_READBACK was deprecated and has been removed. Use PxSceneFlag::eENABLE_DIRECT_GPU_API instead.
44+
45+
## Rigid Body
46+
47+
### Added
48+
49+
* Possibility to use the GPU to cook an SDF making the process a lot faster.
50+
* 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.
51+
52+
### Fixed
53+
54+
* The torsional patch radius parameter (see PxShape::setTorsionalPatchRadius()) was potentially ignored when running the simulation on GPU.
55+
* Potential race condition related to activating/deactivating trigger pairs.
56+
* A small misalignment of SDFs with the triangle mesh.
57+
* A small error in the gradient calculation of SDFs.
58+
* A sphere could tunnel through the edge between two triangles in a triangle mesh.
59+
* Race condition in SDF computation cuda kernel is fixed.
60+
* Fixed invalid access problem when selecting the SDF contact handler.
61+
62+
### Deprecated
63+
64+
* PxFrictionType::eONE_DIRECTIONAL has been deprecated and will be removed in the future. Please use ePATCH or eTWO_DIRECTIONAL instead.
65+
66+
## Articulations
67+
68+
### Changed
69+
70+
* `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`.
71+
72+
### Fixed
73+
74+
* A bug that led to wrong joint targets being set when using the direct-GPU API has been fixed.
75+
* A bug that led to link constraint-force-mixing scale not being included in collision constraints when using GPU dynamics has been fixed.
76+
* 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.
77+
* 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.
78+
* Articulation drive suffered from an unphysical damping term with all combinations of PxSolverType::eTGS/PxSolverType::ePGS/PxSceneFlag::eENABLE_GPU_DYNAMICS. This has been fixed.
79+
* Potential crashes due to reading uninitialized memory were fixed.
80+
* The function PxArticulationReducedCoordinate::setMaxCOMAngularVelocity() had no effect if called after the 1st sim step with PxSceneFlag::eENABLE_GPU_DYNAMICS raised. This has been fixed.
81+
* The function PxArticulationReducedCoordinate::setMaxCOMLinearVelocity() had no effect if called after the 1st sim step with PxSceneFlag::eENABLE_GPU_DYNAMICS raised. This has been fixed.
82+
* 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.
83+
* 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().
84+
* 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.
85+
86+
### Deprecated
87+
88+
* The functions PxArticulationReducedCoordinate::setMaxCOMLinearVelocity(), PxArticulationReducedCoordinate::getMaxCOMLinearVelocity(), PxArticulationReducedCoordinate::setMaxCOMAngularVelocity(), PxArticulationReducedCoordinate::getMaxCOMAngularVelocity() have all been marked as deprecated and will be removed in a future release.
89+
90+
## Joints
91+
92+
### Deprecated
93+
94+
* 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.
95+
96+
## Vehicles2
97+
98+
### Added
99+
100+
* A new snippet that shows an example of using a custom tire model has been added (see SnippetVehicle2CustomTire).
101+
102+
### Changed
103+
104+
* The snippet SnippetVehicle2Customization has been renamed to SnippetVehicle2CustomSuspension.
105+
* PxVehicleCommandNonLinearResponseParams::nbSpeedRenponsesPerCommandValue was misspelled and now renamed to nbSpeedResponsesPerCommandValue.
106+
* More parameters get recorded by OmniPVD. As a consequence, PxVehiclePVDComponent and some other PVD related vehicle APIs changed.
107+
* It is now legal to set entries in PxVehicleTankDriveDifferentialParams::nbWheelsPerTrack to 0 or 1.
108+
* 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().
109+
110+
### Fixed
111+
112+
* Nonlinear command responses were broken for negative steer command values. Now they are treated symmetrically as intended.
113+
* PxVehiclePhysXActorDestroy() triggered a warning if the articulation link was not a leaf link.
114+
115+
### Removed
116+
117+
* PxVehicleTankDriveDifferentialParams::nbWheelsInTracks has been removed. The entries in ::nbWheelsPerTrack can be summed up to compute that value instead.
118+
119+
## Cooking
120+
121+
### Added
122+
123+
* PxTriangleMeshCookingResult::eEMPTY_MESH has been added. This cooking result is output when the mesh cleaning process removes all the triangles of a mesh.
124+
* PxCookingParams::meshAreaMinLimit has been added. This is used in the mesh cleaning process to remove triangles whose area is too small.
125+
* PxCookingParams::meshEdgeLengthMaxLimit has been added.
126+
127+
### Changed
128+
129+
* 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
130+
detection will fall back to CPU for these meshes.
131+
132+
### Fixed
133+
* Fixed out of memory crash when cooking a convex hull of a very high resolution mesh.
134+
135+
## Soft Body
136+
137+
### Added
138+
139+
* Support for voxel meshes with 5 tetrahedra per voxel to counteract anisotropy in the mesh.
140+
141+
### Changed:
142+
143+
* Defaults of PxConeLimitedConstraint::mLowLimit, mHighLimit have been changed to -1.0 indicating no limit.
144+
* 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.
145+
146+
### Fixed
147+
* Overflow of the soft body contact buffer will result in a warning.
148+
149+
## Extensions
150+
151+
### Added
152+
153+
* CCD support for PxCustomGeometryExt::CylinderCallbacks and PxCustomGeometryExt::ConeCallbacks.
154+
155+
### Changed
156+
157+
* PxCustomGeometryExt::CylinderCallbacks and PxCustomGeometryExt::ConeCallbacks classes have their public member variables (height, radius, axis and margin) replaced with setter and getter member functions.
158+
159+
## Pvd
160+
161+
### Fixed
162+
163+
* 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.
164+
1165
# v5.2.0 & v5.2.1
2166

3167
## Supported Platforms

physx/buildtools/cmake_generate_projects.py

+26-12
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class CMakePreset:
6666
presetName = ''
6767
targetPlatform = ''
6868
compiler = ''
69+
generator = ''
6970
cmakeSwitches = []
7071
cmakeParams = []
7172

@@ -87,8 +88,11 @@ def __init__(self, presetName):
8788
for platform in presetNode.findall('platform'):
8889
self.targetPlatform = platform.attrib['targetPlatform']
8990
self.compiler = platform.attrib['compiler']
91+
self.generator = platform.get('generator')
9092
print('Target platform: ' + self.targetPlatform +
9193
' using compiler: ' + self.compiler)
94+
if self.generator is not None:
95+
print(' using generator: ' + self.generator)
9296

9397
for cmakeSwitch in presetNode.find('CMakeSwitches'):
9498
cmSwitch = '-D' + \
@@ -127,7 +131,7 @@ def getCMakeSwitches(self):
127131
if os.environ.get('PM_CUDA_PATH') is not None:
128132
outString = outString + ' -DCUDAToolkit_ROOT_DIR=' + \
129133
os.environ['PM_CUDA_PATH']
130-
if self.compiler in ['vc15', 'vc16', 'vc17']:
134+
if self.compiler in ['vc15', 'vc16', 'vc17'] and self.generator != 'ninja':
131135
outString = outString + ' -T cuda=' + os.environ['PM_CUDA_PATH']
132136
# TODO: Need to do the same for gcc (aarch64) when we package it with Packman
133137
elif self.compiler == 'clang':
@@ -145,21 +149,31 @@ def getCMakeParams(self):
145149
def getPlatformCMakeParams(self):
146150
cmake_modules_root = os.environ['PHYSX_ROOT_DIR'] + '/source/compiler/cmake/modules'
147151
outString = ' '
148-
if self.compiler == 'vc15':
149-
outString = outString + '-G \"Visual Studio 15 2017\"'
150-
elif self.compiler == 'vc16':
151-
outString = outString + '-G \"Visual Studio 16 2019\"'
152-
elif self.compiler == 'vc17':
153-
outString = outString + '-G \"Visual Studio 17 2022\"'
152+
153+
vs_versions = {
154+
'vc15': '\"Visual Studio 15 2017\"',
155+
'vc16': '\"Visual Studio 16 2019\"',
156+
'vc17': '\"Visual Studio 17 2022\"'
157+
}
158+
159+
# Visual studio
160+
if self.compiler in vs_versions:
161+
generator = '-G \"Ninja Multi-Config\"' if self.generator == 'ninja' else '-G ' + vs_versions[self.compiler]
162+
outString += generator
163+
# mac
154164
elif self.compiler == 'xcode':
155165
outString = outString + '-G Xcode'
156-
elif self.targetPlatform == 'linux':
157-
outString = outString + '-G \"Unix Makefiles\"'
158-
elif self.targetPlatform == 'linuxAarch64':
159-
outString = outString + '-G \"Unix Makefiles\"'
166+
# Linux
167+
elif self.targetPlatform in ['linux', 'linuxAarch64']:
168+
if self.generator is not None and self.generator == 'ninja':
169+
outString = outString + '-G \"Ninja\"'
170+
outString = outString + ' -DCMAKE_MAKE_PROGRAM=' + os.environ['PM_ninja_PATH'] + '/ninja'
171+
else:
172+
outString = outString + '-G \"Unix Makefiles\"'
160173

161174
if self.targetPlatform == 'win64':
162-
outString = outString + ' -Ax64'
175+
if self.generator != 'ninja':
176+
outString = outString + ' -Ax64'
163177
outString = outString + ' -DTARGET_BUILD_PLATFORM=windows'
164178
outString = outString + ' -DPX_OUTPUT_ARCH=x86'
165179
return outString

physx/compiler/public/CMakeLists.txt

+9-7
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,21 @@
2626

2727
cmake_minimum_required(VERSION 3.7)
2828

29+
IF(NOT DEFINED PHYSX_CMAKE_MODULES_PATH OR PHYSX_CMAKE_MODULES_PATH STREQUAL "")
30+
IF(DEFINED ENV{PM_cmake_PATH} AND NOT "$ENV{PM_cmake_PATH}" STREQUAL "")
31+
LIST(APPEND PHYSX_CMAKE_MODULES_PATH "$ENV{PM_cmake_PATH}/share/cmake-3.25/Modules")
32+
ENDIF()
33+
LIST(APPEND PHYSX_CMAKE_MODULES_PATH ${PHYSX_ROOT_DIR}/source/compiler/cmake/modules CACHE INTERNAL "Path to PhysX CMake Modules")
34+
ENDIF()
35+
36+
LIST(APPEND CMAKE_MODULE_PATH ${PHYSX_CMAKE_MODULES_PATH})
37+
2938
project(PhysXSDK C CXX)
3039

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

35-
IF(DEFINED ENV{PM_cmake_PATH} AND NOT "$ENV{PM_cmake_PATH}" STREQUAL "")
36-
SET(CMAKEMODULES_PATH "$ENV{PM_cmake_PATH}/share/cmake-3.25/Modules")
37-
ENDIF()
38-
39-
LIST(APPEND CMAKEMODULES_PATH ${PHYSX_ROOT_DIR}/source/compiler/cmake/modules)
40-
SET(CMAKE_MODULE_PATH ${CMAKEMODULES_PATH} CACHE INTERNAL "Path to CMakeModules")
41-
4244
IF(PX_CMAKE_SUPPRESS_REGENERATION)
4345
SET(CMAKE_SUPPRESS_REGENERATION true)
4446
ENDIF()

physx/dependencies.xml

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@
44
</dependency>
55

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

1010
<dependency name="PhysXDevice">
11-
<package name="PhysXDevice" version="18.12.7.4" platforms="vc15win64 vc16win64 vc17win64"/>
11+
<package name="PhysXDevice" version="18.12.7.4" platforms="vc15win64 vc16win64 vc17win64"/>
1212
</dependency>
1313

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

1818
<dependency name="PhysXGpu">
19-
<package name="PhysXGpu" version="105.0-5.2.498.33012328-public-signed" platforms="vc15win64 vc16win64 vc17win64 linux linux-aarch64"/>
19+
<package name="PhysXGpu" version="105.1-5.3.4207.33265367-windows-public" platforms="vc15win64 vc16win64 vc17win64"/>
20+
<package name="PhysXGpu" version="105.1-5.3.4207.33265367-linux-x86_64-public" platforms="linux"/>
21+
<package name="PhysXGpu" version="105.1-5.3.4207.33265367-linux-aarch64-public" platforms="linux-aarch64"/>
2022
</dependency>
2123

2224
<dependency name="opengllinux" tags="requiredForDistro">

physx/documentation/platformreadme/linux/README_LINUX.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,26 @@ Compilers:
2020

2121
## Generating Makefiles:
2222

23-
* Makefiles are generated through a script in physx root directory: generate_projects.sh
24-
* 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.
25-
* Supported presets for linux platform are: linux, linux-aarch64.
26-
* Generated solutions are in folder compiler/linux-debug, compiler/linux-checked, compiler/linux-profile, compiler/linux-release.
23+
* Makefiles are generated through a script in the physx root directory: generate_projects.sh
24+
* 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.
25+
* Generated solutions are placed in the folders compiler/linux-debug, compiler/linux-checked, compiler/linux-profile, compiler/linux-release.
2726

2827

2928
## Building SDK:
3029

3130
* Makefiles are in compiler/linux-debug etc
3231
* Clean solution: make clean
3332
* Build solution: make
33+
* Install solution: make install
3434

35+
Note:
36+
Compile errors on unsupported compilers or platforms are frequently caused by additional warnings that are treated as errors by default.
37+
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`.
3538

3639
## PhysX GPU Acceleration:
3740

38-
* 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).
39-
41+
* 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).
42+
* Note that CUDA is not required for building PhysX, it is only a runtime requirement for GPU-accelerated scenes.
4043

4144
## Required Packages for Building and Running PhysX Snippets:
4245

physx/include/PxActor.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class PxActor : public PxBase
358358
PX_INLINE PxActor(PxType concreteType, PxBaseFlags baseFlags) : PxBase(concreteType, baseFlags), userData(NULL) {}
359359
PX_INLINE PxActor(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
360360
virtual ~PxActor() {}
361-
virtual bool isKindOf(const char* name) const { return !::strcmp("PxActor", name) || PxBase::isKindOf(name); }
361+
virtual bool isKindOf(const char* name) const { PX_IS_KIND_OF(name, "PxActor", PxBase); }
362362

363363

364364
};

physx/include/PxAggregate.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ class PxAggregate : public PxBase
239239
PX_INLINE PxAggregate(PxType concreteType, PxBaseFlags baseFlags) : PxBase(concreteType, baseFlags), userData(NULL) {}
240240
PX_INLINE PxAggregate(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
241241
virtual ~PxAggregate() {}
242-
virtual bool isKindOf(const char* name) const { return !::strcmp("PxAggregate", name) || PxBase::isKindOf(name); }
242+
virtual bool isKindOf(const char* name) const { PX_IS_KIND_OF(name, "PxAggregate", PxBase); }
243243
};
244244

245245
#if !PX_DOXYGEN

0 commit comments

Comments
 (0)