QtBase
v6.3.1
|
#include <qrhiprofiler_p.h>
Classes | |
class | CpuTime |
class | GpuTime |
Public Types | |
enum | StreamOp { NewBuffer = 1 , ReleaseBuffer , NewBufferStagingArea , ReleaseBufferStagingArea , NewRenderBuffer , ReleaseRenderBuffer , NewTexture , ReleaseTexture , NewTextureStagingArea , ReleaseTextureStagingArea , ResizeSwapChain , ReleaseSwapChain , NewReadbackBuffer , ReleaseReadbackBuffer , GpuMemAllocStats , GpuFrameTime , FrameToFrameTime , FrameBuildTime } |
Public Member Functions | |
~QRhiProfiler () | |
void | setDevice (QIODevice *device) |
void | addVMemAllocatorStats () |
int | frameTimingWriteInterval () const |
void | setFrameTimingWriteInterval (int frameCount) |
CpuTime | frameToFrameTimes (QRhiSwapChain *sc) const |
CpuTime | frameBuildTimes (QRhiSwapChain *sc) const |
GpuTime | gpuFrameTimes (QRhiSwapChain *sc) const |
Friends | |
class | QRhiImplementation |
class | QRhiProfilerPrivate |
Definition at line 61 of file qrhiprofiler_p.h.
Describes an entry in the profiler's output stream.
\value NewBuffer A buffer is created \value ReleaseBuffer A buffer is destroyed \value NewBufferStagingArea A staging buffer for buffer upload is created \value ReleaseBufferStagingArea A staging buffer for buffer upload is destroyed \value NewRenderBuffer A renderbuffer is created \value ReleaseRenderBuffer A renderbuffer is destroyed \value NewTexture A texture is created \value ReleaseTexture A texture is destroyed \value NewTextureStagingArea A staging buffer for texture upload is created \value ReleaseTextureStagingArea A staging buffer for texture upload is destroyed \value ResizeSwapChain A swapchain is created or resized \value ReleaseSwapChain A swapchain is destroyed \value NewReadbackBuffer A staging buffer for readback is created \value ReleaseReadbackBuffer A staging buffer for readback is destroyed \value GpuMemAllocStats GPU memory allocator statistics \value GpuFrameTime GPU frame times \value FrameToFrameTime CPU frame-to-frame times \value FrameBuildTime CPU beginFrame-endFrame times
Definition at line 64 of file qrhiprofiler_p.h.
QRhiProfiler::~QRhiProfiler | ( | ) |
Destructor.
Definition at line 188 of file qrhiprofiler.cpp.
void QRhiProfiler::addVMemAllocatorStats | ( | ) |
Requests writing a GpuMemAllocStats entry into the output, when applicable. Backends that do not support this will ignore the request. This is an explicit request since getting the allocator status and statistics may be an expensive operation.
Definition at line 214 of file qrhiprofiler.cpp.
QRhiProfiler::CpuTime QRhiProfiler::frameBuildTimes | ( | QRhiSwapChain * | sc | ) | const |
Definition at line 264 of file qrhiprofiler.cpp.
int QRhiProfiler::frameTimingWriteInterval | ( | ) | const |
Definition at line 223 of file qrhiprofiler.cpp.
QRhiProfiler::CpuTime QRhiProfiler::frameToFrameTimes | ( | QRhiSwapChain * | sc | ) | const |
Definition at line 248 of file qrhiprofiler.cpp.
QRhiProfiler::GpuTime QRhiProfiler::gpuFrameTimes | ( | QRhiSwapChain * | sc | ) | const |
The GPU times should only be compared between runs on the same GPU of the same system with the same backend. Comparing times for different graphics cards or for different backends can give misleading results. The numbers are not meant to be comparable that way.
Definition at line 289 of file qrhiprofiler.cpp.
Sets the output device.
Definition at line 203 of file qrhiprofiler.cpp.
void QRhiProfiler::setFrameTimingWriteInterval | ( | int | frameCount | ) |
Sets the number of frames that need to be rendered before the collected CPU and GPU timings are processed (min, max, average are calculated) to frameCount.
The default value is 120.
Definition at line 235 of file qrhiprofiler.cpp.
|
friend |
Definition at line 114 of file qrhiprofiler_p.h.
|
friend |
Definition at line 115 of file qrhiprofiler_p.h.