summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-05-06 23:26:22 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-05-07 08:25:13 +0300
commitb31dad179a87c11d1806bb7dece5dae76ac76c62 (patch)
tree7800f58366f0fb05acae4856d45c13e1e5788def
parenta156998fa6abfca95740595b4cf2259a452cd0ce (diff)
viewer#799 Account for renderTarget
-rw-r--r--indra/newview/llviewertexture.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index dee68b2068..389da801df 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -494,10 +494,11 @@ void LLViewerTexture::updateClass()
F64 texture_bytes_alloc = LLImageGL::getTextureBytesAllocated() / 1024.0 / 512.0;
F64 vertex_bytes_alloc = LLVertexBuffer::getBytesAllocated() / 1024.0 / 512.0;
+ F64 render_bytes_alloc = LLRenderTarget::sBytesAllocated / 1024.0 / 512.0;
// get an estimate of how much video memory we're using
// NOTE: our metrics miss about half the vram we use, so this biases high but turns out to typically be within 5% of the real number
- F32 used = (F32)ll_round(texture_bytes_alloc + vertex_bytes_alloc);
+ F32 used = (F32)ll_round(texture_bytes_alloc + vertex_bytes_alloc + render_bytes_alloc);
F32 budget = max_vram_budget == 0 ? gGLManager.mVRAM : max_vram_budget;