mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Process GPU context name messages.
This commit is contained in:
parent
cd4114f264
commit
7bb6114270
@ -580,6 +580,7 @@ struct GpuCtxData
|
|||||||
int64_t calibratedGpuTime;
|
int64_t calibratedGpuTime;
|
||||||
int64_t calibratedCpuTime;
|
int64_t calibratedCpuTime;
|
||||||
double calibrationMod;
|
double calibrationMod;
|
||||||
|
StringIdx name;
|
||||||
unordered_flat_map<uint64_t, GpuCtxThreadData> threadData;
|
unordered_flat_map<uint64_t, GpuCtxThreadData> threadData;
|
||||||
short_ptr<GpuEvent> query[64*1024];
|
short_ptr<GpuEvent> query[64*1024];
|
||||||
};
|
};
|
||||||
|
@ -4259,6 +4259,9 @@ bool Worker::Process( const QueueItem& ev )
|
|||||||
case QueueType::GpuCalibration:
|
case QueueType::GpuCalibration:
|
||||||
ProcessGpuCalibration( ev.gpuCalibration );
|
ProcessGpuCalibration( ev.gpuCalibration );
|
||||||
break;
|
break;
|
||||||
|
case QueueType::GpuContextName:
|
||||||
|
ProcessGpuContextName( ev.gpuContextName );
|
||||||
|
break;
|
||||||
case QueueType::MemAlloc:
|
case QueueType::MemAlloc:
|
||||||
ProcessMemAlloc( ev.memAlloc );
|
ProcessMemAlloc( ev.memAlloc );
|
||||||
break;
|
break;
|
||||||
@ -5448,6 +5451,14 @@ void Worker::ProcessGpuCalibration( const QueueGpuCalibration& ev )
|
|||||||
ctx->calibratedCpuTime = TscTime( ev.cpuTime - m_data.baseTime );
|
ctx->calibratedCpuTime = TscTime( ev.cpuTime - m_data.baseTime );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Worker::ProcessGpuContextName( const QueueGpuContextName& ev )
|
||||||
|
{
|
||||||
|
auto ctx = m_gpuCtxMap[ev.context];
|
||||||
|
assert( ctx );
|
||||||
|
const auto idx = GetSingleStringIdx();
|
||||||
|
ctx->name = StringIdx( idx );
|
||||||
|
}
|
||||||
|
|
||||||
MemEvent* Worker::ProcessMemAllocImpl( uint64_t memname, MemData& memdata, const QueueMemAlloc& ev )
|
MemEvent* Worker::ProcessMemAllocImpl( uint64_t memname, MemData& memdata, const QueueMemAlloc& ev )
|
||||||
{
|
{
|
||||||
const auto refTime = m_refTimeSerial + ev.time;
|
const auto refTime = m_refTimeSerial + ev.time;
|
||||||
|
@ -642,6 +642,7 @@ private:
|
|||||||
tracy_force_inline void ProcessGpuZoneEnd( const QueueGpuZoneEnd& ev, bool serial );
|
tracy_force_inline void ProcessGpuZoneEnd( const QueueGpuZoneEnd& ev, bool serial );
|
||||||
tracy_force_inline void ProcessGpuTime( const QueueGpuTime& ev );
|
tracy_force_inline void ProcessGpuTime( const QueueGpuTime& ev );
|
||||||
tracy_force_inline void ProcessGpuCalibration( const QueueGpuCalibration& ev );
|
tracy_force_inline void ProcessGpuCalibration( const QueueGpuCalibration& ev );
|
||||||
|
tracy_force_inline void ProcessGpuContextName( const QueueGpuContextName& ev );
|
||||||
tracy_force_inline MemEvent* ProcessMemAlloc( const QueueMemAlloc& ev );
|
tracy_force_inline MemEvent* ProcessMemAlloc( const QueueMemAlloc& ev );
|
||||||
tracy_force_inline MemEvent* ProcessMemAllocNamed( const QueueMemAlloc& ev );
|
tracy_force_inline MemEvent* ProcessMemAllocNamed( const QueueMemAlloc& ev );
|
||||||
tracy_force_inline MemEvent* ProcessMemFree( const QueueMemFree& ev );
|
tracy_force_inline MemEvent* ProcessMemFree( const QueueMemFree& ev );
|
||||||
|
Loading…
Reference in New Issue
Block a user