Move ParamaterSetup() implementation to header.

This commit is contained in:
Bartosz Taudul 2020-01-25 16:51:17 +01:00
parent 13370dc01c
commit ab2fbd6164
2 changed files with 15 additions and 17 deletions

View File

@ -2620,21 +2620,6 @@ void Profiler::ProcessSysTime()
}
#endif
void Profiler::ParameterSetup( uint32_t idx, const char* name, bool isBool, int32_t val )
{
TracyLfqPrepare( QueueType::ParamSetup );
tracy::MemWrite( &item->paramSetup.idx, idx );
tracy::MemWrite( &item->paramSetup.name, (uint64_t)name );
tracy::MemWrite( &item->paramSetup.isBool, (uint8_t)isBool );
tracy::MemWrite( &item->paramSetup.val, val );
#ifdef TRACY_ON_DEMAND
GetProfiler().DeferItem( *item );
#endif
TracyLfqCommit;
}
void Profiler::HandleParameter( uint64_t payload )
{
assert( m_paramCallback );

View File

@ -419,8 +419,21 @@ public:
#endif
}
static void ParameterRegister( ParameterCallback cb ) { GetProfiler().m_paramCallback = cb; }
static void ParameterSetup( uint32_t idx, const char* name, bool isBool, int32_t val );
static tracy_force_inline void ParameterRegister( ParameterCallback cb ) { GetProfiler().m_paramCallback = cb; }
static tracy_force_inline void ParameterSetup( uint32_t idx, const char* name, bool isBool, int32_t val )
{
TracyLfqPrepare( QueueType::ParamSetup );
tracy::MemWrite( &item->paramSetup.idx, idx );
tracy::MemWrite( &item->paramSetup.name, (uint64_t)name );
tracy::MemWrite( &item->paramSetup.isBool, (uint8_t)isBool );
tracy::MemWrite( &item->paramSetup.val, val );
#ifdef TRACY_ON_DEMAND
GetProfiler().DeferItem( *item );
#endif
TracyLfqCommit;
}
void SendCallstack( int depth, const char* skipBefore );
static void CutCallstack( void* callstack, const char* skipBefore );