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

Add GPU context name transfer to the protocol.

This commit is contained in:
Bartosz Taudul
2021-01-31 18:46:42 +01:00
parent dba35cfa21
commit 7f5810dfd6
2 changed files with 40 additions and 0 deletions
+15
View File
@@ -54,6 +54,7 @@ enum class QueueType : uint8_t
ContextSwitch,
ThreadWakeup,
GpuTime,
GpuContextName,
Terminate,
KeepAlive,
ThreadContext,
@@ -357,6 +358,17 @@ struct QueueGpuCalibration
uint8_t context;
};
struct QueueGpuContextName
{
uint8_t context;
};
struct QueueGpuContextNameFat : public QueueGpuContextName
{
uint64_t ptr;
uint16_t size;
};
struct QueueMemNamePayload
{
uint64_t name;
@@ -534,6 +546,8 @@ struct QueueItem
QueueGpuZoneEnd gpuZoneEnd;
QueueGpuTime gpuTime;
QueueGpuCalibration gpuCalibration;
QueueGpuContextName gpuContextName;
QueueGpuContextNameFat gpuContextNameFat;
QueueMemAlloc memAlloc;
QueueMemFree memFree;
QueueMemNamePayload memName;
@@ -607,6 +621,7 @@ static constexpr size_t QueueDataSize[] = {
sizeof( QueueHeader ) + sizeof( QueueContextSwitch ),
sizeof( QueueHeader ) + sizeof( QueueThreadWakeup ),
sizeof( QueueHeader ) + sizeof( QueueGpuTime ),
sizeof( QueueHeader ) + sizeof( QueueGpuContextName ),
// above items must be first
sizeof( QueueHeader ), // terminate
sizeof( QueueHeader ), // keep alive