diff options
Diffstat (limited to 'NvBlast/test/src/utils/TestProfiler.h')
| -rw-r--r-- | NvBlast/test/src/utils/TestProfiler.h | 27 |
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 |