summaryrefslogtreecommitdiff
path: root/indra/newview/llfeaturemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfeaturemanager.cpp')
-rw-r--r--indra/newview/llfeaturemanager.cpp70
1 files changed, 9 insertions, 61 deletions
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index e6bbe234b3..e934041e2e 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -381,7 +381,10 @@ F32 gpu_benchmark();
F32 logExceptionBenchmark()
{
- // Todo: make a wrapper/class for SEH exceptions
+ // FIXME: gpu_benchmark uses many C++ classes on the stack to control state.
+ // SEH exceptions with our current exception handling options do not call
+ // destructors for these classes, resulting in an undefined state should
+ // this handler be invoked.
F32 gbps = -1;
__try
{
@@ -389,6 +392,9 @@ F32 logExceptionBenchmark()
}
__except (msc_exception_filter(GetExceptionCode(), GetExceptionInformation()))
{
+ // HACK - ensure that profiling is disabled
+ LLGLSLShader::finishProfile(false);
+
// convert to C++ styled exception
char integer_string[32];
sprintf(integer_string, "SEH, code: %lu\n", GetExceptionCode());
@@ -520,7 +526,6 @@ void LLFeatureManager::initSingleton()
void LLFeatureManager::applyRecommendedSettings()
{
- loadGPUClass();
// apply saved settings
// cap the level at 2 (high)
U32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5));
@@ -607,22 +612,6 @@ void LLFeatureManager::setGraphicsLevel(U32 level, bool skipFeatures)
// if we're passed an invalid level, default to "Low"
std::string features(isValidGraphicsLevel(level)? getNameForGraphicsLevel(level) : "Low");
- if (features == "Low")
- {
-#if LL_DARWIN
- // This Mac-specific change is to insure that we force 'Basic Shaders' for all Mac
- // systems which support them instead of falling back to fixed-function unnecessarily
- // MAINT-2157
- if (gGLManager.mGLVersion < 2.1f)
-#else
- // only use fixed function by default if GL version < 3.0 or this is an intel graphics chip
- if (gGLManager.mGLVersion < 3.f || gGLManager.mIsIntel)
-#endif
- {
- // same as Low, but with "Basic Shaders" disabled
- features = "LowFixedFunction";
- }
- }
maskFeatures(features);
@@ -670,46 +659,18 @@ void LLFeatureManager::applyBaseMasks()
}
// now all those wacky ones
- if (!gGLManager.mHasFragmentShader)
- {
- maskFeatures("NoPixelShaders");
- }
- if (!gGLManager.mHasVertexShader || !mGPUSupported)
- {
- maskFeatures("NoVertexShaders");
- }
if (gGLManager.mIsNVIDIA)
{
maskFeatures("NVIDIA");
}
- if (gGLManager.mIsGF2or4MX)
- {
- maskFeatures("GeForce2");
- }
- if (gGLManager.mIsATI)
- {
- maskFeatures("ATI");
- }
- if (gGLManager.mHasATIMemInfo && gGLManager.mVRAM < 256)
+ if (gGLManager.mIsAMD)
{
- maskFeatures("ATIVramLT256");
- }
- if (gGLManager.mATIOldDriver)
- {
- maskFeatures("ATIOldDriver");
- }
- if (gGLManager.mIsGFFX)
- {
- maskFeatures("GeForceFX");
+ maskFeatures("AMD");
}
if (gGLManager.mIsIntel)
{
maskFeatures("Intel");
}
- if (gGLManager.mGLVersion < 1.5f)
- {
- maskFeatures("OpenGLPre15");
- }
if (gGLManager.mGLVersion < 3.f)
{
maskFeatures("OpenGLPre30");
@@ -749,17 +710,6 @@ void LLFeatureManager::applyBaseMasks()
//LL_INFOS() << "Masking features from gpu table match: " << gpustr << LL_ENDL;
maskFeatures(gpustr);
- // now mask cpu type ones
- if (gSysMemory.getPhysicalMemoryKB() <= U32Megabytes(256))
- {
- maskFeatures("RAM256MB");
- }
-
- if (gSysCPU.getMHz() < 1100)
- {
- maskFeatures("CPUSlow");
- }
-
if (isSafe())
{
maskFeatures("safe");
@@ -774,11 +724,9 @@ LLSD LLFeatureManager::getRecommendedSettingsMap()
LLSD map(LLSD::emptyMap());
- loadGPUClass();
U32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5));
LL_INFOS("RenderInit") << "Getting the map of recommended settings for level " << level << LL_ENDL;
- applyBaseMasks();
std::string features(isValidGraphicsLevel(level) ? getNameForGraphicsLevel(level) : "Low");
maskFeatures(features);