aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfeaturemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfeaturemanager.cpp')
-rw-r--r--linden/indra/newview/llfeaturemanager.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp
index 9f79c18..69e7bcc 100644
--- a/linden/indra/newview/llfeaturemanager.cpp
+++ b/linden/indra/newview/llfeaturemanager.cpp
@@ -95,7 +95,7 @@ void LLFeatureList::addFeature(const char *name, const BOOL available, const F32
95{ 95{
96 if (mFeatures.count(name)) 96 if (mFeatures.count(name))
97 { 97 {
98 llwarns << "LLFeatureList::Attempting to add preexisting feature " << name << llendl; 98 LL_WARNS("RenderInit") << "LLFeatureList::Attempting to add preexisting feature " << name << LL_ENDL;
99 } 99 }
100 100
101 LLFeatureInfo fi(name, available, level); 101 LLFeatureInfo fi(name, available, level);
@@ -109,7 +109,7 @@ BOOL LLFeatureList::isFeatureAvailable(const char *name)
109 return mFeatures[name].mAvailable; 109 return mFeatures[name].mAvailable;
110 } 110 }
111 111
112 llwarns << "Feature " << name << " not on feature list!" << llendl; 112 LL_WARNS("RenderInit") << "Feature " << name << " not on feature list!" << LL_ENDL;
113 113
114 // changing this to TRUE so you have to explicitly disable 114 // changing this to TRUE so you have to explicitly disable
115 // something for it to be disabled 115 // something for it to be disabled
@@ -123,7 +123,7 @@ F32 LLFeatureList::getRecommendedValue(const char *name)
123 return mFeatures[name].mRecommendedLevel; 123 return mFeatures[name].mRecommendedLevel;
124 } 124 }
125 125
126 llwarns << "Feature " << name << " not on feature list or not available!" << llendl; 126 LL_WARNS("RenderInit") << "Feature " << name << " not on feature list or not available!" << LL_ENDL;
127 return 0; 127 return 0;
128} 128}
129 129
@@ -146,46 +146,46 @@ BOOL LLFeatureList::maskList(LLFeatureList &mask)
146 // 146 //
147 if (!mFeatures.count(mask_fi.mName)) 147 if (!mFeatures.count(mask_fi.mName))
148 { 148 {
149 llwarns << "Feature " << mask_fi.mName << " in mask not in top level!" << llendl; 149 LL_WARNS("RenderInit") << "Feature " << mask_fi.mName << " in mask not in top level!" << LL_ENDL;
150 continue; 150 continue;
151 } 151 }
152 152
153 LLFeatureInfo &cur_fi = mFeatures[mask_fi.mName]; 153 LLFeatureInfo &cur_fi = mFeatures[mask_fi.mName];
154 if (mask_fi.mAvailable && !cur_fi.mAvailable) 154 if (mask_fi.mAvailable && !cur_fi.mAvailable)
155 { 155 {
156 llwarns << "Mask attempting to reenabling disabled feature, ignoring " << cur_fi.mName << llendl; 156 LL_WARNS("RenderInit") << "Mask attempting to reenabling disabled feature, ignoring " << cur_fi.mName << LL_ENDL;
157 continue; 157 continue;
158 } 158 }
159 cur_fi.mAvailable = mask_fi.mAvailable; 159 cur_fi.mAvailable = mask_fi.mAvailable;
160 cur_fi.mRecommendedLevel = llmin(cur_fi.mRecommendedLevel, mask_fi.mRecommendedLevel); 160 cur_fi.mRecommendedLevel = llmin(cur_fi.mRecommendedLevel, mask_fi.mRecommendedLevel);
161#ifndef LL_RELEASE_FOR_DOWNLOAD 161 LL_DEBUGS("RenderInit") << "Feature mask " << mask.mName
162 llinfos << "Feature mask " << mask.mName
163 << " Feature " << mask_fi.mName 162 << " Feature " << mask_fi.mName
164 << " Mask: " << mask_fi.mRecommendedLevel 163 << " Mask: " << mask_fi.mRecommendedLevel
165 << " Now: " << cur_fi.mRecommendedLevel << llendl; 164 << " Now: " << cur_fi.mRecommendedLevel << LL_ENDL;
166#endif
167 } 165 }
168 166
169#if 0 && !LL_RELEASE_FOR_DOWNLOAD 167 LL_DEBUGS("RenderInit") << "After applying mask " << mask.mName << std::endl;
170 llinfos << "After applying mask " << mask.mName << llendl; 168 // Will conditionally call dump only if the above message will be logged, thanks
171 dump(); 169 // to it being wrapped by the LL_DEBUGS and LL_ENDL macros.
172#endif 170 dump();
171 LL_CONT << LL_ENDL;
172
173 return TRUE; 173 return TRUE;
174} 174}
175 175
176void LLFeatureList::dump() 176void LLFeatureList::dump()
177{ 177{
178 llinfos << "Feature list: " << mName << llendl; 178 LL_DEBUGS("RenderInit") << "Feature list: " << mName << LL_ENDL;
179 llinfos << "--------------" << llendl; 179 LL_DEBUGS("RenderInit") << "--------------" << LL_ENDL;
180 180
181 LLFeatureInfo fi; 181 LLFeatureInfo fi;
182 feature_map_t::iterator feature_it; 182 feature_map_t::iterator feature_it;
183 for (feature_it = mFeatures.begin(); feature_it != mFeatures.end(); ++feature_it) 183 for (feature_it = mFeatures.begin(); feature_it != mFeatures.end(); ++feature_it)
184 { 184 {
185 fi = feature_it->second; 185 fi = feature_it->second;
186 llinfos << fi.mName << "\t\t" << fi.mAvailable << ":" << fi.mRecommendedLevel << llendl; 186 LL_DEBUGS("RenderInit") << fi.mName << "\t\t" << fi.mAvailable << ":" << fi.mRecommendedLevel << LL_ENDL;
187 } 187 }
188 llinfos << llendl; 188 LL_DEBUGS("RenderInit") << LL_ENDL;
189} 189}
190 190
191LLFeatureList *LLFeatureManager::findMask(const char *name) 191LLFeatureList *LLFeatureManager::findMask(const char *name)
@@ -203,10 +203,10 @@ BOOL LLFeatureManager::maskFeatures(const char *name)
203 LLFeatureList *maskp = findMask(name); 203 LLFeatureList *maskp = findMask(name);
204 if (!maskp) 204 if (!maskp)
205 { 205 {
206// llwarns << "Unknown feature mask " << name << llendl; 206 LL_DEBUGS("RenderInit") << "Unknown feature mask " << name << LL_ENDL;
207 return FALSE; 207 return FALSE;
208 } 208 }
209 llinfos << "Applying Feature Mask: " << name << llendl; 209 LL_DEBUGS("RenderInit") << "Applying Feature Mask: " << name << LL_ENDL;
210 return maskList(*maskp); 210 return maskList(*maskp);
211} 211}
212 212
@@ -236,7 +236,7 @@ BOOL LLFeatureManager::loadFeatureTables()
236 236
237 if (!file) 237 if (!file)
238 { 238 {
239 llwarns << "Unable to open feature table!" << llendl; 239 LL_WARNS("RenderInit") << "Unable to open feature table!" << LL_ENDL;
240 return FALSE; 240 return FALSE;
241 } 241 }
242 242
@@ -245,7 +245,7 @@ BOOL LLFeatureManager::loadFeatureTables()
245 file >> version; 245 file >> version;
246 if (strcmp(name, "version")) 246 if (strcmp(name, "version"))
247 { 247 {
248 llwarns << data_path << " does not appear to be a valid feature table!" << llendl; 248 LL_WARNS("RenderInit") << data_path << " does not appear to be a valid feature table!" << LL_ENDL;
249 return FALSE; 249 return FALSE;
250 } 250 }
251 251
@@ -285,7 +285,7 @@ BOOL LLFeatureManager::loadFeatureTables()
285 file >> name; 285 file >> name;
286 if (mMaskList.count(name)) 286 if (mMaskList.count(name))
287 { 287 {
288 llerrs << "Overriding mask " << name << ", this is invalid!" << llendl; 288 LL_ERRS("RenderInit") << "Overriding mask " << name << ", this is invalid!" << LL_ENDL;
289 } 289 }
290 290
291 flp = new LLFeatureList(name); 291 flp = new LLFeatureList(name);
@@ -295,7 +295,7 @@ BOOL LLFeatureManager::loadFeatureTables()
295 { 295 {
296 if (!flp) 296 if (!flp)
297 { 297 {
298 llerrs << "Specified parameter before <list> keyword!" << llendl; 298 LL_ERRS("RenderInit") << "Specified parameter before <list> keyword!" << LL_ENDL;
299 } 299 }
300 S32 available; 300 S32 available;
301 F32 recommended; 301 F32 recommended;
@@ -327,7 +327,7 @@ void LLFeatureManager::loadGPUClass()
327 327
328 if (!file) 328 if (!file)
329 { 329 {
330 llwarns << "Unable to open GPU table: " << data_path << "!" << llendl; 330 LL_WARNS("RenderInit") << "Unable to open GPU table: " << data_path << "!" << LL_ENDL;
331 return; 331 return;
332 } 332 }
333 333
@@ -398,7 +398,7 @@ void LLFeatureManager::loadGPUClass()
398 { 398 {
399 // if we found it, stop! 399 // if we found it, stop!
400 file.close(); 400 file.close();
401 llinfos << "GPU is " << label << llendl; 401 LL_INFOS("RenderInit") << "GPU is " << label << llendl;
402 mGPUString = label; 402 mGPUString = label;
403 mGPUClass = (EGPUClass) strtol(cls.c_str(), NULL, 10); 403 mGPUClass = (EGPUClass) strtol(cls.c_str(), NULL, 10);
404 mGPUSupported = (BOOL) strtol(supported.c_str(), NULL, 10); 404 mGPUSupported = (BOOL) strtol(supported.c_str(), NULL, 10);
@@ -408,7 +408,7 @@ void LLFeatureManager::loadGPUClass()
408 } 408 }
409 file.close(); 409 file.close();
410 410
411 llwarns << "Couldn't match GPU to a class: " << gGLManager.getRawGLString() << llendl; 411 LL_WARNS("RenderInit") << "Couldn't match GPU to a class: " << gGLManager.getRawGLString() << LL_ENDL;
412} 412}
413 413
414void LLFeatureManager::cleanupFeatureTables() 414void LLFeatureManager::cleanupFeatureTables()
@@ -546,7 +546,7 @@ void LLFeatureManager::applyBaseMasks()
546 LLFeatureList* maskp = findMask("all"); 546 LLFeatureList* maskp = findMask("all");
547 if(maskp == NULL) 547 if(maskp == NULL)
548 { 548 {
549 llwarns << "AHH! No \"all\" in feature table!" << llendl; 549 LL_WARNS("RenderInit") << "AHH! No \"all\" in feature table!" << LL_ENDL;
550 return; 550 return;
551 } 551 }
552 552
@@ -563,12 +563,12 @@ void LLFeatureManager::applyBaseMasks()
563 "Class3" 563 "Class3"
564 }; 564 };
565 565
566 llinfos << "Setting GPU Class to " << class_table[mGPUClass] << llendl; 566 LL_INFOS("RenderInit") << "Setting GPU Class to " << class_table[mGPUClass] << LL_ENDL;
567 maskFeatures(class_table[mGPUClass]); 567 maskFeatures(class_table[mGPUClass]);
568 } 568 }
569 else 569 else
570 { 570 {
571 llinfos << "Setting GPU Class to Unknown" << llendl; 571 LL_INFOS("RenderInit") << "Setting GPU Class to Unknown" << LL_ENDL;
572 maskFeatures("Unknown"); 572 maskFeatures("Unknown");
573 } 573 }
574 574