mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
No need for lean frame image message.
This commit is contained in:
parent
b76726c597
commit
18713de70c
@ -1680,12 +1680,12 @@ void Profiler::CompressWorker()
|
|||||||
tracy_free( fi->image );
|
tracy_free( fi->image );
|
||||||
|
|
||||||
TracyLfqPrepare( QueueType::FrameImage );
|
TracyLfqPrepare( QueueType::FrameImage );
|
||||||
MemWrite( &item->frameImage.image, (uint64_t)etc1buf );
|
MemWrite( &item->frameImageFat.image, (uint64_t)etc1buf );
|
||||||
MemWrite( &item->frameImage.frame, fi->frame );
|
MemWrite( &item->frameImageFat.frame, fi->frame );
|
||||||
MemWrite( &item->frameImage.w, w );
|
MemWrite( &item->frameImageFat.w, w );
|
||||||
MemWrite( &item->frameImage.h, h );
|
MemWrite( &item->frameImageFat.h, h );
|
||||||
uint8_t flip = fi->flip;
|
uint8_t flip = fi->flip;
|
||||||
MemWrite( &item->frameImage.flip, flip );
|
MemWrite( &item->frameImageFat.flip, flip );
|
||||||
TracyLfqCommit;
|
TracyLfqCommit;
|
||||||
|
|
||||||
fi++;
|
fi++;
|
||||||
@ -1747,7 +1747,7 @@ static void FreeAssociatedMemory( const QueueItem& item )
|
|||||||
tracy_free( (void*)ptr );
|
tracy_free( (void*)ptr );
|
||||||
break;
|
break;
|
||||||
case QueueType::FrameImage:
|
case QueueType::FrameImage:
|
||||||
ptr = MemRead<uint64_t>( &item.frameImage.image );
|
ptr = MemRead<uint64_t>( &item.frameImageFat.image );
|
||||||
tracy_free( (void*)ptr );
|
tracy_free( (void*)ptr );
|
||||||
break;
|
break;
|
||||||
#ifndef TRACY_ON_DEMAND
|
#ifndef TRACY_ON_DEMAND
|
||||||
@ -1908,14 +1908,12 @@ Profiler::DequeueStatus Profiler::Dequeue( moodycamel::ConsumerToken& token )
|
|||||||
}
|
}
|
||||||
case QueueType::FrameImage:
|
case QueueType::FrameImage:
|
||||||
{
|
{
|
||||||
ptr = MemRead<uint64_t>( &item->frameImage.image );
|
ptr = MemRead<uint64_t>( &item->frameImageFat.image );
|
||||||
const auto w = MemRead<uint16_t>( &item->frameImage.w );
|
const auto w = MemRead<uint16_t>( &item->frameImageFat.w );
|
||||||
const auto h = MemRead<uint16_t>( &item->frameImage.h );
|
const auto h = MemRead<uint16_t>( &item->frameImageFat.h );
|
||||||
const auto csz = size_t( w * h / 2 );
|
const auto csz = size_t( w * h / 2 );
|
||||||
SendLongString( ptr, (const char*)ptr, csz, QueueType::FrameImageData );
|
SendLongString( ptr, (const char*)ptr, csz, QueueType::FrameImageData );
|
||||||
tracy_free( (void*)ptr );
|
tracy_free( (void*)ptr );
|
||||||
idx++;
|
|
||||||
MemWrite( &item->hdr.idx, idx );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case QueueType::ZoneBegin:
|
case QueueType::ZoneBegin:
|
||||||
|
@ -26,7 +26,6 @@ enum class QueueType : uint8_t
|
|||||||
CallstackSample,
|
CallstackSample,
|
||||||
CallstackSampleLean,
|
CallstackSampleLean,
|
||||||
FrameImage,
|
FrameImage,
|
||||||
FrameImageLean,
|
|
||||||
ZoneBegin,
|
ZoneBegin,
|
||||||
ZoneBeginCallstack,
|
ZoneBeginCallstack,
|
||||||
ZoneEnd,
|
ZoneEnd,
|
||||||
@ -140,7 +139,7 @@ struct QueueFrameMark
|
|||||||
uint64_t name; // ptr
|
uint64_t name; // ptr
|
||||||
};
|
};
|
||||||
|
|
||||||
struct QueueFrameImageLean
|
struct QueueFrameImage
|
||||||
{
|
{
|
||||||
uint32_t frame;
|
uint32_t frame;
|
||||||
uint16_t w;
|
uint16_t w;
|
||||||
@ -148,7 +147,7 @@ struct QueueFrameImageLean
|
|||||||
uint8_t flip;
|
uint8_t flip;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct QueueFrameImage : public QueueFrameImageLean
|
struct QueueFrameImageFat : public QueueFrameImage
|
||||||
{
|
{
|
||||||
uint64_t image; // ptr
|
uint64_t image; // ptr
|
||||||
};
|
};
|
||||||
@ -488,7 +487,7 @@ struct QueueItem
|
|||||||
QueueStringTransfer stringTransfer;
|
QueueStringTransfer stringTransfer;
|
||||||
QueueFrameMark frameMark;
|
QueueFrameMark frameMark;
|
||||||
QueueFrameImage frameImage;
|
QueueFrameImage frameImage;
|
||||||
QueueFrameImage frameImageLean;
|
QueueFrameImageFat frameImageFat;
|
||||||
QueueSourceLocation srcloc;
|
QueueSourceLocation srcloc;
|
||||||
QueueZoneTextFat zoneTextFat;
|
QueueZoneTextFat zoneTextFat;
|
||||||
QueueLockAnnounce lockAnnounce;
|
QueueLockAnnounce lockAnnounce;
|
||||||
@ -554,8 +553,7 @@ static constexpr size_t QueueDataSize[] = {
|
|||||||
sizeof( QueueHeader ), // lean callstack alloc
|
sizeof( QueueHeader ), // lean callstack alloc
|
||||||
sizeof( QueueHeader ) + sizeof( QueueCallstackSample ), // not for network transfer
|
sizeof( QueueHeader ) + sizeof( QueueCallstackSample ), // not for network transfer
|
||||||
sizeof( QueueHeader ) + sizeof( QueueCallstackSampleLean ),
|
sizeof( QueueHeader ) + sizeof( QueueCallstackSampleLean ),
|
||||||
sizeof( QueueHeader ) + sizeof( QueueFrameImage ), // not for network transfer
|
sizeof( QueueHeader ) + sizeof( QueueFrameImage ),
|
||||||
sizeof( QueueHeader ) + sizeof( QueueFrameImageLean ),
|
|
||||||
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ),
|
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ),
|
||||||
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ), // callstack
|
sizeof( QueueHeader ) + sizeof( QueueZoneBegin ), // callstack
|
||||||
sizeof( QueueHeader ) + sizeof( QueueZoneEnd ),
|
sizeof( QueueHeader ) + sizeof( QueueZoneEnd ),
|
||||||
|
@ -3905,8 +3905,8 @@ bool Worker::Process( const QueueItem& ev )
|
|||||||
case QueueType::FrameMarkMsgEnd:
|
case QueueType::FrameMarkMsgEnd:
|
||||||
ProcessFrameMarkEnd( ev.frameMark );
|
ProcessFrameMarkEnd( ev.frameMark );
|
||||||
break;
|
break;
|
||||||
case QueueType::FrameImageLean:
|
case QueueType::FrameImage:
|
||||||
ProcessFrameImage( ev.frameImageLean );
|
ProcessFrameImage( ev.frameImage );
|
||||||
break;
|
break;
|
||||||
case QueueType::SourceLocation:
|
case QueueType::SourceLocation:
|
||||||
AddSourceLocation( ev.srcloc );
|
AddSourceLocation( ev.srcloc );
|
||||||
@ -4428,7 +4428,7 @@ void Worker::ProcessFrameMarkEnd( const QueueFrameMark& ev )
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Worker::ProcessFrameImage( const QueueFrameImageLean& ev )
|
void Worker::ProcessFrameImage( const QueueFrameImage& ev )
|
||||||
{
|
{
|
||||||
assert( m_pendingFrameImageData.image != nullptr );
|
assert( m_pendingFrameImageData.image != nullptr );
|
||||||
|
|
||||||
|
@ -613,7 +613,7 @@ private:
|
|||||||
tracy_force_inline void ProcessFrameMark( const QueueFrameMark& ev );
|
tracy_force_inline void ProcessFrameMark( const QueueFrameMark& ev );
|
||||||
tracy_force_inline void ProcessFrameMarkStart( const QueueFrameMark& ev );
|
tracy_force_inline void ProcessFrameMarkStart( const QueueFrameMark& ev );
|
||||||
tracy_force_inline void ProcessFrameMarkEnd( const QueueFrameMark& ev );
|
tracy_force_inline void ProcessFrameMarkEnd( const QueueFrameMark& ev );
|
||||||
tracy_force_inline void ProcessFrameImage( const QueueFrameImageLean& ev );
|
tracy_force_inline void ProcessFrameImage( const QueueFrameImage& ev );
|
||||||
tracy_force_inline void ProcessZoneText();
|
tracy_force_inline void ProcessZoneText();
|
||||||
tracy_force_inline void ProcessZoneName();
|
tracy_force_inline void ProcessZoneName();
|
||||||
tracy_force_inline void ProcessZoneValue( const QueueZoneValue& ev );
|
tracy_force_inline void ProcessZoneValue( const QueueZoneValue& ev );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user