Descriptor used to create a PxCudaContextManager. More...
#include <PxCudaContextManager.h>
Public Attributes | |
| CUcontext * | ctx |
| The CUDA context to manage. | |
| void * | graphicsDevice |
| D3D device pointer or OpenGl context handle. | |
| const char * | appGUID |
| Application-specific GUID. | |
| PxCudaInteropMode::Enum | interopMode |
| The CUDA/Graphics interop mode of this context. | |
| PxU32 | memoryBaseSize [PxCudaBufferMemorySpace::COUNT] |
| Size of persistent memory. | |
| PxU32 | memoryPageSize [PxCudaBufferMemorySpace::COUNT] |
| Size of memory pages. | |
| PxU32 | maxMemorySize [PxCudaBufferMemorySpace::COUNT] |
| Maximum size of memory that the memory manager will allocate. | |
Descriptor used to create a PxCudaContextManager.
| const char* physx::PxCudaContextManagerDesc::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.
| CUcontext* physx::PxCudaContextManagerDesc::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.
It is perfectly acceptable to allocate device or host pinned memory from the context outside the scope of the PxCudaMemoryManager, so long as you manage its eventual cleanup.
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.
The CUDA/Graphics interop mode of this context.
If ctx is NULL, this value describes the nature of the graphicsDevice pointer provided by the user. Else it describes the nature of the context provided by the user.
| PxU32 physx::PxCudaContextManagerDesc::memoryBaseSize[PxCudaBufferMemorySpace::COUNT] |
Size of persistent memory.
This memory is allocated up front and stays allocated until the PxCudaContextManager is released. Size is in bytes, has to be power of two and bigger than the page size. Set to 0 to only use dynamic pages.
Note: On Vista O/S and above, there is a per-memory allocation overhead to every CUDA work submission, so we recommend that you carefully tune this initial base memory size to closely approximate the amount of memory your application will consume.
| PxU32 physx::PxCudaContextManagerDesc::memoryPageSize[PxCudaBufferMemorySpace::COUNT] |
Size of memory pages.
The memory manager will dynamically grow and shrink in blocks multiple of this page size. Size has to be power of two and bigger than 0.