mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +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 );
|
glGetInteger64v( GL_TIMESTAMP, &tgpu );
|
||||||
int64_t tcpu = Profiler::GetTime();
|
int64_t tcpu = Profiler::GetTime();
|
||||||
|
|
||||||
|
GLint bits;
|
||||||
|
glGetQueryiv( GL_TIMESTAMP, GL_QUERY_COUNTER_BITS, &bits );
|
||||||
|
|
||||||
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();
|
||||||
@ -67,6 +70,7 @@ public:
|
|||||||
item->gpuNewContext.gputime = tgpu;
|
item->gpuNewContext.gputime = tgpu;
|
||||||
item->gpuNewContext.thread = GetThreadHandle();
|
item->gpuNewContext.thread = GetThreadHandle();
|
||||||
item->gpuNewContext.context = m_context;
|
item->gpuNewContext.context = m_context;
|
||||||
|
item->gpuNewContext.accuracyBits = bits;
|
||||||
tail.store( magic + 1, std::memory_order_release );
|
tail.store( magic + 1, std::memory_order_release );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,6 +140,7 @@ struct QueueGpuNewContext
|
|||||||
int64_t gputime;
|
int64_t gputime;
|
||||||
uint64_t thread;
|
uint64_t thread;
|
||||||
uint16_t context;
|
uint16_t context;
|
||||||
|
uint8_t accuracyBits;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct QueueGpuZoneBegin
|
struct QueueGpuZoneBegin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user