aboutsummaryrefslogtreecommitdiff
path: root/NvBlast/test/src/utils/TestProfiler.h
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2017-02-21 12:07:59 -0800
committerBryan Galdrikian <[email protected]>2017-02-21 12:07:59 -0800
commit446ce137c6823ba9eff273bdafdaf266287c7c98 (patch)
treed20aab3e2ed08d7b3ca71c2f40db6a93ea00c459 /NvBlast/test/src/utils/TestProfiler.h
downloadblast-1.0.0-beta.tar.xz
blast-1.0.0-beta.zip
first commitv1.0.0-beta
Diffstat (limited to 'NvBlast/test/src/utils/TestProfiler.h')
-rw-r--r--NvBlast/test/src/utils/TestProfiler.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/NvBlast/test/src/utils/TestProfiler.h b/NvBlast/test/src/utils/TestProfiler.h
new file mode 100644
index 0000000..318e6e6
--- /dev/null
+++ b/NvBlast/test/src/utils/TestProfiler.h
@@ -0,0 +1,27 @@
+#ifndef TESTPROFILER_H
+#define TESTPROFILER_H
+
+#include "NvBlastPreprocessor.h"
+
+#if NV_NVTX
+#include "nvToolsExt.h"
+NV_INLINE void platformZoneStart(const char* name) { nvtxRangePush(name); }
+NV_INLINE void platformZoneEnd(const char*) { nvtxRangePop(); }
+
+#elif NV_XBOXONE
+#define NOMINMAX
+#include "xboxone/NvBlastProfilerXB1.h"
+
+#elif NV_PS4
+#include "ps4/NvBlastProfilerPS4.h"
+
+#else
+NV_INLINE void platformZoneStart(const char*) { }
+NV_INLINE void platformZoneEnd(const char*) { }
+
+#endif
+
+#define TEST_ZONE_BEGIN(name) platformZoneStart(name)
+#define TEST_ZONE_END(name) platformZoneEnd(name)
+
+#endif // TESTPROFILER_H