mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Move common variables out of the loop.
This commit is contained in:
parent
f67465e784
commit
6008c85999
@ -87,14 +87,15 @@ public:
|
|||||||
|
|
||||||
start %= QueryCount;
|
start %= QueryCount;
|
||||||
|
|
||||||
|
Magic magic;
|
||||||
|
auto& token = s_token.ptr;
|
||||||
|
auto& tail = token->get_tail_index();
|
||||||
|
|
||||||
while( m_tail != start )
|
while( m_tail != start )
|
||||||
{
|
{
|
||||||
uint64_t time;
|
uint64_t time;
|
||||||
glGetQueryObjectui64v( m_query[m_tail], GL_QUERY_RESULT, &time );
|
glGetQueryObjectui64v( m_query[m_tail], GL_QUERY_RESULT, &time );
|
||||||
|
|
||||||
Magic magic;
|
|
||||||
auto& token = s_token.ptr;
|
|
||||||
auto& tail = token->get_tail_index();
|
|
||||||
auto item = token->enqueue_begin<moodycamel::CanAlloc>( magic );
|
auto item = token->enqueue_begin<moodycamel::CanAlloc>( magic );
|
||||||
item->hdr.type = QueueType::GpuTime;
|
item->hdr.type = QueueType::GpuTime;
|
||||||
item->gpuTime.gpuTime = (int64_t)time;
|
item->gpuTime.gpuTime = (int64_t)time;
|
||||||
@ -108,9 +109,6 @@ public:
|
|||||||
glGetInteger64v( GL_TIMESTAMP, &tgpu );
|
glGetInteger64v( GL_TIMESTAMP, &tgpu );
|
||||||
int64_t tcpu = Profiler::GetTime();
|
int64_t tcpu = Profiler::GetTime();
|
||||||
|
|
||||||
Magic magic;
|
|
||||||
auto& token = s_token.ptr;
|
|
||||||
auto& tail = token->get_tail_index();
|
|
||||||
auto item = token->enqueue_begin<moodycamel::CanAlloc>( magic );
|
auto item = token->enqueue_begin<moodycamel::CanAlloc>( magic );
|
||||||
item->hdr.type = QueueType::GpuResync;
|
item->hdr.type = QueueType::GpuResync;
|
||||||
item->gpuResync.cpuTime = tcpu;
|
item->gpuResync.cpuTime = tcpu;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user