From 1a4889116e0f291fbd8a3ccaa4739683b95bf738 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 18 Nov 2017 00:32:15 +0100 Subject: [PATCH] Store GPU accuracy bits info. --- server/TracyEvent.hpp | 1 + server/TracyView.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/server/TracyEvent.hpp b/server/TracyEvent.hpp index a21793f5..79e51e1b 100644 --- a/server/TracyEvent.hpp +++ b/server/TracyEvent.hpp @@ -141,6 +141,7 @@ struct GpuCtxData Vector timeline; Vector stack; Vector queue; + uint8_t accuracyBits; bool showFull; }; diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 30c0f46c..67814d55 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -348,6 +348,7 @@ View::View( FileRead& f ) { auto ctx = m_slab.AllocInit(); f.Read( &ctx->thread, sizeof( ctx->thread ) ); + f.Read( &ctx->accuracyBits, sizeof( ctx->accuracyBits ) ); ReadTimeline( f, ctx->timeline ); ctx->showFull = true; m_gpuData.push_back( ctx ); @@ -831,6 +832,7 @@ void View::ProcessGpuNewContext( const QueueGpuNewContext& ev ) auto gpu = m_slab.AllocInit(); gpu->timeDiff = int64_t( ev.cputime * m_timerMul - ev.gputime ); gpu->thread = ev.thread; + gpu->accuracyBits = ev.accuracyBits; gpu->showFull = true; m_gpuData.push_back( gpu ); } @@ -3759,6 +3761,7 @@ void View::Write( FileWrite& f ) for( auto& ctx : m_gpuData ) { f.Write( &ctx->thread, sizeof( ctx->thread ) ); + f.Write( &ctx->accuracyBits, sizeof( ctx->accuracyBits ) ); WriteTimeline( f, ctx->timeline ); }