summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowmacosx.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-05-06 22:48:24 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-05-07 08:25:13 +0300
commitea268fcd48550f98baceef0294fd977ff12d2b35 (patch)
treee9c27493a8b1d6e20b31cb591b0074238470b2e5 /indra/llwindow/llwindowmacosx.cpp
parent7d87e41bbd5d4761b1eb17e49b7a00b948d84213 (diff)
viewer#799 getAvailableVRAMMegabytes cleanup
Diffstat (limited to 'indra/llwindow/llwindowmacosx.cpp')
-rw-r--r--indra/llwindow/llwindowmacosx.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index bfa893fff8..73230805b4 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -118,7 +118,6 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
U32 fsaa_samples,
U32 max_vram)
: LLWindow(NULL, fullscreen, flags)
- , mMaxVRAM(max_vram)
{
// *HACK: During window construction we get lots of OS events for window
// reshape, activate, etc. that the viewer isn't ready to handle.
@@ -1255,21 +1254,6 @@ F32 LLWindowMacOSX::getPixelAspectRatio()
return 1.f;
}
-U32 LLWindowMacOSX::getAvailableVRAMMegabytes() {
- // MTL (and MoltenVK) has some additional gpu data, such as recommendedMaxWorkingSetSize and currentAllocatedSize.
- // But these are not available for OpenGL and/or our current mimimum OS version.
- // So we will estimate.
- static const U32 mb = 1024*1024;
- // We're asked for total available gpu memory, but we only have allocation info on texture usage. So estimate by doubling that.
- static const U32 total_factor = 2; // estimated total/textures
- U32 total_vram = gGLManager.mVRAM;
- if (mMaxVRAM)
- {
- total_vram = llmin(mMaxVRAM, total_vram);
- }
- return total_vram - (LLImageGL::getTextureBytesAllocated() * total_factor/mb);
-}
-
//static SInt32 oldWindowLevel;
// MBW -- XXX -- There's got to be a better way than this. Find it, please...