summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2020-10-21 16:26:53 +0000
committerDave Houlton <euclid@lindenlab.com>2020-10-21 16:26:53 +0000
commitd47114e5cb39b7e5aa5308b705cd1a77727be7f3 (patch)
tree892b2610e95ab23316d086941f9b3113569a5ee8 /indra/newview
parent1d25203cbf91bdf390ef9e9ae7c2b5d1b00bb7bb (diff)
parentd12305496f73e0b55e8e1ec327a2567ca713da22 (diff)
Merged in euclid-mDebugGPU (pull request #348)
Remove obsolete mDebugGPU variable and dependent code Approved-by: Andrey Kleshchev Approved-by: Michael Pohoreski
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/llappviewer.cpp36
-rw-r--r--indra/newview/llappviewer.h3
-rw-r--r--indra/newview/lldynamictexture.cpp9
-rw-r--r--indra/newview/llviewerdisplay.cpp5
-rw-r--r--indra/newview/llviewertexture.cpp7
-rw-r--r--indra/newview/llviewerwindow.cpp4
-rw-r--r--indra/newview/pipeline.cpp19
-rw-r--r--indra/newview/pipeline.h5
9 files changed, 4 insertions, 86 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 52dc4744f2..0b9cc78132 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -6564,7 +6564,7 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>MemoryFailurePreventionEnabled</key>
+ <key>MemoryFailurePreventionEnabled</key> <!-- deprecated, only used for obsolete-in-2020 Intel 965 Express GPU -->
<map>
<key>Comment</key>
<string>If set, the viewer will quit to avoid crash when memory failure happens</string>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 2feba40d23..4c4848390f 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1280,39 +1280,8 @@ void LLAppViewer::initMaxHeapSize()
//F32 max_heap_size_gb = llmin(1.6f, (F32)gSavedSettings.getF32("MaxHeapSize")) ;
F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize") ;
- BOOL enable_mem_failure_prevention = (BOOL)gSavedSettings.getBOOL("MemoryFailurePreventionEnabled") ;
- LLMemory::initMaxHeapSizeGB(max_heap_size_gb, enable_mem_failure_prevention) ;
-}
-
-void LLAppViewer::checkMemory()
-{
- const static F32 MEMORY_CHECK_INTERVAL = 1.0f ; //second
- //const static F32 MAX_QUIT_WAIT_TIME = 30.0f ; //seconds
- //static F32 force_quit_timer = MAX_QUIT_WAIT_TIME + MEMORY_CHECK_INTERVAL ;
-
- if(!gGLManager.mDebugGPU)
- {
- return ;
- }
-
- if(MEMORY_CHECK_INTERVAL > mMemCheckTimer.getElapsedTimeF32())
- {
- return ;
- }
- mMemCheckTimer.reset() ;
-
- //update the availability of memory
- LLMemory::updateMemoryInfo() ;
-
- bool is_low = LLMemory::isMemoryPoolLow() ;
-
- LLPipeline::throttleNewMemoryAllocation(is_low) ;
-
- if(is_low)
- {
- LLMemory::logMemoryInfo() ;
- }
+ LLMemory::initMaxHeapSizeGB(max_heap_size_gb);
}
static LLTrace::BlockTimerStatHandle FTM_MESSAGES("System Messages");
@@ -1391,9 +1360,6 @@ bool LLAppViewer::doFrame()
//clear call stack records
LL_CLEAR_CALLSTACKS();
- //check memory availability information
- checkMemory() ;
-
{
pingMainloopTimeout("Main:MiscNativeWindowEvents");
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 8f0f54de3b..f3c5f5b500 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -230,7 +230,6 @@ private:
bool initConfiguration(); // Initialize settings from the command line/config file.
void initStrings(); // Initialize LLTrans machinery
bool initCache(); // Initialize local client cache.
- void checkMemory() ;
// We have switched locations of both Mac and Windows cache, make sure
// files migrate and old cache is cleared out.
@@ -306,8 +305,6 @@ private:
LLAllocator mAlloc;
- LLFrameTimer mMemCheckTimer;
-
// llcorehttp library init/shutdown helper
LLAppCoreHttp mAppCoreHttp;
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index 89c20904c1..8b8273d183 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -56,13 +56,6 @@ LLViewerDynamicTexture::LLViewerDynamicTexture(S32 width, S32 height, S32 compon
{
llassert((1 <= components) && (components <= 4));
- if(gGLManager.mDebugGPU)
- {
- if(components == 3)
- {
- mComponents = 4 ; //convert to 32bits.
- }
- }
generateGLTexture();
llassert( 0 <= order && order < ORDER_COUNT );
@@ -211,7 +204,7 @@ void LLViewerDynamicTexture::postRender(BOOL success)
BOOL LLViewerDynamicTexture::updateAllInstances()
{
sNumRenders = 0;
- if (gGLManager.mIsDisabled || LLPipeline::sMemAllocationThrottled)
+ if (gGLManager.mIsDisabled)
{
return TRUE;
}
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index caf79edfe4..0c112047de 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -745,10 +745,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
glViewport(0,0,512,512);
LLVOAvatar::updateFreezeCounter() ;
- if(!LLPipeline::sMemAllocationThrottled)
- {
- LLVOAvatar::updateImpostors();
- }
+ LLVOAvatar::updateImpostors();
set_current_projection(proj);
set_current_modelview(mod);
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index a2cec9a613..6a3cdafecb 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -3289,13 +3289,6 @@ void LLViewerLODTexture::processTextureStats()
{
mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel);
}
- else if(LLPipeline::sMemAllocationThrottled)//release memory of large textures by decrease their resolutions.
- {
- if(scaleDown())
- {
- mDesiredDiscardLevel = mCachedRawDiscardLevel;
- }
- }
}
bool LLViewerLODTexture::scaleDown()
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index da0f98851d..053e18d627 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -4789,10 +4789,6 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
return FALSE;
}
//check if there is enough memory for the snapshot image
- if(LLPipeline::sMemAllocationThrottled)
- {
- return FALSE ; //snapshot taking is disabled due to memory restriction.
- }
if(image_width * image_height > (1 << 22)) //if snapshot image is larger than 2K by 2K
{
if(!LLMemory::tryToAlloc(NULL, image_width * image_height * 3))
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 604c5f770d..a898c2668b 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -347,7 +347,6 @@ bool LLPipeline::sRenderFrameTest = false;
bool LLPipeline::sRenderAttachedLights = true;
bool LLPipeline::sRenderAttachedParticles = true;
bool LLPipeline::sRenderDeferred = false;
-bool LLPipeline::sMemAllocationThrottled = false;
S32 LLPipeline::sVisibleLightCount = 0;
F32 LLPipeline::sMinRenderSize = 0.f;
bool LLPipeline::sRenderingHUDs;
@@ -717,24 +716,6 @@ void LLPipeline::destroyGL()
static LLTrace::BlockTimerStatHandle FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture");
-//static
-void LLPipeline::throttleNewMemoryAllocation(bool disable)
-{
- if(sMemAllocationThrottled != disable)
- {
- sMemAllocationThrottled = disable ;
-
- if(sMemAllocationThrottled)
- {
- //send out notification
- LLNotification::Params params("LowMemory");
- LLNotifications::instance().add(params);
-
- //release some memory.
- }
- }
-}
-
void LLPipeline::requestResizeScreenTexture()
{
gResizeScreenTexture = TRUE;
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 600bdd9d06..d93d6cb50c 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -413,10 +413,6 @@ public:
static void updateRenderDeferred();
static void refreshCachedSettings();
- static void throttleNewMemoryAllocation(bool disable);
-
-
-
void addDebugBlip(const LLVector3& position, const LLColor4& color);
void hidePermanentObjects( std::vector<U32>& restoreList );
@@ -598,7 +594,6 @@ public:
static bool sRenderAttachedLights;
static bool sRenderAttachedParticles;
static bool sRenderDeferred;
- static bool sMemAllocationThrottled;
static S32 sVisibleLightCount;
static F32 sMinRenderSize;
static bool sRenderingHUDs;