17 #define DTPROFILE_TRACYCOLOR_SILVERLINING 0x0b8bf8
18 #define DTPROFILE_TRACYCOLOR_TRITON 0x123f7b
19 #define DTPROFILE_TRACYCOLOR_SPEEDTREE 0x0f502d
20 #define DTPROFILE_TRACYCOLOR_INDIRECT 0x3333cc
21 #define DTPROFILE_TRACYCOLOR_LIGHTING 0xffaa00
22 #define DTPROFILE_TRACYCOLOR_POSTEFFECT 0xffb31a
23 #define DTPROFILE_TRACYCOLOR_VIRTUALREALITY 0xa3297a
24 #define DTPROFILE_TRACYCOLOR_GLCONTEXT 0xe68a00
25 #define DTPROFILE_TRACYCOLOR_RENDERER 0xb990000
48 #include <optick/optick.h>
52 #define DtPROFILE(name) OPTICK_EVENT(name); DtPROFILE_X(name, __LINE__);
53 #define DtPROFILEC(name, color) OPTICK_EVENT(name); DtPROFILE_X(name, __LINE__);
54 #define DtPROFILE_SECTION(name) {OPTICK_EVENT(name); makVrv::DtProfileSample _profileSample(name);
56 #define DtProfilerFrameMark OPTICK_FRAME("MainThread")
57 #define DtProfilerThreadName(name) OPTICK_THREAD(name);
58 #define DtProfilerMessage(str, stringLen)
60 #define DtProfilerPlot(x,y)
61 #define DtProfilerText(text)
69 #include <tracy/MAKTracyDefines.h>
70 #include <tracy/Tracy.hpp>
71 #include <client/TracyProfiler.hpp>
77 #define DtPROFILEzone ZoneNamedS(___tracy_scoped_zone, makVrv::DtProfileManager::tracyCallstackDepth(), makVrv::DtProfileManager::collectTracyStats());
78 #define DtPROFILE(name) ZoneNamedNS(___tracy_scoped_zone, name, makVrv::DtProfileManager::tracyCallstackDepth(), makVrv::DtProfileManager::collectTracyStats()); DtPROFILE_X(name, __LINE__);
79 #define DtPROFILEC(name, color) ZoneNamedNCS(___tracy_scoped_zone, name, color, makVrv::DtProfileManager::tracyCallstackDepth(), makVrv::DtProfileManager::collectTracyStats()); DtPROFILE_X(name, __LINE__);
80 #define DtPROFILE_SECTION(name) {ZoneNamedNS(___tracy_scoped_zone, name, makVrv::DtProfileManager::tracyCallstackDepth(), makVrv::DtProfileManager::collectTracyStats()); makVrv::DtProfileSample _profileSample(name);
82 #define DtProfilerFrameMark if(makVrv::DtProfileManager::tracyProfilerInitialized()) { FrameMark; }
83 #define DtProfilerPlot(x,y) TracyPlot(x,y)
84 #define DtProfilerThreadName(name) tracy::SetThreadName(name );
85 #define DtProfilerMessage(str, stringLen) TracyMessage(str, stringLen)
86 #define DtProfilerText(text) _zoneSetText(___tracy_scoped_zone, text)
88 inline void _zoneSetText(tracy::ScopedZone& zone,
const char* text) {
89 zone.Text(text, strlen(text));
91 inline void _zoneSetText(tracy::ScopedZone& zone,
const std::string& text) {
92 zone.Text(text.c_str(), text.size());
95 #define DtProfilerName(text) _zoneSetName(___tracy_scoped_zone, text)
97 inline void _zoneSetName(tracy::ScopedZone& zone,
const char* text)
99 zone.Name(text, strlen(text));
101 inline void _zoneSetName(tracy::ScopedZone& zone,
const std::string& text)
103 zone.Name(text.c_str(), text.size());
110 #define DtPROFILEzone
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 DtProfilerPlot(x,y)
118 #define DtProfilerFrameMark
119 #define DtProfilerThreadName(name)
120 #define DtProfilerPlot(x,y)
121 #define DtProfilerMessage(str, stringLen)
122 #define DtProfilerText(text)
125 #define DtPROFILE_RESTRICTED(name, target) makVrv::DtProfileTarget<target> _profileTarget##line(name);
127 #define DtPROFILE_X(name, line) DtPROFILE_ACTUAL(name, line)
128 #define DtPROFILE_ACTUAL(name, line) makVrv::DtProfileSample _profileSample##line(name);
130 #define DtPROFILE_SECTION_END }
132 #define DtPERFORMANCE_STAT(name) DtPERFORMANCE_STAT_X(name, __LINE__)
133 #define DtPERFORMANCE_STAT_X(name, line) DtPERFORMANCE_STAT_ACTUAL(name, line)
134 #define DtPERFORMANCE_STAT_ACTUAL(name, line) makVrv::DtPerfomanceStatSample _performanceStatSample##line(name);
172 template <
bool Enabled>
const bool Profile_DtOsgCullVisitor
Definition: DtProfiler.h:142
#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:173
DtProfileSampleClass is used to start/stop a profiled section It is preferable to use the macro at th...
Definition: DtProfiler.h:198
void _zoneSetName(tracy::ScopedZone &zone, const char *text)
Definition: DtProfiler.h:97
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:156
const bool Profile_DtSurfaceClampingUpdater
Definition: DtProfiler.h:141
~DtPerfomanceStatSample()
DTOR stops profile section.
Definition: DtProfiler.h:208
DtProfileTarget(const char *name)
CTOR starts profile section.
Definition: DtProfiler.h:182
DtProfileSampleClass is used to start/stop a profiled section It is preferable to use the macro at th...
Definition: DtProfiler.h:152
void _zoneSetText(tracy::ScopedZone &zone, const char *text)
Definition: DtProfiler.h:88
Contains DLL export macros.
const bool Profile_DtSceneObjectUpdater
Definition: DtProfiler.h:140
void DT_DLL_VRVUTIL SetThreadName(const char *name)
~DtProfileTarget()
DTOR stops profile section.
Definition: DtProfiler.h:188
static void stopPerformanceStat()
begin stop a profile. This function is thread safe
DtProfileTarget(const char *name)
Definition: DtProfiler.h:175
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:202
~DtProfileSample()
DTOR stops profile section.
Definition: DtProfiler.h:162
static void stopProfile()
begin stop a profile. This function is thread safe