diff options
| author | sschirm <[email protected]> | 2016-12-23 14:20:36 +0100 |
|---|---|---|
| committer | sschirm <[email protected]> | 2016-12-23 14:56:17 +0100 |
| commit | ef6937e69e8ee3f409cf9d460d5ad300a65d5924 (patch) | |
| tree | 710426e8daa605551ce3f34b581897011101c30f /PxShared/include | |
| parent | Initial commit: (diff) | |
| download | physx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.tar.xz physx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.zip | |
PhysX 3.4 / APEX 1.4 release candidate @21506124
Diffstat (limited to 'PxShared/include')
| -rw-r--r-- | PxShared/include/cudamanager/PxCudaContextManager.h | 7 | ||||
| -rw-r--r-- | PxShared/include/foundation/PxMemory.h | 2 | ||||
| -rw-r--r-- | PxShared/include/foundation/unix/PxUnixIntrinsics.h | 2 | ||||
| -rw-r--r-- | PxShared/include/foundation/windows/PxWindowsIntrinsics.h | 2 | ||||
| -rw-r--r-- | PxShared/include/pvd/PxPvd.h | 62 |
5 files changed, 42 insertions, 33 deletions
diff --git a/PxShared/include/cudamanager/PxCudaContextManager.h b/PxShared/include/cudamanager/PxCudaContextManager.h index 8e84b3b4..0f8afc39 100644 --- a/PxShared/include/cudamanager/PxCudaContextManager.h +++ b/PxShared/include/cudamanager/PxCudaContextManager.h @@ -42,6 +42,7 @@ /* Forward decl to avoid inclusion of cuda.h */ typedef struct CUctx_st *CUcontext; typedef struct CUgraphicsResource_st *CUgraphicsResource; +typedef int CUdevice; namespace physx { @@ -242,6 +243,11 @@ public: */ virtual void releaseContext() = 0; + /** + * \brief Return the CUcontext + */ + virtual CUcontext getContext() = 0; + /** * \brief Return the PxCudaMemoryManager instance associated with this * CUDA context @@ -289,6 +295,7 @@ public: virtual int getSharedMemPerMultiprocessor() const = 0; //!< returns total amount of shared memory available per multiprocessor in bytes virtual unsigned int getMaxThreadsPerBlock() const = 0; //!< returns the maximum number of threads per block virtual const char *getDeviceName() const = 0; //!< returns device name retrieved from driver + virtual CUdevice getDevice() const = 0; //!< returns device handle retrieved from driver virtual PxCudaInteropMode::Enum getInteropMode() const = 0; //!< interop mode the context was created with virtual void setUsingConcurrentStreams(bool) = 0; //!< turn on/off using concurrent streams for GPU work diff --git a/PxShared/include/foundation/PxMemory.h b/PxShared/include/foundation/PxMemory.h index 9bf108cc..845f1b6c 100644 --- a/PxShared/include/foundation/PxMemory.h +++ b/PxShared/include/foundation/PxMemory.h @@ -81,7 +81,7 @@ PX_FORCE_INLINE void* PxMemSet(void* dest, PxI32 c, PxU32 count) \return Pointer to destination memory block */ -PX_FORCE_INLINE void* PxMemCopy(void* dest, const void* src, PxU32 count) +PX_FORCE_INLINE void* PxMemCopy(void* PX_RESTRICT dest, const void* PX_RESTRICT src, PxU32 count) { return physx::intrinsics::memCopy(dest, src, count); } diff --git a/PxShared/include/foundation/unix/PxUnixIntrinsics.h b/PxShared/include/foundation/unix/PxUnixIntrinsics.h index 7c0916f0..14bd18a6 100644 --- a/PxShared/include/foundation/unix/PxUnixIntrinsics.h +++ b/PxShared/include/foundation/unix/PxUnixIntrinsics.h @@ -153,7 +153,7 @@ PX_FORCE_INLINE void* memSet(void* dest, int32_t c, uint32_t count) /*! Copies \c count bytes from \c src to \c dst. User memMove if regions overlap. */ -PX_FORCE_INLINE void* memCopy(void* dest, const void* src, uint32_t count) +PX_FORCE_INLINE void* memCopy(void* PX_RESTRICT dest, const void* PX_RESTRICT src, uint32_t count) { return memcpy(dest, src, count); } diff --git a/PxShared/include/foundation/windows/PxWindowsIntrinsics.h b/PxShared/include/foundation/windows/PxWindowsIntrinsics.h index bff41375..7e27ede4 100644 --- a/PxShared/include/foundation/windows/PxWindowsIntrinsics.h +++ b/PxShared/include/foundation/windows/PxWindowsIntrinsics.h @@ -158,7 +158,7 @@ PX_FORCE_INLINE void* memSet(void* dest, int32_t c, uint32_t count) /*! Copies \c count bytes from \c src to \c dst. User memMove if regions overlap. */ -PX_FORCE_INLINE void* memCopy(void* dest, const void* src, uint32_t count) +PX_FORCE_INLINE void* memCopy(void* PX_RESTRICT dest, const void* PX_RESTRICT src, uint32_t count) { return memcpy(dest, src, count); } diff --git a/PxShared/include/pvd/PxPvd.h b/PxShared/include/pvd/PxPvd.h index 0ed17fde..ecacf5a6 100644 --- a/PxShared/include/pvd/PxPvd.h +++ b/PxShared/include/pvd/PxPvd.h @@ -67,47 +67,49 @@ struct PxPvdInstrumentationFlag enum Enum { /** - \brief Send debugging information to PVD. + \brief Send debugging information to PVD. - This information is the actual object data - of the rigid statics, shapes, articulations, etc. Sending this information has - a noticeable impact on performance and thus this flag should not be set - if you want an accurate performance profile. + This information is the actual object data of the rigid statics, shapes, + articulations, etc. Sending this information has a noticeable impact on + performance and thus this flag should not be set if you want an accurate + performance profile. */ eDEBUG = 1 << 0, + /** - \brief Send profile information to PVD. + \brief Send profile information to PVD. - This information populates PVD's profile view. It has (at this time) negligible cost - compared to Debug information and makes PVD *much* more useful so it is quite - highly recommended. + This information populates PVD's profile view. It has (at this time) negligible + cost compared to Debug information and makes PVD *much* more useful so it is quite + highly recommended. - This flag works together with a PxCreatePhysics parameter. - Using it allows the SDK to send profile - events to PVD. + This flag works together with a PxCreatePhysics parameter. + Using it allows the SDK to send profile events to PVD. */ ePROFILE = 1 << 1, + /** - \brief Send memory information to PVD. - - The PVD sdk side hooks into the Foundation memory controller and listens to - allocation/deallocation events. This has a noticable hit on the first frame, - however, this data is somewhat compressed and the PhysX SDK doesn't allocate much - once it hits a steady state. This information also has a fairly negligible - impact and thus is also highly recommended. - - This flag works together with a PxCreatePhysics parameter, - trackOutstandingAllocations. Using both of them together allows users to have - an accurate view of the overall memory usage of the simulation at the cost of - a hashtable lookup per allocation/deallocation. Again, PhysX makes a best effort - attempt not to allocate or deallocate during simulation so this hashtable lookup - tends to have no effect past the first frame. - - Sending memory information without tracking outstanding allocations means that - PVD will accurate information about the state of the memory system before the - actual connection happened. + \brief Send memory information to PVD. + + The PVD sdk side hooks into the Foundation memory controller and listens to + allocation/deallocation events. This has a noticable hit on the first frame, + however, this data is somewhat compressed and the PhysX SDK doesn't allocate much + once it hits a steady state. This information also has a fairly negligible + impact and thus is also highly recommended. + + This flag works together with a PxCreatePhysics parameter, + trackOutstandingAllocations. Using both of them together allows users to have + an accurate view of the overall memory usage of the simulation at the cost of + a hashtable lookup per allocation/deallocation. Again, PhysX makes a best effort + attempt not to allocate or deallocate during simulation so this hashtable lookup + tends to have no effect past the first frame. + + Sending memory information without tracking outstanding allocations means that + PVD will accurate information about the state of the memory system before the + actual connection happened. */ eMEMORY = 1 << 2, + eALL = (eDEBUG | ePROFILE | eMEMORY) }; }; |