aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfeaturemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfeaturemanager.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp
index d3b0dbb..061b343 100644
--- a/linden/indra/newview/llfeaturemanager.cpp
+++ b/linden/indra/newview/llfeaturemanager.cpp
@@ -300,12 +300,7 @@ BOOL LLFeatureManager::loadFeatureTables()
300 return TRUE; 300 return TRUE;
301} 301}
302 302
303S32 LLFeatureManager::getGPUClass() 303void LLFeatureManager::loadGPUClass()
304{
305 return mGPUClass;
306}
307
308S32 LLFeatureManager::loadGPUClass()
309{ 304{
310 std::string data_path = gDirUtilp->getAppRODataDir(); 305 std::string data_path = gDirUtilp->getAppRODataDir();
311 306
@@ -313,6 +308,10 @@ S32 LLFeatureManager::loadGPUClass()
313 308
314 data_path += GPU_TABLE_FILENAME; 309 data_path += GPU_TABLE_FILENAME;
315 310
311 // defaults
312 mGPUClass = 0;
313 mGPUString = gGLManager.getRawGLString();
314
316 llifstream file; 315 llifstream file;
317 316
318 file.open(data_path.c_str()); 317 file.open(data_path.c_str());
@@ -320,7 +319,7 @@ S32 LLFeatureManager::loadGPUClass()
320 if (!file) 319 if (!file)
321 { 320 {
322 llwarns << "Unable to open GPU table: " << data_path << "!" << llendl; 321 llwarns << "Unable to open GPU table: " << data_path << "!" << llendl;
323 return 0; 322 return;
324 } 323 }
325 324
326 std::string renderer = gGLManager.getRawGLString(); 325 std::string renderer = gGLManager.getRawGLString();
@@ -379,14 +378,14 @@ S32 LLFeatureManager::loadGPUClass()
379 { 378 {
380 file.close(); 379 file.close();
381 llinfos << "GPU is " << label << llendl; 380 llinfos << "GPU is " << label << llendl;
382 return (S32) strtol(cls, NULL, 10); 381 mGPUString = label;
382 mGPUClass = (S32) strtol(cls, NULL, 10);
383 } 383 }
384 } 384 }
385 file.close(); 385 file.close();
386 //flp->dump(); 386 //flp->dump();
387 387
388 llwarns << "Couldn't match GPU to a class: " << gGLManager.getRawGLString() << llendl; 388 llwarns << "Couldn't match GPU to a class: " << gGLManager.getRawGLString() << llendl;
389 return 0;
390} 389}
391 390
392void LLFeatureManager::cleanupFeatureTables() 391void LLFeatureManager::cleanupFeatureTables()
@@ -419,7 +418,7 @@ void LLFeatureManager::initCPUFeatureMasks()
419 418
420void LLFeatureManager::initGraphicsFeatureMasks() 419void LLFeatureManager::initGraphicsFeatureMasks()
421{ 420{
422 mGPUClass = loadGPUClass(); 421 loadGPUClass();
423 422
424 if (mGPUClass >= 0 && mGPUClass < 4) 423 if (mGPUClass >= 0 && mGPUClass < 4)
425 { 424 {