From e86238642a30cba22fc67859a956b07dc277b221 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 30 Jul 2022 19:50:42 +0200 Subject: [PATCH] Add dedicated frame Vsync queue message. --- public/common/TracyProtocol.hpp | 2 +- public/common/TracyQueue.hpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/public/common/TracyProtocol.hpp b/public/common/TracyProtocol.hpp index 26afcd1d..5e975538 100644 --- a/public/common/TracyProtocol.hpp +++ b/public/common/TracyProtocol.hpp @@ -9,7 +9,7 @@ namespace tracy constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize + ( isize / 255 ) + 16; } -enum : uint32_t { ProtocolVersion = 59 }; +enum : uint32_t { ProtocolVersion = 60 }; enum : uint16_t { BroadcastVersion = 2 }; using lz4sz_t = uint32_t; diff --git a/public/common/TracyQueue.hpp b/public/common/TracyQueue.hpp index 9a4dfc80..81c24d4d 100644 --- a/public/common/TracyQueue.hpp +++ b/public/common/TracyQueue.hpp @@ -78,6 +78,7 @@ enum class QueueType : uint8_t FrameMarkMsg, FrameMarkMsgStart, FrameMarkMsgEnd, + FrameVsync, SourceLocation, LockAnnounce, LockTerminate, @@ -196,6 +197,12 @@ struct QueueFrameMark uint64_t name; // ptr }; +struct QueueFrameVsync +{ + int64_t time; + uint32_t id; +}; + struct QueueFrameImage { uint32_t frame; @@ -670,6 +677,7 @@ struct QueueItem QueueZoneValueThread zoneValueThread; QueueStringTransfer stringTransfer; QueueFrameMark frameMark; + QueueFrameVsync frameVsync; QueueFrameImage frameImage; QueueFrameImageFat frameImageFat; QueueSourceLocation srcloc; @@ -813,6 +821,7 @@ static constexpr size_t QueueDataSize[] = { sizeof( QueueHeader ) + sizeof( QueueFrameMark ), // continuous frames sizeof( QueueHeader ) + sizeof( QueueFrameMark ), // start sizeof( QueueHeader ) + sizeof( QueueFrameMark ), // end + sizeof( QueueHeader ) + sizeof( QueueFrameVsync ), sizeof( QueueHeader ) + sizeof( QueueSourceLocation ), sizeof( QueueHeader ) + sizeof( QueueLockAnnounce ), sizeof( QueueHeader ) + sizeof( QueueLockTerminate ),