Skip to main content

Module memory

Module memory 

Source
Expand description

Tracking of the GPU memory of the Buffers and Textures (see GpuMemory).

Sizes are estimated from the descriptors of the resources: the alignment, padding and compression of the driver are not counted.

Structs§

GpuAllocation
A tracked GPU resource, untracked when dropped. Keep it next to the resource.
GpuAllocationInfo
A live tracked GPU resource.
GpuMemory
GPU memory of the live Buffers and Textures, shared by the whole process. Resources created directly with wgpu are only counted if they hold a GpuAllocation.
GpuMemoryTotal

Enums§

GpuMemoryCategory
Category of a tracked GPU resource, deduced from its usages.

Functions§

texture_bytes
Estimated size in bytes of a 2D texture with all its mips, layers and samples.