Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions indra/newview/llfloaterinspect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<U32>(vram_bytes);
}
}

if (std::find(mTextureList.begin(), mTextureList.end(), uuid) == mTextureList.end())
{
mTextureList.push_back(uuid);
Expand Down