diff options
Diffstat (limited to 'indra/newview/llfeaturemanager.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llfeaturemanager.cpp | 548 |
1 files changed, 383 insertions, 165 deletions
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index fb724f30e0..ea39f812fd 100644..100755 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -2,31 +2,25 @@ * @file llfeaturemanager.cpp * @brief LLFeatureManager class implementation * - * $LicenseInfo:firstyear=2003&license=viewergpl$ - * - * Copyright (c) 2003-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2003&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -36,42 +30,54 @@ #include <fstream> #include <boost/regex.hpp> +#include <boost/assign/list_of.hpp> #include "llfeaturemanager.h" #include "lldir.h" #include "llsys.h" #include "llgl.h" -#include "llsecondlifeurls.h" #include "llappviewer.h" +#include "llbufferstream.h" +#include "llhttpclient.h" +#include "llnotificationsutil.h" #include "llviewercontrol.h" #include "llworld.h" #include "lldrawpoolterrain.h" #include "llviewertexturelist.h" +#include "llversioninfo.h" #include "llwindow.h" #include "llui.h" #include "llcontrol.h" #include "llboost.h" #include "llweb.h" +#include "llviewershadermgr.h" +#include "llstring.h" +#include "stringize.h" #if LL_WINDOWS #include "lldxhardware.h" #endif +#define LL_EXPORT_GPU_TABLE 0 #if LL_DARWIN const char FEATURE_TABLE_FILENAME[] = "featuretable_mac.txt"; +const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_mac.%s.txt"; #elif LL_LINUX const char FEATURE_TABLE_FILENAME[] = "featuretable_linux.txt"; +const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_linux.%s.txt"; #elif LL_SOLARIS const char FEATURE_TABLE_FILENAME[] = "featuretable_solaris.txt"; +const char FEATURE_TABLE_VER_FILENAME[] = "featuretable_solaris.%s.txt"; #else -const char FEATURE_TABLE_FILENAME[] = "featuretable.txt"; +const char FEATURE_TABLE_FILENAME[] = "featuretable%s.txt"; +const char FEATURE_TABLE_VER_FILENAME[] = "featuretable%s.%s.txt"; #endif -const char GPU_TABLE_FILENAME[] = "gpu_table.txt"; - +#if 0 // consuming code in #if 0 below +#endif LLFeatureInfo::LLFeatureInfo(const std::string& name, const BOOL available, const F32 level) : mValid(TRUE), mName(name), mAvailable(available), mRecommendedLevel(level) { @@ -104,7 +110,7 @@ BOOL LLFeatureList::isFeatureAvailable(const std::string& name) return mFeatures[name].mAvailable; } - LL_WARNS("RenderInit") << "Feature " << name << " not on feature list!" << LL_ENDL; + LL_WARNS_ONCE("RenderInit") << "Feature " << name << " not on feature list!" << LL_ENDL; // changing this to TRUE so you have to explicitly disable // something for it to be disabled @@ -118,13 +124,13 @@ F32 LLFeatureList::getRecommendedValue(const std::string& name) return mFeatures[name].mRecommendedLevel; } - LL_WARNS("RenderInit") << "Feature " << name << " not on feature list or not available!" << LL_ENDL; + LL_WARNS_ONCE("RenderInit") << "Feature " << name << " not on feature list or not available!" << LL_ENDL; return 0; } BOOL LLFeatureList::maskList(LLFeatureList &mask) { - //llinfos << "Masking with " << mask.mName << llendl; + //LL_INFOS() << "Masking with " << mask.mName << LL_ENDL; // // Lookup the specified feature mask, and overlay it on top of the // current feature mask. @@ -183,6 +189,55 @@ void LLFeatureList::dump() LL_DEBUGS("RenderInit") << LL_ENDL; } +static const std::vector<std::string> sGraphicsLevelNames = boost::assign::list_of + ("Low") + ("LowMid") + ("Mid") + ("MidHigh") + ("High") + ("HighUltra") + ("Ultra") +; + +U32 LLFeatureManager::getMaxGraphicsLevel() const +{ + return sGraphicsLevelNames.size() - 1; +} + +bool LLFeatureManager::isValidGraphicsLevel(U32 level) const +{ + return (level <= getMaxGraphicsLevel()); +} + +std::string LLFeatureManager::getNameForGraphicsLevel(U32 level) const +{ + if (isValidGraphicsLevel(level)) + { + return sGraphicsLevelNames[level]; + } + return STRINGIZE("Invalid graphics level " << level << ", valid are 0 .. " + << getMaxGraphicsLevel()); +} + +S32 LLFeatureManager::getGraphicsLevelForName(const std::string& name) const +{ + const std::string FixedFunction("FixedFunction"); + std::string rname(name); + if (LLStringUtil::endsWith(rname, FixedFunction)) + { + // chop off any "FixedFunction" suffix + rname = rname.substr(0, rname.length() - FixedFunction.length()); + } + for (S32 i(0), iend(getMaxGraphicsLevel()); i <= iend; ++i) + { + if (sGraphicsLevelNames[i] == rname) + { + return i; + } + } + return -1; +} + LLFeatureList *LLFeatureManager::findMask(const std::string& name) { if (mMaskList.count(name)) @@ -201,11 +256,11 @@ BOOL LLFeatureManager::maskFeatures(const std::string& name) LL_DEBUGS("RenderInit") << "Unknown feature mask " << name << LL_ENDL; return FALSE; } - LL_DEBUGS("RenderInit") << "Applying Feature Mask: " << name << LL_ENDL; + LL_INFOS("RenderInit") << "Applying GPU Feature list: " << name << LL_ENDL; return maskList(*maskp); } -BOOL LLFeatureManager::loadFeatureTables() +bool LLFeatureManager::loadFeatureTables() { // *TODO - if I or anyone else adds something else to the skipped list // make this data driven. Put it in the feature table and parse it @@ -215,22 +270,72 @@ BOOL LLFeatureManager::loadFeatureTables() mSkippedFeatures.insert("RenderVBOEnable"); mSkippedFeatures.insert("RenderFogRatio"); - std::string data_path = gDirUtilp->getAppRODataDir(); + // first table is install with app + std::string app_path = gDirUtilp->getAppRODataDir(); + app_path += gDirUtilp->getDirDelimiter(); + + std::string filename; + std::string http_filename; +#if LL_WINDOWS + std::string os_string = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + if (os_string.find("Microsoft Windows XP") == 0) + { + filename = llformat(FEATURE_TABLE_FILENAME, "_xp"); + http_filename = llformat(FEATURE_TABLE_VER_FILENAME, "_xp", LLVersionInfo::getVersion().c_str()); + } + else + { + filename = llformat(FEATURE_TABLE_FILENAME, ""); + http_filename = llformat(FEATURE_TABLE_VER_FILENAME, "", LLVersionInfo::getVersion().c_str()); + } +#else + filename = FEATURE_TABLE_FILENAME; + http_filename = llformat(FEATURE_TABLE_VER_FILENAME, LLVersionInfo::getVersion().c_str()); +#endif + + app_path += filename; + + + // second table is downloaded with HTTP + std::string http_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, http_filename); + + // use HTTP table if it exists + std::string path; + bool parse_ok = false; + if (gDirUtilp->fileExists(http_path)) + { + parse_ok = parseFeatureTable(http_path); + if (!parse_ok) + { + // the HTTP table failed to parse, so delete it + LLFile::remove(http_path); + LL_WARNS("RenderInit") << "Removed invalid feature table '" << http_path << "'" << LL_ENDL; + } + } + + if (!parse_ok) + { + parse_ok = parseFeatureTable(app_path); + } + + return parse_ok; +} - data_path += gDirUtilp->getDirDelimiter(); - data_path += FEATURE_TABLE_FILENAME; - lldebugs << "Looking for feature table in " << data_path << llendl; +bool LLFeatureManager::parseFeatureTable(std::string filename) +{ + LL_INFOS("RenderInit") << "Attempting to parse feature table from " << filename << LL_ENDL; llifstream file; std::string name; U32 version; - file.open(data_path); /*Flawfinder: ignore*/ + cleanupFeatureTables(); // in case an earlier attempt left partial results + file.open(filename.c_str()); /*Flawfinder: ignore*/ if (!file) { - LL_WARNS("RenderInit") << "Unable to open feature table!" << LL_ENDL; + LL_WARNS("RenderInit") << "Unable to open feature table " << filename << LL_ENDL; return FALSE; } @@ -239,18 +344,17 @@ BOOL LLFeatureManager::loadFeatureTables() file >> version; if (name != "version") { - LL_WARNS("RenderInit") << data_path << " does not appear to be a valid feature table!" << LL_ENDL; - return FALSE; + LL_WARNS("RenderInit") << filename << " does not appear to be a valid feature table!" << LL_ENDL; + return false; } mTableVersion = version; LLFeatureList *flp = NULL; - while (!file.eof() && file.good()) + bool parse_ok = true; + while (file >> name && parse_ok) { char buffer[MAX_STRING]; /*Flawfinder: ignore*/ - - file >> name; if (name.substr(0,2) == "//") { @@ -259,149 +363,224 @@ BOOL LLFeatureManager::loadFeatureTables() continue; } - if (name.empty()) - { - // This is a blank line - file.getline(buffer, MAX_STRING); - continue; - } - if (name == "list") { + LL_DEBUGS("RenderInit") << "Before new list" << std::endl; if (flp) { - //flp->dump(); + flp->dump(); } + else + { + LL_CONT << "No current list"; + } + LL_CONT << LL_ENDL; + // It's a new mask, create it. file >> name; - if (mMaskList.count(name)) + if (!mMaskList.count(name)) { - LL_ERRS("RenderInit") << "Overriding mask " << name << ", this is invalid!" << LL_ENDL; - } - flp = new LLFeatureList(name); mMaskList[name] = flp; } else { - if (!flp) - { - LL_ERRS("RenderInit") << "Specified parameter before <list> keyword!" << LL_ENDL; + LL_WARNS("RenderInit") << "Overriding mask " << name << ", this is invalid!" << LL_ENDL; + parse_ok = false; } + } + else + { + if (flp) + { S32 available; F32 recommended; file >> available >> recommended; flp->addFeature(name, available, recommended); } + else + { + LL_WARNS("RenderInit") << "Specified parameter before <list> keyword!" << LL_ENDL; + parse_ok = false; + } + } } file.close(); - return TRUE; + if (!parse_ok) + { + LL_WARNS("RenderInit") << "Discarding feature table data from " << filename << LL_ENDL; + cleanupFeatureTables(); + } + + return parse_ok; } -void LLFeatureManager::loadGPUClass() -{ - std::string data_path = gDirUtilp->getAppRODataDir(); +F32 gpu_benchmark(); - data_path += gDirUtilp->getDirDelimiter(); +bool LLFeatureManager::loadGPUClass() +{ + //get memory bandwidth from benchmark + F32 gbps = gpu_benchmark(); - data_path += GPU_TABLE_FILENAME; + if (gbps < 0.f) + { //couldn't bench, use GLVersion +#if LL_DARWIN + //GLVersion is misleading on OSX, just default to class 3 if we can't bench + LL_WARNS() << "Unable to get an accurate benchmark; defaulting to class 3" << LL_ENDL; + mGPUClass = GPU_CLASS_3; +#else + if (gGLManager.mGLVersion < 2.f) + { + mGPUClass = GPU_CLASS_0; + } + else if (gGLManager.mGLVersion < 3.f) + { + mGPUClass = GPU_CLASS_1; + } + else if (gGLManager.mGLVersion < 3.3f) + { + mGPUClass = GPU_CLASS_2; + } + else if (gGLManager.mGLVersion < 4.f) + { + mGPUClass = GPU_CLASS_3; + } + else + { + mGPUClass = GPU_CLASS_4; + } +#endif + } + else if (gGLManager.mGLVersion <= 2.f) + { + mGPUClass = GPU_CLASS_0; + } + else if (gGLManager.mGLVersion <= 3.f) + { + mGPUClass = GPU_CLASS_1; + } + else if (gbps <= 5.f) + { + mGPUClass = GPU_CLASS_0; + } + else if (gbps <= 8.f) + { + mGPUClass = GPU_CLASS_1; + } + else if (gbps <= 16.f) + { + mGPUClass = GPU_CLASS_2; + } + else if (gbps <= 40.f) + { + mGPUClass = GPU_CLASS_3; + } + else if (gbps <= 80.f) + { + mGPUClass = GPU_CLASS_4; + } + else + { + mGPUClass = GPU_CLASS_5; + } // defaults - mGPUClass = GPU_CLASS_UNKNOWN; mGPUString = gGLManager.getRawGLString(); - mGPUSupported = FALSE; + mGPUSupported = TRUE; - llifstream file; - - file.open(data_path); /*Flawfinder: ignore*/ + return true; // indicates that a gpu value was established +} - if (!file) - { - LL_WARNS("RenderInit") << "Unable to open GPU table: " << data_path << "!" << LL_ENDL; - return; - } + +// responder saves table into file +class LLHTTPFeatureTableResponder : public LLHTTPClient::Responder +{ + LOG_CLASS(LLHTTPFeatureTableResponder); +public: - std::string renderer = gGLManager.getRawGLString(); - for (std::string::iterator i = renderer.begin(); i != renderer.end(); ++i) + LLHTTPFeatureTableResponder(std::string filename) : + mFilename(filename) { - *i = tolower(*i); } + - while (!file.eof()) + virtual void completedRaw(const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer) { - char buffer[MAX_STRING]; /*Flawfinder: ignore*/ - buffer[0] = 0; - - file.getline(buffer, MAX_STRING); - - if (strlen(buffer) >= 2 && /*Flawfinder: ignore*/ - buffer[0] == '/' && - buffer[1] == '/') + if (isGoodStatus()) { - // This is a comment. - continue; - } + // write to file - if (strlen(buffer) == 0) /*Flawfinder: ignore*/ + LL_INFOS() << "writing feature table to " << mFilename << LL_ENDL; + + S32 file_size = buffer->countAfter(channels.in(), NULL); + if (file_size > 0) + { + // read from buffer + U8* copy_buffer = new U8[file_size]; + buffer->readAfter(channels.in(), NULL, copy_buffer, file_size); + + // write to file + LLAPRFile out(mFilename, LL_APR_WB); + out.write(copy_buffer, file_size); + out.close(); + } + } + else { - // This is a blank line - continue; + char body[1025]; + body[1024] = '\0'; + LLBufferStream istr(channels, buffer.get()); + istr.get(body,1024); + if (strlen(body) > 0) + { + mContent["body"] = body; + } + LL_WARNS() << dumpResponse() << LL_ENDL; } + } + +private: + std::string mFilename; +}; - // setup the tokenizer - std::string buf(buffer); - std::string cls, label, expr, supported; - boost_tokenizer tokens(buf, boost::char_separator<char>("\t\n")); - boost_tokenizer::iterator token_iter = tokens.begin(); +void fetch_feature_table(std::string table) +{ + const std::string base = gSavedSettings.getString("FeatureManagerHTTPTable"); - // grab the label, pseudo regular expression, and class - if(token_iter != tokens.end()) - { - label = *token_iter++; - } - if(token_iter != tokens.end()) - { - expr = *token_iter++; - } - if(token_iter != tokens.end()) - { - cls = *token_iter++; - } - if(token_iter != tokens.end()) - { - supported = *token_iter++; - } +#if LL_WINDOWS + std::string os_string = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); + std::string filename; + if (os_string.find("Microsoft Windows XP") == 0) + { + filename = llformat(table.c_str(), "_xp", LLVersionInfo::getVersion().c_str()); + } + else + { + filename = llformat(table.c_str(), "", LLVersionInfo::getVersion().c_str()); + } +#else + const std::string filename = llformat(table.c_str(), LLVersionInfo::getVersion().c_str()); +#endif - if (label.empty() || expr.empty() || cls.empty() || supported.empty()) - { - continue; - } + const std::string url = base + "/" + filename; + + const std::string path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename); + + LL_INFOS() << "LLFeatureManager fetching " << url << " into " << path << LL_ENDL; - for (U32 i = 0; i < expr.length(); i++) /*Flawfinder: ignore*/ - { - expr[i] = tolower(expr[i]); - } + LLHTTPClient::get(url, new LLHTTPFeatureTableResponder(path)); +} - // run the regular expression against the renderer - boost::regex re(expr.c_str()); - if(boost::regex_search(renderer, re)) - { - // if we found it, stop! - file.close(); - LL_INFOS("RenderInit") << "GPU is " << label << llendl; - mGPUString = label; - mGPUClass = (EGPUClass) strtol(cls.c_str(), NULL, 10); - mGPUSupported = (BOOL) strtol(supported.c_str(), NULL, 10); - file.close(); - return; - } - } - file.close(); - LL_WARNS("RenderInit") << "Couldn't match GPU to a class: " << gGLManager.getRawGLString() << LL_ENDL; +// fetch table(s) from a website (S3) +void LLFeatureManager::fetchHTTPTables() +{ + fetch_feature_table(FEATURE_TABLE_VER_FILENAME); } + void LLFeatureManager::cleanupFeatureTables() { std::for_each(mMaskList.begin(), mMaskList.end(), DeletePairedPointer()); @@ -422,11 +601,12 @@ void LLFeatureManager::init() void LLFeatureManager::applyRecommendedSettings() { + loadGPUClass(); // apply saved settings // cap the level at 2 (high) - S32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_2)); + U32 level = llmax(GPU_CLASS_0, llmin(mGPUClass, GPU_CLASS_5)); - llinfos << "Applying Recommended Features" << llendl; + LL_INFOS() << "Applying Recommended Features" << LL_ENDL; setGraphicsLevel(level, false); gSavedSettings.setU32("RenderQualityPerformance", level); @@ -472,7 +652,7 @@ void LLFeatureManager::applyFeatures(bool skipFeatures) LLControlVariable* ctrl = gSavedSettings.getControl(mIt->first); if(ctrl == NULL) { - llwarns << "AHHH! Control setting " << mIt->first << " does not exist!" << llendl; + LL_WARNS() << "AHHH! Control setting " << mIt->first << " does not exist!" << LL_ENDL; continue; } @@ -495,35 +675,43 @@ void LLFeatureManager::applyFeatures(bool skipFeatures) } else { - llwarns << "AHHH! Control variable is not a numeric type!" << llendl; + LL_WARNS() << "AHHH! Control variable is not a numeric type!" << LL_ENDL; } } } -void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures) +void LLFeatureManager::setGraphicsLevel(U32 level, bool skipFeatures) { + LLViewerShaderMgr::sSkipReload = true; + applyBaseMasks(); - switch (level) - { - case 0: - maskFeatures("Low"); - break; - case 1: - maskFeatures("Mid"); - break; - case 2: - maskFeatures("High"); - break; - case 3: - maskFeatures("Ultra"); - break; - default: - maskFeatures("Low"); - break; + // 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); + applyFeatures(skipFeatures); + + LLViewerShaderMgr::sSkipReload = false; + LLViewerShaderMgr::instance()->setShaders(); + gPipeline.refreshCachedSettings(); } void LLFeatureManager::applyBaseMasks() @@ -541,14 +729,16 @@ void LLFeatureManager::applyBaseMasks() mFeatures = maskp->getFeatures(); // mask class - if (mGPUClass >= 0 && mGPUClass < 4) + if (mGPUClass >= 0 && mGPUClass < 6) { const char* class_table[] = { "Class0", "Class1", "Class2", - "Class3" + "Class3", + "Class4", + "Class5", }; LL_INFOS("RenderInit") << "Setting GPU Class to " << class_table[mGPUClass] << LL_ENDL; @@ -565,7 +755,7 @@ void LLFeatureManager::applyBaseMasks() { maskFeatures("NoPixelShaders"); } - if (!gGLManager.mHasVertexShader) + if (!gGLManager.mHasVertexShader || !mGPUSupported) { maskFeatures("NoVertexShaders"); } @@ -581,6 +771,10 @@ void LLFeatureManager::applyBaseMasks() { maskFeatures("ATI"); } + if (gGLManager.mHasATIMemInfo && gGLManager.mVRAM < 256) + { + maskFeatures("ATIVramLT256"); + } if (gGLManager.mATIOldDriver) { maskFeatures("ATIOldDriver"); @@ -597,6 +791,30 @@ void LLFeatureManager::applyBaseMasks() { maskFeatures("OpenGLPre15"); } + if (gGLManager.mGLVersion < 3.f) + { + maskFeatures("OpenGLPre30"); + } + if (gGLManager.mNumTextureImageUnits <= 8) + { + maskFeatures("TexUnit8orLess"); + } + if (gGLManager.mHasMapBufferRange) + { + maskFeatures("MapBufferRange"); + } + if (gGLManager.mVRAM > 512) + { + maskFeatures("VRAMGT512"); + } + +#if LL_DARWIN + const LLOSInfo& osInfo = LLAppViewer::instance()->getOSInfo(); + if (osInfo.mMajorVer == 10 && osInfo.mMinorVer < 7) + { + maskFeatures("OSX_10_6_8"); + } +#endif // now mask by gpu string // Replaces ' ' with '_' in mGPUString to deal with inability for parser to handle spaces @@ -609,20 +827,20 @@ void LLFeatureManager::applyBaseMasks() } } - //llinfos << "Masking features from gpu table match: " << gpustr << llendl; + //LL_INFOS() << "Masking features from gpu table match: " << gpustr << LL_ENDL; maskFeatures(gpustr); // now mask cpu type ones - if (gSysMemory.getPhysicalMemoryClamped() <= 256*1024*1024) + if (gSysMemory.getPhysicalMemoryClamped() <= U32Megabytes(256)) { maskFeatures("RAM256MB"); } #if LL_SOLARIS && defined(__sparc) // even low MHz SPARCs are fast #error The 800 is hinky. Would something like a LL_MIN_MHZ make more sense here? - if (gSysCPU.getMhz() < 800) + if (gSysCPU.getMHz() < 800) #else - if (gSysCPU.getMhz() < 1100) + if (gSysCPU.getMHz() < 1100) #endif { maskFeatures("CPUSlow"); |