class
GpuProfiler
Profiler that measures time and amount of various GPU operations.
Public
Methods
~GpuProfiler
CreateCommandBufferProfiler
Creates a profiler that can be used for profiling commands on the provided command buffer.
Query pool reset command will be issued on the provided command buffer. Command buffer cannot be in render pass.
ResolveProfileWhenReady
Notifies the GPU profiler that we're done recording samples into the provided command buffer profiler.
The systems will then internally monitor command buffer completion resolve the profiler results when they are ready.
- name
- Name you can use to retrieve the results when ready.
- profiler
- Profiler holding the samples to resolve.
GetResults
Returns latest profiling results, if available.
Profiling results are consumed once retrieved and cannot be retrieved again.
- name
- Name given to the samples in call to ResolveProfileWhenReady.
Returns: Set of resolved root samples, or null if no results are available.
staticInstance
Returns a reference to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticInstancePtr
Returns a pointer to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticShutDown
Shuts down this module and frees any resources it is using.
staticIsStarted
Query if the module has been started.
Internal
Methods
Update
To be called once per frame from the render thread.
Clear
Releases all GPU resources held by the profiler.
Must be called on the render thread before shutdown.
Protected
Methods
~Module<T>
OnStartUp
Override if you want your module to be notified once it has been constructed and started.
OnShutDown
Override if you want your module to be notified just before it is deleted.
staticInstanceInternal
Returns a singleton instance of this module.
Private
Methods
FindOrCreateQueryPool
Attempts to find an existing free pool, or creates a new one if free one cannot be found.
ReleaseQueryPool
Notifies the system that the query pool is no longer used and can be re-used.