Send query ids of GPU times.

This commit is contained in:
Bartosz Taudul 2018-06-22 16:19:53 +02:00
parent 69c461cda3
commit 62267399bc
3 changed files with 3 additions and 1 deletions

View File

@ -117,6 +117,7 @@ public:
auto item = token->enqueue_begin<moodycamel::CanAlloc>( magic );
MemWrite( &item->hdr.type, QueueType::GpuTime );
MemWrite( &item->gpuTime.gpuTime, (int64_t)time );
MemWrite( &item->gpuTime.queryId, (uint16_t)m_tail );
MemWrite( &item->gpuTime.context, m_context );
tail.store( magic + 1, std::memory_order_release );
m_tail = ( m_tail + 1 ) % QueryCount;

View File

@ -149,6 +149,7 @@ public:
auto item = token->enqueue_begin<moodycamel::CanAlloc>( magic );
MemWrite( &item->hdr.type, QueueType::GpuTime );
MemWrite( &item->gpuTime.gpuTime, res[idx] );
MemWrite( &item->gpuTime.queryId, uint16_t( m_tail + idx ) );
MemWrite( &item->gpuTime.context, m_context );
tail.store( magic + 1, std::memory_order_release );
}
@ -185,7 +186,6 @@ private:
extern VkCtxWrapper s_vkCtx;
// TODO: not thread safe!
class VkCtxScope
{
public:

View File

@ -191,6 +191,7 @@ struct QueueGpuZoneEnd
struct QueueGpuTime
{
int64_t gpuTime;
uint16_t queryId;
uint8_t context;
};