From a0cb8eb1d51d430df9175eaab9ea63e8239e2b94 Mon Sep 17 00:00:00 2001 From: xxxbxxx Date: Thu, 3 Nov 2022 13:47:04 +0100 Subject: Added typed plots variants to the C API --- public/client/TracyProfiler.cpp | 2 ++ public/tracy/TracyC.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp index a6017397..457c272b 100644 --- a/public/client/TracyProfiler.cpp +++ b/public/client/TracyProfiler.cpp @@ -4145,6 +4145,8 @@ TRACY_API void ___tracy_emit_frame_mark_start( const char* name ) { tracy::Profi TRACY_API void ___tracy_emit_frame_mark_end( const char* name ) { tracy::Profiler::SendFrameMark( name, tracy::QueueType::FrameMarkMsgEnd ); } TRACY_API void ___tracy_emit_frame_image( const void* image, uint16_t w, uint16_t h, uint8_t offset, int flip ) { tracy::Profiler::SendFrameImage( image, w, h, offset, flip ); } TRACY_API void ___tracy_emit_plot( const char* name, double val ) { tracy::Profiler::PlotData( name, val ); } +TRACY_API void ___tracy_emit_plot_float( const char* name, float val ) { tracy::Profiler::PlotData( name, val ); } +TRACY_API void ___tracy_emit_plot_int( const char* name, int64_t val ) { tracy::Profiler::PlotData( name, val ); } TRACY_API void ___tracy_emit_message( const char* txt, size_t size, int callstack ) { tracy::Profiler::Message( txt, size, callstack ); } TRACY_API void ___tracy_emit_messageL( const char* txt, int callstack ) { tracy::Profiler::Message( txt, callstack ); } TRACY_API void ___tracy_emit_messageC( const char* txt, size_t size, uint32_t color, int callstack ) { tracy::Profiler::MessageColor( txt, size, color, callstack ); } diff --git a/public/tracy/TracyC.h b/public/tracy/TracyC.h index 6268f9e9..9171abf1 100644 --- a/public/tracy/TracyC.h +++ b/public/tracy/TracyC.h @@ -47,6 +47,8 @@ typedef const void* TracyCZoneCtx; #define TracyCFrameImage(x,y,z,w,a) #define TracyCPlot(x,y) +#define TracyCPlotF(x,y) +#define TracyCPlotI(x,y) #define TracyCMessage(x,y) #define TracyCMessageL(x) #define TracyCMessageC(x,y,z) @@ -274,9 +276,13 @@ TRACY_API void ___tracy_emit_frame_image( const void* image, uint16_t w, uint16_ TRACY_API void ___tracy_emit_plot( const char* name, double val ); +TRACY_API void ___tracy_emit_plot_float( const char* name, float val ); +TRACY_API void ___tracy_emit_plot_int( const char* name, int64_t val ); TRACY_API void ___tracy_emit_message_appinfo( const char* txt, size_t size ); #define TracyCPlot( name, val ) ___tracy_emit_plot( name, val ); +#define TracyCPlotF( name, val ) ___tracy_emit_plot_float( name, val ); +#define TracyCPlotI( name, val ) ___tracy_emit_plot_int( name, val ); #define TracyCAppInfo( txt, size ) ___tracy_emit_message_appinfo( txt, size ); -- cgit v1.2.3