diff options
| author | Marijn Tamis <[email protected]> | 2017-07-03 11:49:08 +0200 |
|---|---|---|
| committer | Marijn Tamis <[email protected]> | 2017-07-03 11:49:08 +0200 |
| commit | cfa944ded7370fb5f22b1fb894ecf6b9bd3f7381 (patch) | |
| tree | 5cc014922d20561d87105d279b6f7eb3e628c6d9 /PxShared/include/task | |
| parent | Fix windows line endings in github. (diff) | |
| download | nvcloth-1.1.1.tar.xz nvcloth-1.1.1.zip | |
NvCloth 1.1.1 Release. (22392725)v1.1.1
Diffstat (limited to 'PxShared/include/task')
| -rw-r--r-- | PxShared/include/task/PxTask.h | 39 | ||||
| -rw-r--r-- | PxShared/include/task/PxTaskManager.h | 3 |
2 files changed, 6 insertions, 36 deletions
diff --git a/PxShared/include/task/PxTask.h b/PxShared/include/task/PxTask.h index 2761109..85d91da 100644 --- a/PxShared/include/task/PxTask.h +++ b/PxShared/include/task/PxTask.h @@ -45,7 +45,7 @@ namespace physx class PxBaseTask { public: - PxBaseTask() : mEventID(0xFFFF), mProfileStat(0), mTm(0) {} + PxBaseTask() : mContextID(0), mTm(NULL) {} virtual ~PxBaseTask() {} /** @@ -78,50 +78,24 @@ public: * references to it - so it may safely run its destructor, recycle itself, etc. * provided no additional user references to the task exist */ - virtual void release() = 0; - /** - * \brief Execute user run method with wrapping profiling events. - * - * Optional entry point for use by CpuDispatchers. - * - * \param[in] threadId The threadId of the thread that executed the task. - */ - PX_INLINE void runProfiled(uint32_t threadId=0) - { - mTm->emitStartEvent(*this, threadId); - run(); - mTm->emitStopEvent(*this, threadId); - } - - /** - * \brief Specify stop event statistic - * - * If called before or while the task is executing, the given value - * will appear in the task's event bar in the profile viewer - * - * \param[in] stat The stat to signal when the task is finished - */ - PX_INLINE void setProfileStat( uint16_t stat ) - { - mProfileStat = stat; - } - /** * \brief Return PxTaskManager to which this task was submitted * * Note, can return NULL if task was not submitted, or has been * completed. */ - PX_INLINE PxTaskManager* getTaskManager() const + PX_FORCE_INLINE PxTaskManager* getTaskManager() const { return mTm; } + PX_FORCE_INLINE void setContextId(PxU64 id) { mContextID = id; } + PX_FORCE_INLINE PxU64 getContextId() const { return mContextID; } + protected: - uint16_t mEventID; //!< Registered profile event ID - uint16_t mProfileStat; //!< Profiling statistic + PxU64 mContextID; //!< Context ID for profiler interface PxTaskManager* mTm; //!< Owning PxTaskManager instance friend class PxTaskMgr; @@ -212,7 +186,6 @@ public: { mStreamIndex = 0; mPreSyncRequired = false; - mProfileStat = 0; } /** diff --git a/PxShared/include/task/PxTaskManager.h b/PxShared/include/task/PxTaskManager.h index f6f29c4..f40f7b1 100644 --- a/PxShared/include/task/PxTaskManager.h +++ b/PxShared/include/task/PxTaskManager.h @@ -215,9 +215,6 @@ protected: virtual void decrReference(PxLightCpuTask&) = 0; virtual void addReference(PxLightCpuTask&) = 0; - virtual void emitStartEvent(PxBaseTask&, uint32_t threadId=0) = 0; - virtual void emitStopEvent(PxBaseTask&, uint32_t threadId=0) = 0; - /*! \endcond */ friend class PxBaseTask; |