summaryrefslogtreecommitdiff
path: root/indra/newview/llfasttimerview.cpp
diff options
context:
space:
mode:
authorGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-05-22 21:28:07 +0100
committerGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-05-22 21:28:07 +0100
commit689beff6698fcb8582c44f58bb9896606850b149 (patch)
tree7f567399e152057c1fe80a863ef660b5850bb324 /indra/newview/llfasttimerview.cpp
parent313dbc7fea54cc58ceb8bd3437b91674360a3384 (diff)
parent3888de9439c20eb1698e16fb878a47d78cfdf85e (diff)
Merge 5.1.5
Diffstat (limited to 'indra/newview/llfasttimerview.cpp')
-rw-r--r--indra/newview/llfasttimerview.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 9219dd0279..f68e63cb96 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -435,18 +435,22 @@ void LLFastTimerView::onClose(bool app_quitting)
void saveChart(const std::string& label, const char* suffix, LLImageRaw* scratch)
{
- //read result back into raw image
- glReadPixels(0, 0, 1024, 512, GL_RGB, GL_UNSIGNED_BYTE, scratch->getData());
+ // disable use of glReadPixels which messes up nVidia nSight graphics debugging
+ if (!LLRender::sNsightDebugSupport)
+ {
+ //read result back into raw image
+ glReadPixels(0, 0, 1024, 512, GL_RGB, GL_UNSIGNED_BYTE, scratch->getData());
- //write results to disk
- LLPointer<LLImagePNG> result = new LLImagePNG();
- result->encode(scratch, 0.f);
+ //write results to disk
+ LLPointer<LLImagePNG> result = new LLImagePNG();
+ result->encode(scratch, 0.f);
- std::string ext = result->getExtension();
- std::string filename = llformat("%s_%s.%s", label.c_str(), suffix, ext.c_str());
+ std::string ext = result->getExtension();
+ std::string filename = llformat("%s_%s.%s", label.c_str(), suffix, ext.c_str());
- std::string out_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename);
- result->save(out_file);
+ std::string out_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename);
+ result->save(out_file);
+ }
}
//static
@@ -904,8 +908,7 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target
base[label]["Samples"].asInteger());
}
- // This currently crashes, possibly due to a race condition in shutdown:
- // exportCharts(baseline, target);
+ exportCharts(baseline, target);
os.flush();
os.close();