aboutsummaryrefslogtreecommitdiff
path: root/sdk/extensions/physx/include
diff options
context:
space:
mode:
authorAnton Novoselov <[email protected]>2017-08-14 16:41:28 +0300
committerAnton Novoselov <[email protected]>2017-08-14 16:41:28 +0300
commit9a1c1d814f3fa0b54b49d90b43130c02bc280f44 (patch)
treeeae6ead883173c66619c30b6a1ed085f3cb70f4d /sdk/extensions/physx/include
parentUpdated to CL 22627414: (diff)
downloadblast-9a1c1d814f3fa0b54b49d90b43130c02bc280f44.tar.xz
blast-9a1c1d814f3fa0b54b49d90b43130c02bc280f44.zip
Updated to CL 22661993:
* docs updates * authoring fixes * asset view in sample fix * latest blast_tools_and_samples-windows.zip
Diffstat (limited to 'sdk/extensions/physx/include')
-rw-r--r--sdk/extensions/physx/include/NvBlastExtCustomProfiler.h20
-rw-r--r--sdk/extensions/physx/include/NvBlastExtPxTask.h17
2 files changed, 32 insertions, 5 deletions
diff --git a/sdk/extensions/physx/include/NvBlastExtCustomProfiler.h b/sdk/extensions/physx/include/NvBlastExtCustomProfiler.h
index 4130964..e879d03 100644
--- a/sdk/extensions/physx/include/NvBlastExtCustomProfiler.h
+++ b/sdk/extensions/physx/include/NvBlastExtCustomProfiler.h
@@ -68,11 +68,22 @@ static thread_local ExtProfileData th_ProfileData[PROFILER_MAX_NESTED_DEPTH];
static thread_local int32_t th_depth = 0;
#endif
+
+/**
+Implements Nv::Blast::ProfilerCallback to serve the physx::PxProfilerCallback set in PxFoundation
+for PhysX Visual Debugger support and platform specific profilers like NVIDIA(R) NSight(TM).
+*/
class ExtCustomProfiler : public ProfilerCallback
{
public:
+ /**
+ Construct an ExtCustomProfiler with platform specific profiler signals disabled.
+ */
ExtCustomProfiler() : m_platformEnabled(false) {}
+
+ ////// ProfilerCallback interface //////
+
virtual void zoneStart(const char* name) override
{
@@ -127,6 +138,13 @@ public:
}
+ ////// local interface //////
+
+ /**
+ Enable or disable platform specific profiler signals. Disabled by default.
+
+ \param[in] enabled true enables, false disables platform profiler calls.
+ */
void setPlatformEnabled(bool enabled)
{
m_platformEnabled = enabled;
@@ -140,4 +158,4 @@ private:
} // namespace Nv
-#endif
+#endif // NVBLASTDEFAULTPROFILER_H
diff --git a/sdk/extensions/physx/include/NvBlastExtPxTask.h b/sdk/extensions/physx/include/NvBlastExtPxTask.h
index b692ce8..739828c 100644
--- a/sdk/extensions/physx/include/NvBlastExtPxTask.h
+++ b/sdk/extensions/physx/include/NvBlastExtPxTask.h
@@ -58,11 +58,13 @@ protected:
virtual ~ExtGroupTaskManager() {}
public:
- static ExtGroupTaskManager* create(physx::PxTaskManager&);
- static ExtGroupTaskManager* create(physx::PxTaskManager&, TkGroup&);
+ /**
+ Construct using existing physx::PxTaskManager and TkGroup. The TkGroup can be set later with setGroup().
+ */
+ static ExtGroupTaskManager* create(physx::PxTaskManager&, TkGroup* = nullptr);
/**
- Change the group to process. Cannot be changed while the group being processed.
+ Set the group to process. Cannot be changed while a group being processed.
*/
virtual void setGroup(TkGroup*) = 0;
@@ -75,12 +77,19 @@ public:
\param[in] workerCount The number of worker tasks to start,
0 uses the dispatcher's worker thread count.
+
\return The number of worker tasks started.
+ If 0, processing did not start and wait() will never return true.
*/
virtual uint32_t process(uint32_t workerCount = 0) = 0;
/**
- Wait for the group to end processing.
+ Wait for the group to end processing. When processing has finished, TkGroup::endProcess is executed.
+
+ \param[in] block true: does not return until the group has been processed.
+ false: return immediately if workers are still processing the group.
+
+ \return true if group processing was completed (and the group was actually processing)
*/
virtual bool wait(bool block = true) = 0;