summaryrefslogtreecommitdiff
path: root/indra/llwindow/llopenglview-objc.mm
diff options
context:
space:
mode:
authorHoward Stearns <aech@lindenlab.com>2022-06-17 15:17:54 +0000
committerHoward Stearns <aech@lindenlab.com>2022-06-17 15:17:54 +0000
commita42a89001d545548eaf1684e73a918badce2837d (patch)
tree2650993a565233f5995e6abe44f14d48d48619ac /indra/llwindow/llopenglview-objc.mm
parentc9a48a1cdd23a592eb25454d5e2d6c316ec93445 (diff)
parent9d9c2037e10966bdf4b07ef3fed081c04a4ed30a (diff)
Merged in SL-17485 (pull request #1016)
SL-17485 - MacOS memory accounting Approved-by: Dave Parks
Diffstat (limited to 'indra/llwindow/llopenglview-objc.mm')
-rw-r--r--indra/llwindow/llopenglview-objc.mm7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm
index fd20f2ad15..8d064ec86c 100644
--- a/indra/llwindow/llopenglview-objc.mm
+++ b/indra/llwindow/llopenglview-objc.mm
@@ -141,7 +141,12 @@ attributedStringInfo getSegments(NSAttributedString *str)
CGLError the_err = CGLQueryRendererInfo (CGDisplayIDToOpenGLDisplayMask(kCGDirectMainDisplay), &info, &num_renderers);
if(0 == the_err)
{
- CGLDescribeRenderer (info, 0, kCGLRPTextureMemoryMegabytes, &vram_megabytes);
+ // The name, uses, and other platform definitions of gGLManager.mVRAM suggest that this is supposed to be total vram in MB,
+ // rather than, say, just the texture memory. The two exceptions are:
+ // 1. LLAppViewer::getViewerInfo() puts the value in a field labeled "TEXTURE_MEMORY"
+ // 2. For years, this present function used kCGLRPTextureMemoryMegabytes
+ // Now we use kCGLRPVideoMemoryMegabytes to bring it in line with everything else (except thatone label).
+ CGLDescribeRenderer (info, 0, kCGLRPVideoMemoryMegabytes, &vram_megabytes);
CGLDestroyRendererInfo (info);
}
else