diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 4960422b..9d0b8163 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -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 ); diff --git a/client/TracyProfiler.hpp b/client/TracyProfiler.hpp index 5f574b45..56231b1c 100644 --- a/client/TracyProfiler.hpp +++ b/client/TracyProfiler.hpp @@ -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 );