mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Include frame offset in frame image message.
This commit is contained in:
parent
8c912890f0
commit
784c4da53a
@ -24,7 +24,7 @@
|
||||
#define FrameMarkStart(x)
|
||||
#define FrameMarkEnd(x)
|
||||
|
||||
#define FrameImage(x,y,z)
|
||||
#define FrameImage(x,y,z,w)
|
||||
|
||||
#define TracyLockable( type, varname ) type varname;
|
||||
#define TracyLockableN( type, varname, desc ) type varname;
|
||||
@ -88,7 +88,7 @@
|
||||
#define FrameMarkStart( name ) tracy::Profiler::SendFrameMark( name, tracy::QueueType::FrameMarkMsgStart );
|
||||
#define FrameMarkEnd( name ) tracy::Profiler::SendFrameMark( name, tracy::QueueType::FrameMarkMsgEnd );
|
||||
|
||||
#define FrameImage( image, width, height ) tracy::Profiler::SendFrameImage( image, width, height );
|
||||
#define FrameImage( image, width, height, offset ) tracy::Profiler::SendFrameImage( image, width, height, offset );
|
||||
|
||||
#define TracyLockable( type, varname ) tracy::Lockable<type> varname { [] () -> const tracy::SourceLocationData* { static const tracy::SourceLocationData srcloc { nullptr, #type " " #varname, __FILE__, __LINE__, 0 }; return &srcloc; }() };
|
||||
#define TracyLockableN( type, varname, desc ) tracy::Lockable<type> varname { [] () -> const tracy::SourceLocationData* { static const tracy::SourceLocationData srcloc { nullptr, desc, __FILE__, __LINE__, 0 }; return &srcloc; }() };
|
||||
|
@ -170,7 +170,7 @@ public:
|
||||
GetProfiler().m_serialLock.unlock();
|
||||
}
|
||||
|
||||
static tracy_force_inline void SendFrameImage( void* image, uint16_t w, uint16_t h )
|
||||
static tracy_force_inline void SendFrameImage( void* image, uint16_t w, uint16_t h, uint8_t offset )
|
||||
{
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
if( !GetProfiler().IsConnected() ) return;
|
||||
@ -186,6 +186,7 @@ public:
|
||||
MemWrite( &item->frameImage.image, (uint64_t)ptr );
|
||||
MemWrite( &item->frameImage.w, w );
|
||||
MemWrite( &item->frameImage.h, h );
|
||||
MemWrite( &item->frameImage.offset, offset );
|
||||
tail.store( magic + 1, std::memory_order_release );
|
||||
}
|
||||
|
||||
|
@ -105,6 +105,7 @@ struct QueueFrameImage
|
||||
uint64_t image; // ptr
|
||||
uint16_t w;
|
||||
uint16_t h;
|
||||
uint8_t offset;
|
||||
};
|
||||
|
||||
struct QueueSourceLocation
|
||||
|
Loading…
Reference in New Issue
Block a user