This class provides the interface to control memory budget and the number of SPUs used in a specific phase. More...
#include <PxPS3Config.h>
Static Public Member Functions | |
static PX_PHYSX_CORE_API bool | initialize (PxU32 simSpuCount, PxU32 querySpuCount=0) |
Initialize the SDK's SPU usage. More... | |
static PX_PHYSX_CORE_API void | setSceneParamInt (PxScene &scene, PxPS3ConfigParam::Enum param, PxU32 value) |
Sets the value of a parameter for the given scene. More... | |
static PX_PHYSX_CORE_API PxU32 | getSceneParamInt (PxScene &scene, PxPS3ConfigParam::Enum param) |
Returns the current value of a parameter for the given scene. More... | |
static PX_PHYSX_CORE_API void | getSpuMemBlockCounters (PxScene &scene, PxU32 &numNpContactStreamBlocks, PxU32 &numNpCacheBlocks, PxU32 &numDyFrictionBlocks, PxU32 &numDyConstraintBlocks) |
Returns a recommendation for SPU memory block settings. More... | |
This class provides the interface to control memory budget and the number of SPUs used in a specific phase.
|
static |
Returns the current value of a parameter for the given scene.
[in] | scene | A pointer to the PxScene. |
[in] | param | The parameter whose value will be returned. |
|
static |
Returns a recommendation for SPU memory block settings.
[in] | scene | A pointer to the PxScene. |
[out] | numNpContactStreamBlocks | The minimal recommended value for eMEM_CONTACT_STREAM_BLOCKS used in narrow phase. |
[out] | numNpCacheBlocks | The minimal recommended value for eMEM_NP_CACHE_BLOCKS used in narrow phase. |
[out] | numDyFrictionBlocks | The minimal recommended value for eMEM_FRICTION_BLOCKS used in the solver. |
[out] | numDyConstraintBlocks | The minimal recommended value for eMEM_CONSTRAINT_BLOCKS used in the solver. |
|
static |
Initialize the SDK's SPU usage.
By default the PhysX SDK will not use any SPU resources.
Use this method after the SDK has been created to enable SPU use, the counts provide an upper bound on the number of SPUs used for all SPU tasks.
The number of SPUs used per stage can be set on the scene after its creation with setSceneParamInt().
[in] | simSpuCount | Number of SPUs to use simultaneously for simulation tasks. |
[in] | querySpuCount | Ignored. See the Migration Guide, section "SPU batch queries" for more details about how to use SPU batched queries. |
|
static |
Sets the value of a parameter for the given scene.
for eSPU parameters, value is the number of initialized SPUs to use in a phase. a value of 0 reverts the phase to PPU execution.
for eMEM parameters, value is the number of reserved 16kB memory blocks for SPU execution.
[in] | scene | A pointer to the PxScene. |
[in] | param | The parameter to set. |
[in] | value | The value to set the parameter to. |