mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Defer OpenGL/Vulkan context announce.
This commit is contained in:
parent
26d5c4b302
commit
1f7246f6b9
@ -65,7 +65,6 @@ public:
|
|||||||
GLint bits;
|
GLint bits;
|
||||||
glGetQueryiv( GL_TIMESTAMP, GL_QUERY_COUNTER_BITS, &bits );
|
glGetQueryiv( GL_TIMESTAMP, GL_QUERY_COUNTER_BITS, &bits );
|
||||||
|
|
||||||
#ifndef TRACY_ON_DEMAND
|
|
||||||
const float period = 1.f;
|
const float period = 1.f;
|
||||||
Magic magic;
|
Magic magic;
|
||||||
auto& token = s_token.ptr;
|
auto& token = s_token.ptr;
|
||||||
@ -78,8 +77,12 @@ public:
|
|||||||
MemWrite( &item->gpuNewContext.period, period );
|
MemWrite( &item->gpuNewContext.period, period );
|
||||||
MemWrite( &item->gpuNewContext.context, m_context );
|
MemWrite( &item->gpuNewContext.context, m_context );
|
||||||
MemWrite( &item->gpuNewContext.accuracyBits, (uint8_t)bits );
|
MemWrite( &item->gpuNewContext.accuracyBits, (uint8_t)bits );
|
||||||
tail.store( magic + 1, std::memory_order_release );
|
|
||||||
|
#ifdef TRACY_ON_DEMAND
|
||||||
|
s_profiler.DeferItem( *item );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
tail.store( magic + 1, std::memory_order_release );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Collect()
|
void Collect()
|
||||||
|
@ -97,7 +97,6 @@ public:
|
|||||||
vkQueueSubmit( queue, 1, &submitInfo, VK_NULL_HANDLE );
|
vkQueueSubmit( queue, 1, &submitInfo, VK_NULL_HANDLE );
|
||||||
vkQueueWaitIdle( queue );
|
vkQueueWaitIdle( queue );
|
||||||
|
|
||||||
#ifndef TRACY_ON_DEMAND
|
|
||||||
Magic magic;
|
Magic magic;
|
||||||
auto& token = s_token.ptr;
|
auto& token = s_token.ptr;
|
||||||
auto& tail = token->get_tail_index();
|
auto& tail = token->get_tail_index();
|
||||||
@ -109,8 +108,12 @@ public:
|
|||||||
MemWrite( &item->gpuNewContext.period, period );
|
MemWrite( &item->gpuNewContext.period, period );
|
||||||
MemWrite( &item->gpuNewContext.context, m_context );
|
MemWrite( &item->gpuNewContext.context, m_context );
|
||||||
MemWrite( &item->gpuNewContext.accuracyBits, uint8_t( 0 ) );
|
MemWrite( &item->gpuNewContext.accuracyBits, uint8_t( 0 ) );
|
||||||
tail.store( magic + 1, std::memory_order_release );
|
|
||||||
|
#ifdef TRACY_ON_DEMAND
|
||||||
|
s_profiler.DeferItem( *item );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
tail.store( magic + 1, std::memory_order_release );
|
||||||
}
|
}
|
||||||
|
|
||||||
~VkCtx()
|
~VkCtx()
|
||||||
|
Loading…
Reference in New Issue
Block a user