class
GpuCommandBufferProfiler
Allows you to record timing and statistics for GPU command execution on a GPU command buffer.
Public
Constructors
GpuCommandBufferProfiler
Constructs a new command buffer profiler and allocates query pool.
Query pool reset is issued on the provided command buffer. Command buffer must not be in a render pass.
Methods
~GpuCommandBufferProfiler
BeginSample
Begins sample measurement.
Must be followed by EndSample(). If command buffer is currently within a render pass, EndSample() must also be issued within a render pass. If command buffer is currently outside of a render pass, EndSample() must be issued outside of a render pass.
- commandBuffer
- Command buffer to record the sample on, must be the same as the profiler was created for.
- name
- Unique name for the sample you can later use to find the sampling data.
EndSample
Ends sample measurement that started in BeginSample().
- commandBuffer
- Command buffer to record the sample on, must be the same as the profiler was created for.
IsEmpty
Returns true if the profiler doesn't have any samples.
Private
Methods
Clear
Clears all the internal data.
ConvertToResultSample
Converts a command buffer profiler sample and converts it to a result sample.
Caller must ensure that query pool has resolved the queries before calling.
GetResults
Converts all command buffer profiler samples into report samples.
Caller must ensure that query pool has resolved the queries before calling.