1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Transfer of colored messages.

This commit is contained in:
Bartosz Taudul
2019-05-10 20:17:44 +02:00
parent 6a09229ae7
commit efc54babe3
7 changed files with 92 additions and 1 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
namespace tracy
{
enum : uint32_t { ProtocolVersion = 5 };
enum : uint32_t { ProtocolVersion = 6 };
using lz4sz_t = uint32_t;
+12
View File
@@ -11,6 +11,7 @@ enum class QueueType : uint8_t
ZoneText,
ZoneName,
Message,
MessageColor,
ZoneBeginAllocSrcLoc,
ZoneBeginAllocSrcLocCallstack,
CallstackMemory,
@@ -39,6 +40,7 @@ enum class QueueType : uint8_t
LockMark,
PlotData,
MessageLiteral,
MessageLiteralColor,
GpuNewContext,
GpuZoneBegin,
GpuZoneBeginCallstack,
@@ -190,6 +192,13 @@ struct QueueMessage
uint64_t text; // ptr
};
struct QueueMessageColor : public QueueMessage
{
uint8_t r;
uint8_t g;
uint8_t b;
};
struct QueueGpuNewContext
{
int64_t cpuTime;
@@ -311,6 +320,7 @@ struct QueueItem
QueueLockMark lockMark;
QueuePlotData plotData;
QueueMessage message;
QueueMessageColor messageColor;
QueueGpuNewContext gpuNewContext;
QueueGpuZoneBegin gpuZoneBegin;
QueueGpuZoneEnd gpuZoneEnd;
@@ -335,6 +345,7 @@ static const size_t QueueDataSize[] = {
sizeof( QueueHeader ) + sizeof( QueueZoneText ),
sizeof( QueueHeader ) + sizeof( QueueZoneText ), // zone name
sizeof( QueueHeader ) + sizeof( QueueMessage ),
sizeof( QueueHeader ) + sizeof( QueueMessageColor ),
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ), // allocated source location
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ), // allocated source location, callstack
sizeof( QueueHeader ) + sizeof( QueueCallstackMemory ),
@@ -364,6 +375,7 @@ static const size_t QueueDataSize[] = {
sizeof( QueueHeader ) + sizeof( QueueLockMark ),
sizeof( QueueHeader ) + sizeof( QueuePlotData ),
sizeof( QueueHeader ) + sizeof( QueueMessage ), // literal
sizeof( QueueHeader ) + sizeof( QueueMessageColor ), // literal
sizeof( QueueHeader ) + sizeof( QueueGpuNewContext ),
sizeof( QueueHeader ) + sizeof( QueueGpuZoneBegin ),
sizeof( QueueHeader ) + sizeof( QueueGpuZoneBegin ), // callstack