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

Defer OpenGL/Vulkan context announce.

This commit is contained in:
Bartosz Taudul
2018-07-11 15:00:30 +02:00
parent 26d5c4b302
commit 1f7246f6b9
2 changed files with 10 additions and 4 deletions
+5 -2
View File
@@ -65,7 +65,6 @@ public:
GLint bits;
glGetQueryiv( GL_TIMESTAMP, GL_QUERY_COUNTER_BITS, &bits );
#ifndef TRACY_ON_DEMAND
const float period = 1.f;
Magic magic;
auto& token = s_token.ptr;
@@ -78,8 +77,12 @@ public:
MemWrite( &item->gpuNewContext.period, period );
MemWrite( &item->gpuNewContext.context, m_context );
MemWrite( &item->gpuNewContext.accuracyBits, (uint8_t)bits );
tail.store( magic + 1, std::memory_order_release );
#ifdef TRACY_ON_DEMAND
s_profiler.DeferItem( *item );
#endif
tail.store( magic + 1, std::memory_order_release );
}
void Collect()