mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
fixing collect wrap-around
This commit is contained in:
parent
a9538799da
commit
ad2c2efacd
@ -208,6 +208,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
if (RingIndex(begin) + count > RingSize())
|
||||
{
|
||||
count = RingSize() - RingIndex(begin);
|
||||
}
|
||||
|
||||
if (count >= MaxQueries)
|
||||
{
|
||||
fprintf(stdout, "TracyMetal: Collect: FULL [%llu, %llu] (%d)\n", begin, latestCheckpoint, count);
|
||||
@ -292,6 +297,11 @@ private:
|
||||
return static_cast<uint32_t>(count);
|
||||
}
|
||||
|
||||
tracy_force_inline uint32_t RingSize() const
|
||||
{
|
||||
return MaxQueries;
|
||||
}
|
||||
|
||||
tracy_force_inline unsigned int NextQueryId(int n=1)
|
||||
{
|
||||
auto id = m_queryCounter.fetch_add(n);
|
||||
|
Loading…
Reference in New Issue
Block a user