17 #define DTPROFILE_TRACYCOLOR_BALLISTICS 0x00bfff
18 #define DTPROFILE_TRACYCOLOR_SILVERLINING 0x0b8bf8
19 #define DTPROFILE_TRACYCOLOR_TRITON 0x123f7b
20 #define DTPROFILE_TRACYCOLOR_SPEEDTREE 0x0f502d
21 #define DTPROFILE_TRACYCOLOR_INDIRECT 0x3333cc
22 #define DTPROFILE_TRACYCOLOR_LIGHTING 0xffaa00
23 #define DTPROFILE_TRACYCOLOR_POSTEFFECT 0xffb31a
24 #define DTPROFILE_TRACYCOLOR_VIRTUALREALITY 0xa3297a
25 #define DTPROFILE_TRACYCOLOR_GLCONTEXT 0xe68a00
26 #define DTPROFILE_TRACYCOLOR_RENDERER 0x0b9900
49 #include <optick/optick.h>
53 #define DtPROFILE(name) OPTICK_EVENT(name); DtPROFILE_X(name, __LINE__);
54 #define DtPROFILEC(name, color) OPTICK_EVENT(name); DtPROFILE_X(name, __LINE__);
55 #define DtPROFILE_SECTION(name) {OPTICK_EVENT(name); makVrv::DtProfileSample _profileSample(name);
57 #define DtProfilerFrameMark OPTICK_FRAME("MainThread")
58 #define DtProfilerThreadName(name) OPTICK_THREAD(name);
59 #define DtProfilerMessage(str, stringLen)
61 #define DtProfilerPlot(x,y)
62 #define DtProfilerText(text)
70 #include <tracy/MAKTracyDefines.h>
71 #include <tracy/Tracy.hpp>
72 #include <client/TracyProfiler.hpp>
78 #define DtPROFILEzone ZoneNamedS(___tracy_scoped_zone, makVrv::DtProfileManager::tracyCallstackDepth(), makVrv::DtProfileManager::collectTracyStats());
79 #define DtPROFILE(name) ZoneNamedNS(___tracy_scoped_zone, name, makVrv::DtProfileManager::tracyCallstackDepth(), makVrv::DtProfileManager::collectTracyStats()); DtPROFILE_X(name, __LINE__);
80 #define DtPROFILEC(name, color) ZoneNamedNCS(___tracy_scoped_zone, name, color, makVrv::DtProfileManager::tracyCallstackDepth(), makVrv::DtProfileManager::collectTracyStats()); DtPROFILE_X(name, __LINE__);
81 #define DtPROFILE_SECTION(name) {ZoneNamedNS(___tracy_scoped_zone, name, makVrv::DtProfileManager::tracyCallstackDepth(), makVrv::DtProfileManager::collectTracyStats()); makVrv::DtProfileSample _profileSample(name);
83 #define DtProfilerFrameMark if(makVrv::DtProfileManager::tracyProfilerInitialized()) { FrameMark; }
84 #define DtProfilerPlot(x,y) if (makVrv::DtProfileManager::collectTracyStats()) TracyPlot(x,y)
85 #define DtProfilerThreadName(name) tracy::SetThreadName(name );
86 #define DtProfilerMessage(str, stringLen) TracyMessage(str, stringLen)
87 #define DtProfilerText(text) _zoneSetText(___tracy_scoped_zone, text)
89 inline void _zoneSetText(tracy::ScopedZone& zone,
const char* text) {
90 zone.Text(text, strlen(text));
92 inline void _zoneSetText(tracy::ScopedZone& zone,
const std::string& text) {
93 zone.Text(text.c_str(), text.size());
96 #define DtProfilerName(text) _zoneSetName(___tracy_scoped_zone, text)
98 inline void _zoneSetName(tracy::ScopedZone& zone,
const char* text)
100 zone.Name(text, strlen(text));
102 inline void _zoneSetName(tracy::ScopedZone& zone,
const std::string& text)
104 zone.Name(text.c_str(), text.size());
111 #define DtPROFILE(name) DtPROFILE_X(name, __LINE__);
112 #define DtPROFILEC(name, color) DtPROFILE_X(name, __LINE__);
113 #define DtPROFILE_SECTION(name) {makVrv::DtProfileSample _profileSample(name);
114 #define DtPROFILEzone DtPROFILE_X(__func__, __LINE__);
116 #define DtProfilerFrameMark
117 #define DtProfilerThreadName(name)
118 #define DtProfilerPlot(x,y)
119 #define DtProfilerMessage(str, stringLen)
120 #define DtProfilerText(text)
123 #define DtPROFILE_RESTRICTED(name, target) makVrv::DtProfileTarget<target> _profileTarget##line(name);
125 #define DtPROFILE_X(name, line) DtPROFILE_ACTUAL(name, line)
126 #define DtPROFILE_ACTUAL(name, line) makVrv::DtProfileSample _profileSample##line(name);
128 #define DtPROFILE_SECTION_END }
130 #define DtPERFORMANCE_STAT(name) DtPERFORMANCE_STAT_X(name, __LINE__)
131 #define DtPERFORMANCE_STAT_X(name, line) DtPERFORMANCE_STAT_ACTUAL(name, line)
132 #define DtPERFORMANCE_STAT_ACTUAL(name, line) makVrv::DtPerfomanceStatSample _performanceStatSample##line(name);
170 template <
bool Enabled>
const bool Profile_DtOsgCullVisitor
Definition: DtProfiler.h:140
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
DtProfileTarget is used to start/stop a profiled section It is preferable to use the macro at the top...
Definition: DtProfiler.h:171
DtProfileSampleClass is used to start/stop a profiled section It is preferable to use the macro at th...
Definition: DtProfiler.h:196
void _zoneSetName(tracy::ScopedZone &zone, const char *text)
Definition: DtProfiler.h:98
static void startProfile(const char *name)
begin a profile. This function is thread safe
DtProfileSample(const char *name)
CTOR starts profile section.
Definition: DtProfiler.h:154
const bool Profile_DtSurfaceClampingUpdater
Definition: DtProfiler.h:139
~DtPerfomanceStatSample()
DTOR stops profile section.
Definition: DtProfiler.h:206
DtProfileTarget(const char *name)
CTOR starts profile section.
Definition: DtProfiler.h:180
DtProfileSampleClass is used to start/stop a profiled section It is preferable to use the macro at th...
Definition: DtProfiler.h:150
void _zoneSetText(tracy::ScopedZone &zone, const char *text)
Definition: DtProfiler.h:89
Contains DLL export macros.
const bool Profile_DtSceneObjectUpdater
Definition: DtProfiler.h:138
void DT_DLL_VRVUTIL SetThreadName(const char *name)
~DtProfileTarget()
DTOR stops profile section.
Definition: DtProfiler.h:186
static void stopPerformanceStat()
begin stop a profile. This function is thread safe
DtProfileTarget(const char *name)
Definition: DtProfiler.h:173
static void startPerformanceStat(const char *name)
begin a performance stat. This function is thread safe
DtPerfomanceStatSample(const char *name)
CTOR starts profile section.
Definition: DtProfiler.h:200
~DtProfileSample()
DTOR stops profile section.
Definition: DtProfiler.h:160
static void stopProfile()
begin stop a profile. This function is thread safe