Skip to content

Commit

Permalink
expose collision stack size
Browse files Browse the repository at this point in the history
  • Loading branch information
fbxiang committed Aug 14, 2024
1 parent f3ca041 commit 72ae940
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion include/sapien/physx/physx_default.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ class PhysxDefault {
uint32_t maxRigidPatchCount, uint32_t heapCapacity,
uint32_t foundLostPairsCapacity,
uint32_t foundLostAggregatePairsCapacity,
uint32_t totalAggregatePairsCapacity);
uint32_t totalAggregatePairsCapacity,
uint32_t collisionStackSize);
static ::physx::PxgDynamicsMemoryConfig const &getGpuMemoryConfig();

static void setSceneConfig(Vec3 gravity, float bounceThreshold, bool enablePCM, bool enableTGS,
Expand Down
3 changes: 2 additions & 1 deletion python/pybind/physx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,8 @@ set some motion axes of the dynamic rigid body to be locked
py::arg("heap_capacity") = 64 * 1024 * 1024,
py::arg("found_lost_pairs_capacity") = 256 * 1024,
py::arg("found_lost_aggregate_pairs_capacity") = 1024,
py::arg("total_aggregate_pairs_capacity") = 1024)
py::arg("total_aggregate_pairs_capacity") = 1024,
py::arg("collision_stack_size") = 64 * 64 * 1024)

.def("set_scene_config",
py::overload_cast<Vec3, float, bool, bool, bool, bool, bool, uint32_t>(
Expand Down
4 changes: 3 additions & 1 deletion src/physx/physx_default.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,16 @@ void PhysxDefault::setGpuMemoryConfig(uint32_t tempBufferCapacity, uint32_t maxR
uint32_t maxRigidPatchCount, uint32_t heapCapacity,
uint32_t foundLostPairsCapacity,
uint32_t foundLostAggregatePairsCapacity,
uint32_t totalAggregatePairsCapacity) {
uint32_t totalAggregatePairsCapacity,
uint32_t collisionStackSize) {
gGpuMemoryConfig.tempBufferCapacity = tempBufferCapacity;
gGpuMemoryConfig.maxRigidContactCount = maxRigidContactCount;
gGpuMemoryConfig.maxRigidPatchCount = maxRigidPatchCount;
gGpuMemoryConfig.heapCapacity = heapCapacity;
gGpuMemoryConfig.foundLostPairsCapacity = foundLostPairsCapacity;
gGpuMemoryConfig.foundLostAggregatePairsCapacity = foundLostAggregatePairsCapacity;
gGpuMemoryConfig.totalAggregatePairsCapacity = totalAggregatePairsCapacity;
gGpuMemoryConfig.collisionStackSize = collisionStackSize;
}

::physx::PxgDynamicsMemoryConfig const &PhysxDefault::getGpuMemoryConfig() {
Expand Down

0 comments on commit 72ae940

Please sign in to comment.