mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Reduce frame images frame index to 32 bit.
This commit is contained in:
parent
ab468d8c57
commit
b7af9a0860
@ -112,7 +112,7 @@ class Profiler
|
|||||||
struct FrameImageQueueItem
|
struct FrameImageQueueItem
|
||||||
{
|
{
|
||||||
void* image;
|
void* image;
|
||||||
uint64_t frame;
|
uint32_t frame;
|
||||||
uint16_t w;
|
uint16_t w;
|
||||||
uint16_t h;
|
uint16_t h;
|
||||||
uint8_t offset;
|
uint8_t offset;
|
||||||
@ -205,6 +205,7 @@ public:
|
|||||||
static tracy_force_inline void SendFrameImage( const void* image, uint16_t w, uint16_t h, uint8_t offset, bool flip )
|
static tracy_force_inline void SendFrameImage( const void* image, uint16_t w, uint16_t h, uint8_t offset, bool flip )
|
||||||
{
|
{
|
||||||
auto& profiler = GetProfiler();
|
auto& profiler = GetProfiler();
|
||||||
|
assert( profiler.m_frameCount.load( std::memory_order_relaxed ) < std::numeric_limits<uint32_t>::max() );
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
if( !profiler.IsConnected() ) return;
|
if( !profiler.IsConnected() ) return;
|
||||||
#endif
|
#endif
|
||||||
@ -215,7 +216,7 @@ public:
|
|||||||
profiler.m_fiLock.lock();
|
profiler.m_fiLock.lock();
|
||||||
auto fi = profiler.m_fiQueue.prepare_next();
|
auto fi = profiler.m_fiQueue.prepare_next();
|
||||||
fi->image = ptr;
|
fi->image = ptr;
|
||||||
fi->frame = profiler.m_frameCount.load( std::memory_order_relaxed ) - offset;
|
fi->frame = uint32_t( profiler.m_frameCount.load( std::memory_order_relaxed ) - offset );
|
||||||
fi->w = w;
|
fi->w = w;
|
||||||
fi->h = h;
|
fi->h = h;
|
||||||
fi->flip = flip;
|
fi->flip = flip;
|
||||||
|
@ -9,7 +9,7 @@ namespace tracy
|
|||||||
|
|
||||||
constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; }
|
constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; }
|
||||||
|
|
||||||
enum : uint32_t { ProtocolVersion = 38 };
|
enum : uint32_t { ProtocolVersion = 39 };
|
||||||
enum : uint32_t { BroadcastVersion = 1 };
|
enum : uint32_t { BroadcastVersion = 1 };
|
||||||
|
|
||||||
using lz4sz_t = uint32_t;
|
using lz4sz_t = uint32_t;
|
||||||
|
@ -144,7 +144,7 @@ struct QueueFrameMark
|
|||||||
|
|
||||||
struct QueueFrameImageLean
|
struct QueueFrameImageLean
|
||||||
{
|
{
|
||||||
uint64_t frame;
|
uint32_t frame;
|
||||||
uint16_t w;
|
uint16_t w;
|
||||||
uint16_t h;
|
uint16_t h;
|
||||||
uint8_t flip;
|
uint8_t flip;
|
||||||
|
Loading…
Reference in New Issue
Block a user