mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Count frames in on-demand mode.
This commit is contained in:
parent
03794a2957
commit
43d5ab4382
@ -200,6 +200,7 @@ Profiler::Profiler()
|
|||||||
, m_serialDequeue( 1024*1024 )
|
, m_serialDequeue( 1024*1024 )
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
, m_isConnected( false )
|
, m_isConnected( false )
|
||||||
|
, m_frameCount( 0 )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
assert( !s_instance );
|
assert( !s_instance );
|
||||||
|
@ -119,6 +119,7 @@ public:
|
|||||||
static tracy_force_inline void FrameMark()
|
static tracy_force_inline void FrameMark()
|
||||||
{
|
{
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
|
s_profiler.m_frameCount.fetch_add( 1, std::memory_order_relaxed );
|
||||||
if( !s_profiler.IsConnected() ) return;
|
if( !s_profiler.IsConnected() ) return;
|
||||||
#endif
|
#endif
|
||||||
Magic magic;
|
Magic magic;
|
||||||
@ -389,6 +390,7 @@ private:
|
|||||||
|
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
std::atomic<bool> m_isConnected;
|
std::atomic<bool> m_isConnected;
|
||||||
|
std::atomic<uint64_t> m_frameCount;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user