lovr.graphics.getStats

Edit

Returns various statistics about GPU usage.

stats = lovr.graphics.getStats()

Arguments

None

Returns

NameTypeDescription
statstable A table with statistics.
.bufferMemorynumber The amount of VRAM used by Buffer, Mesh, Model, etc. in bytes.
.textureMemorynumber The amount of VRAM used by Texture objects, in bytes.
.memoryBudgetnumber An estimate of the total amount of VRAM available for use by LÖVR, in bytes. This takes into account VRAM being used by other programs. Can be nil if the current GPU does not support querying this statistic.
.memoryUsagenumber An estimate of the total amount of VRAM currently being used by LÖVR, in bytes. This will often be larger than bufferMemory + textureMemory, since it includes other internal memory allocations made by LÖVR or the GPU driver (example: reserved memory, memory for shader variables, internal canvas textures). If this value approaches memoryBudget, the GPU driver may start paging allocations out to CPU RAM, or allocating more VRAM may start to fail. Can be nil if the current GPU does not support querying this statistic.

See also