From 6652999a608d5f7711b8086abf98c92bb0cf5ce7 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 23 Jan 2023 01:18:23 +0100 Subject: [PATCH] Fix color channels names in zone color message. --- public/client/TracyProfiler.cpp | 4 ++-- public/client/TracyScoped.hpp | 4 ++-- public/common/TracyQueue.hpp | 4 ++-- server/TracyWorker.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp index d82bf603..d08f96fe 100644 --- a/public/client/TracyProfiler.cpp +++ b/public/client/TracyProfiler.cpp @@ -4110,9 +4110,9 @@ TRACY_API void ___tracy_emit_zone_color( TracyCZoneCtx ctx, uint32_t color ) { #endif { TracyQueuePrepareC( tracy::QueueType::ZoneColor ); - tracy::MemWrite( &item->zoneColor.r, uint8_t( ( color ) & 0xFF ) ); + tracy::MemWrite( &item->zoneColor.b, uint8_t( ( color ) & 0xFF ) ); tracy::MemWrite( &item->zoneColor.g, uint8_t( ( color >> 8 ) & 0xFF ) ); - tracy::MemWrite( &item->zoneColor.b, uint8_t( ( color >> 16 ) & 0xFF ) ); + tracy::MemWrite( &item->zoneColor.r, uint8_t( ( color >> 16 ) & 0xFF ) ); TracyQueueCommitC( zoneColorThread ); } } diff --git a/public/client/TracyScoped.hpp b/public/client/TracyScoped.hpp index 3c8105e6..55859107 100644 --- a/public/client/TracyScoped.hpp +++ b/public/client/TracyScoped.hpp @@ -143,9 +143,9 @@ public: if( GetProfiler().ConnectionId() != m_connectionId ) return; #endif TracyQueuePrepare( QueueType::ZoneColor ); - MemWrite( &item->zoneColor.r, uint8_t( ( color ) & 0xFF ) ); + MemWrite( &item->zoneColor.b, uint8_t( ( color ) & 0xFF ) ); MemWrite( &item->zoneColor.g, uint8_t( ( color >> 8 ) & 0xFF ) ); - MemWrite( &item->zoneColor.b, uint8_t( ( color >> 16 ) & 0xFF ) ); + MemWrite( &item->zoneColor.r, uint8_t( ( color >> 16 ) & 0xFF ) ); TracyQueueCommit( zoneColorThread ); } diff --git a/public/common/TracyQueue.hpp b/public/common/TracyQueue.hpp index b22d03d2..cf033c0d 100644 --- a/public/common/TracyQueue.hpp +++ b/public/common/TracyQueue.hpp @@ -166,9 +166,9 @@ struct QueueZoneValidationThread : public QueueZoneValidation struct QueueZoneColor { - uint8_t r; - uint8_t g; uint8_t b; + uint8_t g; + uint8_t r; }; struct QueueZoneColorThread : public QueueZoneColor diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index a8bdd3f7..efb8e056 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -5331,7 +5331,7 @@ void Worker::ProcessZoneColor( const QueueZoneColor& ev ) auto& stack = td->stack; auto zone = stack.back(); auto& extra = RequestZoneExtra( *zone ); - const uint32_t color = ( ev.r << 16 ) | ( ev.g << 8 ) | ev.b; + const uint32_t color = ( ev.b << 16 ) | ( ev.g << 8 ) | ev.r; extra.color = color; }