mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Query OpenGL time stamp accuracy.
This commit is contained in:
parent
c15e692ee4
commit
c251690722
@ -58,6 +58,9 @@ public:
|
||||
glGetInteger64v( GL_TIMESTAMP, &tgpu );
|
||||
int64_t tcpu = Profiler::GetTime();
|
||||
|
||||
GLint bits;
|
||||
glGetQueryiv( GL_TIMESTAMP, GL_QUERY_COUNTER_BITS, &bits );
|
||||
|
||||
Magic magic;
|
||||
auto& token = s_token.ptr;
|
||||
auto& tail = token->get_tail_index();
|
||||
@ -67,6 +70,7 @@ public:
|
||||
item->gpuNewContext.gputime = tgpu;
|
||||
item->gpuNewContext.thread = GetThreadHandle();
|
||||
item->gpuNewContext.context = m_context;
|
||||
item->gpuNewContext.accuracyBits = bits;
|
||||
tail.store( magic + 1, std::memory_order_release );
|
||||
}
|
||||
|
||||
|
@ -140,6 +140,7 @@ struct QueueGpuNewContext
|
||||
int64_t gputime;
|
||||
uint64_t thread;
|
||||
uint16_t context;
|
||||
uint8_t accuracyBits;
|
||||
};
|
||||
|
||||
struct QueueGpuZoneBegin
|
||||
|
Loading…
Reference in New Issue
Block a user