- Qt 6.6
- Qt Quick 3D
- QML Types
- RenderStats
- Qt Quick 3D | Commercial or GPLv3

# RenderStats QML Type

Provides information of the scene rendering. More...

Import Statement: | import QtQuick3D

- List of all members, including inherited members

## Properties

- drawCallCount : quint64
- drawVertexCount : quint64
- effectGenerationTime : qint64
- extendedDataCollectionEnabled : bool
- fps : int
- frameTime : float
- graphicsAPIName : string
- imageDataSize : quint64
- lastCompletedGpuTime : float
- materialGenerationTime : qint64
- maxFrameTime : float
- meshDataSize : quint64
- pipelineCount : int
- pipelineCreationTime : qint64
- renderPassCount : int
- renderPrepareTime : float
- renderTime : float
- syncTime : float
- vmemAllocCount : quint32
- vmemUsedBytes : quint64

## Detailed Description

The RenderStats type provides information about scene rendering statistics. This cannot be created directly, but can be retrieved from a View3D.

Use the DebugView item to display the data on-screen.

## Property Documentation

[read-only, since 6.5] drawCallCount : quint64

This property holds the total number of draw calls (including non-indexed, indexed, instanced, and instanced indexed draw calls) that were registered during the last render of the View3D.

The value is updated only when extendedDataCollectionEnabled is enabled.

This property was introduced in Qt 6.5.

[read-only, since 6.5] drawVertexCount : quint64

This property holds the total number of vertices in draw calls that were registered during the last render of the View3D.

The value includes the number of vertex and index count from draw calls that were registered during the last render of the View3D. While the number is not guaranteed to be totally accurate, it is expected to give a good indication of the complexity of the scene rendering.

The value is updated only when extendedDataCollectionEnabled is enabled.

This property was introduced in Qt 6.5.

[read-only, since 6.5] effectGenerationTime : qint64

This property holds the total number of milliseconds spent on generating and processing shader code for post-processing effects in the window the View3D belongs to.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

[since 6.5] extendedDataCollectionEnabled : bool

This property controls if render pass and draw call statistics are processed and made available. This may incur a small performance cost and is therefore optional.

Properties such as drawCallCount, drawVertexCount, or renderPassCount are updated only when this property is set to true.

The default value is false.

Note: Changing the visibility of a DebugView associated with the View3D automatically toggles the value based on the DebugView's visible property.

This property was introduced in Qt 6.5.

[read-only] fps : int

This property holds the number of frames rendered during the last second.

[read-only] frameTime : float

This property holds the amount of time elapsed since the last frame, in milliseconds.

[read-only, since 6.5] graphicsAPIName : string

This property holds the name of the current graphics API (RHI) backend currently in use.

This property was introduced in Qt 6.5.

[read-only, since 6.5] imageDataSize : quint64

This property holds the approximate size in bytes of the image data for texture maps currently registered with the View3D's window. The value is per-window, meaning if there are multiple View3D objects within the same QQuickWindow, those will likely report the same value.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

[read-only, since 6.6] lastCompletedGpuTime : float

When GPU timing collection is enabled in Qt Quick, and the relevant features are supported by the underlying graphics API, this property contains the last retrieved elapsed GPU time in milliseconds.

Note: The value is retrieved asynchronously, and usually refers to a frame older than the previous one, meaning that the value is not necessarily in sync with the other, CPU-side timings.

Note: The result is based on the rendering of the entire contents of the QQuickWindow the View3D belongs to. It includes all the contents of Qt Quick scene, including all 2D elements and all View3D items within that window.

This property was introduced in Qt 6.6.

See also QQuickGraphicsConfiguration::setTimestamps().

[read-only, since 6.5] materialGenerationTime : qint64

This property holds the total number of milliseconds spent on generating and processing shader code for DefaultMaterial, PrincipledMaterial, and CustomMaterial in the window the View3D belongs to.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

[read-only] maxFrameTime : float

This property holds the maximum time spent rendering a single frame during the last second.

[read-only, since 6.5] meshDataSize : quint64

This property holds the approximate size in bytes of the mesh data currently registered with the View3D's window. The value is per-window, meaning if there are multiple View3D objects within the same QQuickWindow, those will likely report the same value.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

[read-only, since 6.5] pipelineCount : int

This property holds the total number of cached graphics pipelines for the window the View3D belongs to.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

[read-only, since 6.5] pipelineCreationTime : qint64

This property holds the total number of milliseconds spent on creating graphics pipelines on the rendering hardware interface level. This can include, among other things: compilation times for compiling HLSL to an intermediate format, compiling MSL, compiling GLSL code with glCompileShader or linking using program binaries, and generating Vulkan pipelines with all that entails (e.g. SPIR-V -> ISA compilation). The value reflects all Qt Quick and Qt Quick 3D rendering in the window the View3D belongs to.

Note: The value includes operations that are under Qt's control. Depending on the underlying graphics API, some pipeline (shader, graphics state) related operations may happen asynchronously, and may be affected by caching on various levels in the graphics stack. Releasing cached resource by calling QQuickWindow::releaseResources() or clicking the corresponding DebugView button may also have varying results, depending on the underlying details (rhi backend, graphics API); it may or may not affect this counter due to a varying number of factors.

This timing is provided as a general, high level indication. Combined with materialGenerationTime, application developers can use these values to confirm that the time spent on material and graphics pipeline processing is reasonably low during the normal use of the application, once all caches (both persistent and in-memory) are warm. Avoid drawing conclusions from the first run of the application. (since that may not benefit from persistent, disk-based caches yet)

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

[read-only, since 6.5] renderPassCount : int

This property holds the total number of render passes that were registered during the last render of the View3D.

Many features, such as realtime shadow mapping, postprocessing effects, the depth and screen textures, and certain antialiasing methods involve multiple additional render passes. While the number is not guaranteed to include absolutely all render passes, it is expected to give a good indication of the complexity of the scene rendering.

The value is updated only when extendedDataCollectionEnabled is enabled.

This property was introduced in Qt 6.5.

[read-only] renderPrepareTime : float

This property holds the amount of time spent in the preparation phase of rendering, in milliseconds. This is a subset of the total render time reported in renderTime.

[read-only] renderTime : float

This property holds the amount of time spent on generating a new frame, including both the preparation phase and the recording of draw calls. The value is in milliseconds.

[read-only] syncTime : float

This property holds the amount of time spent inside the sync function, in milliseconds. The property values of the objects are updated during the sync.

[read-only, since 6.5] vmemAllocCount : quint32

When applicable, the number of allocations made by the graphics memory allocator library. This includes allocations from all Qt Quick and Qt Quick 3D rendering in the QQuickWindow to which the View3D belongs. The value is zero with graphics APIs such as OpenGL, Direct3D, and Metal because memory allocation is not under Qt's control then.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.

[read-only, since 6.5] vmemUsedBytes : quint64

When applicable, the number of bytes used by allocations made by the graphics memory allocator library. This includes allocations from all Qt Quick and Qt Quick 3D rendering in the QQuickWindow to which the View3D belongs. The value is zero with graphics APIs such as OpenGL, Direct3D, and Metal because memory allocation is not under Qt's control then.

The value is updated only when extendedDataCollectionEnabled is enabled.

Note: The value is reported on a per-QQuickWindow basis. If there are multiple View3D instances within the same window, the DebugView shows the same value for all those View3Ds.

This property was introduced in Qt 6.5.