1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

Fix color channels names in zone color message.

This commit is contained in:
Bartosz Taudul 2023-01-23 01:18:23 +01:00
parent eb7c13e7bb
commit 6652999a60
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
4 changed files with 7 additions and 7 deletions

View File

@ -4110,9 +4110,9 @@ TRACY_API void ___tracy_emit_zone_color( TracyCZoneCtx ctx, uint32_t color ) {
#endif #endif
{ {
TracyQueuePrepareC( tracy::QueueType::ZoneColor ); 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.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 ); TracyQueueCommitC( zoneColorThread );
} }
} }

View File

@ -143,9 +143,9 @@ public:
if( GetProfiler().ConnectionId() != m_connectionId ) return; if( GetProfiler().ConnectionId() != m_connectionId ) return;
#endif #endif
TracyQueuePrepare( QueueType::ZoneColor ); 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.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 ); TracyQueueCommit( zoneColorThread );
} }

View File

@ -166,9 +166,9 @@ struct QueueZoneValidationThread : public QueueZoneValidation
struct QueueZoneColor struct QueueZoneColor
{ {
uint8_t r;
uint8_t g;
uint8_t b; uint8_t b;
uint8_t g;
uint8_t r;
}; };
struct QueueZoneColorThread : public QueueZoneColor struct QueueZoneColorThread : public QueueZoneColor

View File

@ -5331,7 +5331,7 @@ void Worker::ProcessZoneColor( const QueueZoneColor& ev )
auto& stack = td->stack; auto& stack = td->stack;
auto zone = stack.back(); auto zone = stack.back();
auto& extra = RequestZoneExtra( *zone ); 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; extra.color = color;
} }