From d11708e398c2f6377d9eac2b1f7248c62faab569 Mon Sep 17 00:00:00 2001 From: Sheikh Dawood Abdul Ajees Date: Tue, 25 Apr 2017 16:02:08 -0500 Subject: PhysX 3.4, APEX 1.4 patch release @22017166 --- .../PhysXAPI/files/PxTask_8h-source.html | 343 ++++++++++----------- 1 file changed, 166 insertions(+), 177 deletions(-) (limited to 'PhysX_3.4/Documentation/PhysXAPI/files/PxTask_8h-source.html') diff --git a/PhysX_3.4/Documentation/PhysXAPI/files/PxTask_8h-source.html b/PhysX_3.4/Documentation/PhysXAPI/files/PxTask_8h-source.html index c7b2530e..96b35df1 100644 --- a/PhysX_3.4/Documentation/PhysXAPI/files/PxTask_8h-source.html +++ b/PhysX_3.4/Documentation/PhysXAPI/files/PxTask_8h-source.html @@ -60,7 +60,7 @@ 00045 class PxBaseTask 00046 { 00047 public: -00048 PxBaseTask() : mEventID(0xFFFF), mProfileStat(0), mTm(0) {} +00048 PxBaseTask() : mContextID(0), mTm(NULL) {} 00049 virtual ~PxBaseTask() {} 00050 00057 virtual void run() = 0; @@ -71,189 +71,178 @@ 00071 virtual void removeReference() = 0; 00073 virtual int32_t getReference() const = 0; 00074 -00082 virtual void release() = 0; -00083 -00091 PX_INLINE void runProfiled(uint32_t threadId=0) -00092 { -00093 mTm->emitStartEvent(*this, threadId); -00094 run(); -00095 mTm->emitStopEvent(*this, threadId); -00096 } -00097 -00106 PX_INLINE void setProfileStat( uint16_t stat ) -00107 { -00108 mProfileStat = stat; -00109 } -00110 -00117 PX_INLINE PxTaskManager* getTaskManager() const -00118 { -00119 return mTm; -00120 } +00081 virtual void release() = 0; +00082 +00089 PX_FORCE_INLINE PxTaskManager* getTaskManager() const +00090 { +00091 return mTm; +00092 } +00093 +00094 PX_FORCE_INLINE void setContextId(PxU64 id) { mContextID = id; } +00095 PX_FORCE_INLINE PxU64 getContextId() const { return mContextID; } +00096 +00097 protected: +00098 PxU64 mContextID; +00099 PxTaskManager* mTm; +00100 +00101 friend class PxTaskMgr; +00102 }; +00103 +00104 +00111 class PxTask : public PxBaseTask +00112 { +00113 public: +00114 PxTask() : mTaskID(0) {} +00115 virtual ~PxTask() {} +00116 +00118 virtual void release() +00119 { +00120 PX_ASSERT(mTm); 00121 -00122 protected: -00123 uint16_t mEventID; -00124 uint16_t mProfileStat; -00125 PxTaskManager* mTm; -00126 -00127 friend class PxTaskMgr; -00128 }; -00129 -00130 -00137 class PxTask : public PxBaseTask -00138 { -00139 public: -00140 PxTask() : mTaskID(0) {} -00141 virtual ~PxTask() {} -00142 -00144 virtual void release() -00145 { -00146 PX_ASSERT(mTm); -00147 -00148 // clear mTm before calling taskCompleted() for safety -00149 PxTaskManager* save = mTm; -00150 mTm = NULL; -00151 save->taskCompleted( *this ); +00122 // clear mTm before calling taskCompleted() for safety +00123 PxTaskManager* save = mTm; +00124 mTm = NULL; +00125 save->taskCompleted( *this ); +00126 } +00127 +00129 // task is allowed to start. +00130 PX_INLINE void finishBefore( PxTaskID taskID ) +00131 { +00132 PX_ASSERT(mTm); +00133 mTm->finishBefore( *this, taskID); +00134 } +00135 +00137 // task has completed. +00138 PX_INLINE void startAfter( PxTaskID taskID ) +00139 { +00140 PX_ASSERT(mTm); +00141 mTm->startAfter( *this, taskID ); +00142 } +00143 +00148 PX_INLINE void addReference() +00149 { +00150 PX_ASSERT(mTm); +00151 mTm->addReference( mTaskID ); 00152 } 00153 -00155 // task is allowed to start. -00156 PX_INLINE void finishBefore( PxTaskID taskID ) -00157 { -00158 PX_ASSERT(mTm); -00159 mTm->finishBefore( *this, taskID); -00160 } -00161 -00163 // task has completed. -00164 PX_INLINE void startAfter( PxTaskID taskID ) -00165 { -00166 PX_ASSERT(mTm); -00167 mTm->startAfter( *this, taskID ); -00168 } -00169 -00174 PX_INLINE void addReference() -00175 { -00176 PX_ASSERT(mTm); -00177 mTm->addReference( mTaskID ); +00158 PX_INLINE void removeReference() +00159 { +00160 PX_ASSERT(mTm); +00161 mTm->decrReference( mTaskID ); +00162 } +00163 +00167 PX_INLINE int32_t getReference() const +00168 { +00169 return mTm->getReference( mTaskID ); +00170 } +00171 +00175 PX_INLINE PxTaskID getTaskID() const +00176 { +00177 return mTaskID; 00178 } 00179 -00184 PX_INLINE void removeReference() -00185 { -00186 PX_ASSERT(mTm); -00187 mTm->decrReference( mTaskID ); -00188 } -00189 -00193 PX_INLINE int32_t getReference() const -00194 { -00195 return mTm->getReference( mTaskID ); -00196 } -00197 -00201 PX_INLINE PxTaskID getTaskID() const -00202 { -00203 return mTaskID; -00204 } -00205 -00211 virtual void submitted() -00212 { -00213 mStreamIndex = 0; -00214 mPreSyncRequired = false; -00215 mProfileStat = 0; -00216 } -00217 -00221 PX_INLINE void requestSyncPoint() -00222 { -00223 mPreSyncRequired = true; -00224 } -00225 -00226 -00227 protected: -00228 PxTaskID mTaskID; -00229 uint32_t mStreamIndex; -00230 bool mPreSyncRequired; -00231 -00232 friend class PxTaskMgr; -00233 friend class PxGpuWorkerThread; -00234 }; +00185 virtual void submitted() +00186 { +00187 mStreamIndex = 0; +00188 mPreSyncRequired = false; +00189 } +00190 +00194 PX_INLINE void requestSyncPoint() +00195 { +00196 mPreSyncRequired = true; +00197 } +00198 +00199 +00200 protected: +00201 PxTaskID mTaskID; +00202 uint32_t mStreamIndex; +00203 bool mPreSyncRequired; +00204 +00205 friend class PxTaskMgr; +00206 friend class PxGpuWorkerThread; +00207 }; +00208 +00209 +00223 class PxLightCpuTask : public PxBaseTask +00224 { +00225 public: +00226 PxLightCpuTask() +00227 : mCont( NULL ) +00228 , mRefCount( 0 ) +00229 { +00230 } +00231 virtual ~PxLightCpuTask() +00232 { +00233 mTm = NULL; +00234 } 00235 -00236 -00250 class PxLightCpuTask : public PxBaseTask -00251 { -00252 public: -00253 PxLightCpuTask() -00254 : mCont( NULL ) -00255 , mRefCount( 0 ) -00256 { -00257 } -00258 virtual ~PxLightCpuTask() -00259 { -00260 mTm = NULL; -00261 } -00262 -00272 PX_INLINE void setContinuation(PxTaskManager& tm, PxBaseTask* c) -00273 { -00274 PX_ASSERT( mRefCount == 0 ); -00275 mRefCount = 1; -00276 mCont = c; -00277 mTm = &tm; -00278 if( mCont ) -00279 { -00280 mCont->addReference(); -00281 } -00282 } -00283 -00291 PX_INLINE void setContinuation( PxBaseTask* c ) -00292 { -00293 PX_ASSERT( c ); -00294 PX_ASSERT( mRefCount == 0 ); -00295 mRefCount = 1; -00296 mCont = c; -00297 if( mCont ) -00298 { -00299 mCont->addReference(); -00300 mTm = mCont->getTaskManager(); -00301 PX_ASSERT( mTm ); -00302 } -00303 } -00304 -00308 PX_INLINE PxBaseTask* getContinuation() const -00309 { -00310 return mCont; -00311 } -00312 -00317 PX_INLINE void removeReference() -00318 { -00319 mTm->decrReference(*this); -00320 } -00321 -00323 PX_INLINE int32_t getReference() const -00324 { -00325 return mRefCount; -00326 } +00245 PX_INLINE void setContinuation(PxTaskManager& tm, PxBaseTask* c) +00246 { +00247 PX_ASSERT( mRefCount == 0 ); +00248 mRefCount = 1; +00249 mCont = c; +00250 mTm = &tm; +00251 if( mCont ) +00252 { +00253 mCont->addReference(); +00254 } +00255 } +00256 +00264 PX_INLINE void setContinuation( PxBaseTask* c ) +00265 { +00266 PX_ASSERT( c ); +00267 PX_ASSERT( mRefCount == 0 ); +00268 mRefCount = 1; +00269 mCont = c; +00270 if( mCont ) +00271 { +00272 mCont->addReference(); +00273 mTm = mCont->getTaskManager(); +00274 PX_ASSERT( mTm ); +00275 } +00276 } +00277 +00281 PX_INLINE PxBaseTask* getContinuation() const +00282 { +00283 return mCont; +00284 } +00285 +00290 PX_INLINE void removeReference() +00291 { +00292 mTm->decrReference(*this); +00293 } +00294 +00296 PX_INLINE int32_t getReference() const +00297 { +00298 return mRefCount; +00299 } +00300 +00305 PX_INLINE void addReference() +00306 { +00307 mTm->addReference(*this); +00308 } +00309 +00315 PX_INLINE void release() +00316 { +00317 if( mCont ) +00318 { +00319 mCont->removeReference(); +00320 } +00321 } +00322 +00323 protected: +00324 +00325 PxBaseTask* mCont; +00326 volatile int32_t mRefCount; 00327 -00332 PX_INLINE void addReference() -00333 { -00334 mTm->addReference(*this); -00335 } -00336 -00342 PX_INLINE void release() -00343 { -00344 if( mCont ) -00345 { -00346 mCont->removeReference(); -00347 } -00348 } -00349 -00350 protected: -00351 -00352 PxBaseTask* mCont; -00353 volatile int32_t mRefCount; -00354 -00355 friend class PxTaskMgr; -00356 }; -00357 -00358 -00359 }// end physx namespace -00360 -00361 -00362 #endif // PXTASK_PXTASK_H +00328 friend class PxTaskMgr; +00329 }; +00330 +00331 +00332 }// end physx namespace +00333 +00334 +00335 #endif // PXTASK_PXTASK_H

-- cgit v1.2.3