1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Add GpuTimeSync event

Allows to resynchronise GPU and CPU timestamps during profiling.
This commit is contained in:
Ivan Molodetskikh
2023-10-22 08:03:58 +04:00
parent 3601576b3f
commit 41fc293043
7 changed files with 67 additions and 1 deletions
+10
View File
@@ -70,6 +70,7 @@ enum class QueueType : uint8_t
KeepAlive,
ThreadContext,
GpuCalibration,
GpuTimeSync,
Crash,
CrashReport,
ZoneValidation,
@@ -453,6 +454,13 @@ struct QueueGpuCalibration
uint8_t context;
};
struct QueueGpuTimeSync
{
int64_t gpuTime;
int64_t cpuTime;
uint8_t context;
};
struct QueueGpuContextName
{
uint8_t context;
@@ -718,6 +726,7 @@ struct QueueItem
QueueGpuZoneEnd gpuZoneEnd;
QueueGpuTime gpuTime;
QueueGpuCalibration gpuCalibration;
QueueGpuTimeSync gpuTimeSync;
QueueGpuContextName gpuContextName;
QueueGpuContextNameFat gpuContextNameFat;
QueueMemAlloc memAlloc;
@@ -821,6 +830,7 @@ static constexpr size_t QueueDataSize[] = {
sizeof( QueueHeader ), // keep alive
sizeof( QueueHeader ) + sizeof( QueueThreadContext ),
sizeof( QueueHeader ) + sizeof( QueueGpuCalibration ),
sizeof( QueueHeader ) + sizeof( QueueGpuTimeSync ),
sizeof( QueueHeader ), // crash
sizeof( QueueHeader ) + sizeof( QueueCrashReport ),
sizeof( QueueHeader ) + sizeof( QueueZoneValidation ),