Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-01-23 17:46:30 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-01-29 02:15:32 +0300
commitf1095bba125f61a01372a45d90486573a1d24fbd (patch)
tree0f16a182f71a4b8536f560912d5c10bed20ee604 /server/TracyWorker.hpp
parent8533bdf5f4b6103d9226055888e214607043b0e1 (diff)
GPU statistics data accessors.
Diffstat (limited to 'server/TracyWorker.hpp')
-rw-r--r--server/TracyWorker.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp
index 149341c0..aa975a5e 100644
--- a/server/TracyWorker.hpp
+++ b/server/TracyWorker.hpp
@@ -297,8 +297,11 @@ private:
#ifndef TRACY_NO_STATISTICS
unordered_flat_map<int16_t, SourceLocationZones> sourceLocationZones;
bool sourceLocationZonesReady = false;
+ unordered_flat_map<int16_t, GpuSourceLocationZones> gpuSourceLocationZones;
+ bool gpuSourceLocationZonesReady = false;
#else
unordered_flat_map<int16_t, uint64_t> sourceLocationZonesCnt;
+ unordered_flat_map<int16_t, uint64_t> gpuSourceLocationZonesCnt;
#endif
unordered_flat_map<VarArray<CallstackFrameId>*, uint32_t, VarArrayHasher<CallstackFrameId>, VarArrayComparator<CallstackFrameId>> callstackMap;
@@ -365,8 +368,10 @@ private:
std::pair<uint64_t, uint16_t> shrinkSrclocLast = std::make_pair( std::numeric_limits<uint64_t>::max(), 0 );
#ifndef TRACY_NO_STATISTICS
std::pair<uint16_t, SourceLocationZones*> srclocZonesLast = std::make_pair( 0, nullptr );
+ std::pair<uint16_t, GpuSourceLocationZones*> gpuZonesLast = std::make_pair( 0, nullptr );
#else
std::pair<uint16_t, uint64_t*> srclocCntLast = std::make_pair( 0, nullptr );
+ std::pair<uint16_t, uint64_t*> gpuCntLast = std::make_pair( 0, nullptr );
#endif
#ifndef TRACY_NO_STATISTICS
@@ -805,6 +810,13 @@ private:
return GetSourceLocationZonesReal( srcloc );
}
SourceLocationZones* GetSourceLocationZonesReal( uint16_t srcloc );
+
+ GpuSourceLocationZones* GetGpuSourceLocationZones( uint16_t srcloc )
+ {
+ if( m_data.gpuZonesLast.first == srcloc ) return m_data.gpuZonesLast.second;
+ return GetGpuSourceLocationZonesReal( srcloc );
+ }
+ GpuSourceLocationZones* GetGpuSourceLocationZonesReal( uint16_t srcloc );
#else
uint64_t* GetSourceLocationZonesCnt( uint16_t srcloc )
{
@@ -812,6 +824,13 @@ private:
return GetSourceLocationZonesCntReal( srcloc );
}
uint64_t* GetSourceLocationZonesCntReal( uint16_t srcloc );
+
+ uint64_t* GetGpuSourceLocationZonesCnt( uint16_t srcloc )
+ {
+ if( m_data.gpuCntLast.first == srcloc ) return m_data.gpuCntLast.second;
+ return GetGpuSourceLocationZonesCntReal( srcloc );
+ }
+ uint64_t* GetGpuSourceLocationZonesCntReal( uint16_t srcloc );
#endif
tracy_force_inline void NewZone( ZoneEvent* zone );