From 446ce137c6823ba9eff273bdafdaf266287c7c98 Mon Sep 17 00:00:00 2001 From: Bryan Galdrikian Date: Tue, 21 Feb 2017 12:07:59 -0800 Subject: first commit --- NvBlast/test/src/utils/TestProfiler.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 NvBlast/test/src/utils/TestProfiler.h (limited to 'NvBlast/test/src/utils/TestProfiler.h') 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 -- cgit v1.2.3