docs
Loading...
Searching...
No Matches
GPUMemoryStats

#include <AppCore/GPUMemoryStats.h>

Overview

GPU memory statistics reported by the App's GPU driver.

Filled by App::GetGPUMemoryStats(). The per-category fields describe GPU resources the library has allocated through the active GPU backend; the process fields describe the video memory usage of the whole process as reported by the operating system (including allocations made outside the library).

How byte figures are computed depends on the active backend: backends that track allocations directly report exact allocation sizes, while others compute sizes from resource dimensions and formats, which may slightly understate the true driver allocation (internal alignment and padding are not visible).

Note
This structure may grow over time; new fields are appended and zero-initialized, so an unset field always reads back as zero.

Public Attributes

uint64_t texture_bytes = 0
 Bytes allocated for sampled textures (images, glyph atlases, and other engine textures), not counting render targets.
uint32_t texture_count = 0
 Number of sampled textures currently allocated.
uint64_t render_target_bytes = 0
 Bytes allocated for render targets, including multisample storage and any single-sample resolve textures.
uint32_t render_target_count = 0
 Number of render-target textures currently allocated.
uint64_t geometry_bytes = 0
 Bytes allocated for geometry (vertex and index buffers).
uint32_t geometry_count = 0
 Number of geometry buffers currently allocated.
uint64_t swap_chain_bytes = 0
 Bytes allocated for window back-buffers.
uint32_t swap_chain_count = 0
 Number of swap chains currently active.
uint64_t transient_bytes = 0
 Bytes allocated for transient per-frame memory (upload staging and constant buffers).
uint64_t allocator_committed_bytes = 0
 Total bytes of GPU heap memory committed by the backend's allocator.
uint64_t process_usage_bytes = 0
 Current video memory usage of this process, as reported by the operating system.
uint64_t process_budget_bytes = 0
 Video memory budget for this process, as reported by the operating system.
uint64_t adapter_video_memory_bytes = 0
 Dedicated video memory of the active display adapter, in bytes.
char adapter_description [128] = {}
 Human-readable name of the active display adapter (UTF-8, null-terminated, truncated if necessary).

Member Data Documentation

◆ adapter_description

char adapter_description[128] = {}

Human-readable name of the active display adapter (UTF-8, null-terminated, truncated if necessary).

◆ adapter_video_memory_bytes

uint64_t adapter_video_memory_bytes = 0

Dedicated video memory of the active display adapter, in bytes.

◆ allocator_committed_bytes

uint64_t allocator_committed_bytes = 0

Total bytes of GPU heap memory committed by the backend's allocator.

Only reported by backends that sub-allocate resources from larger heaps; zero elsewhere. May exceed the sum of the tracked categories due to heap block granularity.

◆ geometry_bytes

uint64_t geometry_bytes = 0

Bytes allocated for geometry (vertex and index buffers).

◆ geometry_count

uint32_t geometry_count = 0

Number of geometry buffers currently allocated.

◆ process_budget_bytes

uint64_t process_budget_bytes = 0

Video memory budget for this process, as reported by the operating system.

Usage above this value may cause the OS to throttle or evict allocations. Zero if the OS query is unavailable.

◆ process_usage_bytes

uint64_t process_usage_bytes = 0

Current video memory usage of this process, as reported by the operating system.

Covers the whole process, including allocations made outside the library. Zero if the OS query is unavailable.

◆ render_target_bytes

uint64_t render_target_bytes = 0

Bytes allocated for render targets, including multisample storage and any single-sample resolve textures.

◆ render_target_count

uint32_t render_target_count = 0

Number of render-target textures currently allocated.

◆ swap_chain_bytes

uint64_t swap_chain_bytes = 0

Bytes allocated for window back-buffers.

◆ swap_chain_count

uint32_t swap_chain_count = 0

Number of swap chains currently active.

◆ texture_bytes

uint64_t texture_bytes = 0

Bytes allocated for sampled textures (images, glyph atlases, and other engine textures), not counting render targets.

◆ texture_count

uint32_t texture_count = 0

Number of sampled textures currently allocated.

◆ transient_bytes

uint64_t transient_bytes = 0

Bytes allocated for transient per-frame memory (upload staging and constant buffers).


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