PxCudaContextManagerDesc
Defined in include/cudamanager/PxCudaContextManager.h
-
class PxCudaContextManagerDesc
Descriptor used to create a PxCudaContextManager.
Public Functions
-
inline PxCudaContextManagerDesc()
Public Members
-
CUcontext *ctx
The CUDA context to manage.
If left NULL, the PxCudaContextManager will create a new context. If graphicsDevice is also not NULL, this new CUDA context will be bound to that graphics device, enabling the use of CUDA/Graphics interop features.
If ctx is not NULL, the specified context must be applied to the thread that is allocating the PxCudaContextManager at creation time (aka, it cannot be popped). The PxCudaContextManager will take ownership of the context until the manager is released. All access to the context must be gated by lock acquisition.
If the user provides a context for the PxCudaContextManager, the context must have either been created on the GPU ordinal returned by PxGetSuggestedCudaDeviceOrdinal() or on your graphics device.
-
void *graphicsDevice
D3D device pointer or OpenGl context handle.
Only applicable when ctx is NULL, thus forcing a new context to be created. In that case, the created context will be bound to this graphics device.
-
PxI32 deviceOrdinal
CUDA device ordinal.
Only applicable when ctx is NULL, thus forcing a new context to be created based on the CUDA device ordinal. The first CUDA device will have an ordinal value of 0 and so on. If the CUDA device ordinal is -1, the device selected will be queried from PhysX settings in the NVIDIA Control Panel. Note: The NVIDIA Control Panel is only supported on Windows.
-
const char *appGUID
Application-specific GUID.
If your application employs PhysX modules that use CUDA you need to use a GUID so that patches for new architectures can be released for your game.You can obtain a GUID for your application from Nvidia.
-
PxDeviceAllocatorCallback *deviceAllocator
Application-specific device memory allocator.
the application can implement an device memory allocator, which inherites PxDeviceAllocatorCallback, and pass that to the PxCudaContextManagerDesc. The SDK will use that allocator to allocate device memory instead of using the defaul CUDA device memory allocator.
-
inline PxCudaContextManagerDesc()