From 4dd88d758f731abc78642a3765ffbf306089645f Mon Sep 17 00:00:00 2001 From: Trish_sl Date: Sun, 26 Apr 2026 04:08:47 -0400 Subject: [PATCH] FIX - Inspect floater VRAM estimate overshoots by a lot on high res textures --- indra/newview/llfloaterinspect.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 41b03b652d..e42e035720 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -721,6 +721,16 @@ void LLFloaterInspect::calculateTextureMemory(LLViewerTexture* texture, uuid_vec U32 vram_memory = (texture->getFullHeight() * texture->getFullWidth() * 32 / 8); U32 texture_memory = (texture->getFullHeight() * texture->getFullWidth() * texture->getComponents()); + // Use actual GL memory instead of a fixed RGBA32 estimate if possible. + if (texture->hasGLTexture()) + { + const S32 vram_bytes = texture->getTextureMemory().value(); + if (vram_bytes > 0) + { + vram_memory = static_cast(vram_bytes); + } + } + if (std::find(mTextureList.begin(), mTextureList.end(), uuid) == mTextureList.end()) { mTextureList.push_back(uuid);