Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CProfiler2GPUImpl Class Reference

At each enter/leave-region event, we do an async GPU timestamp query. More...

Collaboration diagram for CProfiler2GPUImpl:

Classes

struct  SEvent
 
struct  SFrame
 

Public Member Functions

 CProfiler2GPUImpl (CProfiler2 &profiler)
 
 ~CProfiler2GPUImpl ()
 
void FrameStart (Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
 
void FrameEnd (Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
 
void RecordRegion (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const char *id, bool isEnter)
 
void RegionEnter (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const char *id)
 
void RegionLeave (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const char *id)
 

Private Member Functions

 NONCOPYABLE (CProfiler2GPUImpl)
 
void ProcessFrames ()
 
void PopFrontFrame ()
 
uint32_t NewQuery ()
 

Private Attributes

std::deque< SFrame > m_Frames
 
CProfiler2 & m_Profiler
 
CProfiler2::ThreadStorage & m_Storage
 
std::vector< uint32_t > m_FreeQueries
 

Detailed Description

At each enter/leave-region event, we do an async GPU timestamp query.

When all the queries for a frame have their results available, we convert their GPU timestamps into durations and record the data.

Constructor & Destructor Documentation

◆ CProfiler2GPUImpl()

CProfiler2GPUImpl::CProfiler2GPUImpl ( CProfiler2 &  profiler)
inline

◆ ~CProfiler2GPUImpl()

CProfiler2GPUImpl::~CProfiler2GPUImpl ( )
inline

Member Function Documentation

◆ FrameEnd()

void CProfiler2GPUImpl::FrameEnd ( Renderer::Backend::IDeviceCommandContext *  deviceCommandContext)
inline

◆ FrameStart()

void CProfiler2GPUImpl::FrameStart ( Renderer::Backend::IDeviceCommandContext *  deviceCommandContext)
inline

◆ NewQuery()

uint32_t CProfiler2GPUImpl::NewQuery ( )
inlineprivate

◆ NONCOPYABLE()

CProfiler2GPUImpl::NONCOPYABLE ( CProfiler2GPUImpl  )
private

◆ PopFrontFrame()

void CProfiler2GPUImpl::PopFrontFrame ( )
inlineprivate

◆ ProcessFrames()

void CProfiler2GPUImpl::ProcessFrames ( )
inlineprivate

◆ RecordRegion()

void CProfiler2GPUImpl::RecordRegion ( Renderer::Backend::IDeviceCommandContext *  deviceCommandContext,
const char *  id,
bool  isEnter 
)
inline

◆ RegionEnter()

void CProfiler2GPUImpl::RegionEnter ( Renderer::Backend::IDeviceCommandContext *  deviceCommandContext,
const char *  id 
)
inline

◆ RegionLeave()

void CProfiler2GPUImpl::RegionLeave ( Renderer::Backend::IDeviceCommandContext *  deviceCommandContext,
const char *  id 
)
inline

Member Data Documentation

◆ m_Frames

std::deque<SFrame> CProfiler2GPUImpl::m_Frames
private

◆ m_FreeQueries

std::vector<uint32_t> CProfiler2GPUImpl::m_FreeQueries
private

◆ m_Profiler

CProfiler2& CProfiler2GPUImpl::m_Profiler
private

◆ m_Storage

CProfiler2::ThreadStorage& CProfiler2GPUImpl::m_Storage
private

The documentation for this class was generated from the following file: