mirror of
https://github.com/wolfpld/tracy.git
synced 2026-06-13 10:49:05 +00:00
Push mesh triangles into staging vector.
This commit is contained in:
@@ -221,6 +221,16 @@ struct CrashEvent
|
||||
|
||||
enum { CrashEventSize = sizeof( CrashEvent ) };
|
||||
|
||||
|
||||
struct MeshTriangle
|
||||
{
|
||||
float x0, y0;
|
||||
float x1, y1;
|
||||
float x2, y2;
|
||||
};
|
||||
|
||||
enum { MeshTriangleSize = sizeof( MeshTriangle ) };
|
||||
|
||||
#pragma pack()
|
||||
|
||||
|
||||
|
||||
@@ -2780,6 +2780,12 @@ bool Worker::Process( const QueueItem& ev )
|
||||
case QueueType::SysTimeReport:
|
||||
ProcessSysTime( ev.sysTime );
|
||||
break;
|
||||
case QueueType::MeshEnd:
|
||||
ProcessMeshEnd();
|
||||
break;
|
||||
case QueueType::MeshTri:
|
||||
ProcessMeshTri( ev.meshTri );
|
||||
break;
|
||||
default:
|
||||
assert( false );
|
||||
break;
|
||||
@@ -3804,6 +3810,22 @@ void Worker::ProcessSysTime( const QueueSysTime& ev )
|
||||
}
|
||||
}
|
||||
|
||||
void Worker::ProcessMeshEnd()
|
||||
{
|
||||
m_data.meshStaging.clear();
|
||||
}
|
||||
|
||||
void Worker::ProcessMeshTri( const QueueMeshTri& ev )
|
||||
{
|
||||
auto& tri = m_data.meshStaging.push_next();
|
||||
tri.x0 = ev.x0;
|
||||
tri.y0 = ev.y0;
|
||||
tri.x1 = ev.x1;
|
||||
tri.y1 = ev.y1;
|
||||
tri.x2 = ev.x2;
|
||||
tri.y2 = ev.y2;
|
||||
}
|
||||
|
||||
void Worker::MemAllocChanged( int64_t time )
|
||||
{
|
||||
const auto val = (double)m_data.memory.usage;
|
||||
|
||||
@@ -188,6 +188,8 @@ private:
|
||||
Vector<StringRef> appInfo;
|
||||
|
||||
CrashEvent crashEvent;
|
||||
|
||||
Vector<MeshTriangle> meshStaging;
|
||||
};
|
||||
|
||||
struct MbpsBlock
|
||||
@@ -406,6 +408,8 @@ private:
|
||||
tracy_force_inline void ProcessCallstackFrame( const QueueCallstackFrame& ev );
|
||||
tracy_force_inline void ProcessCrashReport( const QueueCrashReport& ev );
|
||||
tracy_force_inline void ProcessSysTime( const QueueSysTime& ev );
|
||||
tracy_force_inline void ProcessMeshEnd();
|
||||
tracy_force_inline void ProcessMeshTri( const QueueMeshTri& ev );
|
||||
|
||||
tracy_force_inline void ProcessZoneBeginImpl( ZoneEvent* zone, const QueueZoneBegin& ev );
|
||||
tracy_force_inline void ProcessZoneBeginAllocSrcLocImpl( ZoneEvent* zone, const QueueZoneBegin& ev );
|
||||
|
||||
Reference in New Issue
Block a user