summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llrender/llgl.cpp7
-rw-r--r--indra/llrender/llgl.h1
-rw-r--r--indra/newview/app_settings/cmd_line.xml2
-rw-r--r--indra/newview/app_settings/settings.xml4
-rw-r--r--indra/newview/llappviewer.cpp11
-rw-r--r--indra/newview/llface.cpp2
-rw-r--r--indra/newview/llviewercontrol.cpp8
-rw-r--r--indra/newview/llvovolume.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml6
9 files changed, 20 insertions, 23 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 43fedeca64..43e2c5751c 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -60,10 +60,10 @@
BOOL gDebugSession = FALSE;
+BOOL gDebugGLSession = FALSE;
BOOL gClothRipple = FALSE;
BOOL gHeadlessClient = FALSE;
BOOL gGLActive = FALSE;
-BOOL gGLDebugLoggingEnabled = TRUE;
static const std::string HEADLESS_VENDOR_STRING("Linden Lab");
static const std::string HEADLESS_RENDERER_STRING("Headless");
@@ -85,8 +85,6 @@ void APIENTRY gl_debug_callback(GLenum source,
const GLchar* message,
GLvoid* userParam)
{
- if (gGLDebugLoggingEnabled)
- {
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
{
LL_WARNS() << "----- GL ERROR --------" << LL_ENDL;
@@ -100,11 +98,12 @@ void APIENTRY gl_debug_callback(GLenum source,
LL_WARNS() << "Severity: " << std::hex << severity << LL_ENDL;
LL_WARNS() << "Message: " << message << LL_ENDL;
LL_WARNS() << "-----------------------" << LL_ENDL;
+#ifndef LL_RELEASE_FOR_DOWNLOAD
if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
{
LL_ERRS() << "Halting on GL Error" << LL_ENDL;
}
-}
+#endif //LL_RELEASE_FOR_DOWNLOAD
}
#endif
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index a07e2d9bb0..ad4d69cde4 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -47,6 +47,7 @@
extern BOOL gDebugGL;
extern BOOL gDebugSession;
+extern BOOL gDebugGLSession;
extern llofstream gFailLog;
#define LL_GL_ERRS LL_ERRS("RenderState")
diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 4e186292f7..6da14b7599 100644
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -55,7 +55,7 @@
<key>debugsession</key>
<map>
<key>desc</key>
- <string>Run as if RenderDebugGL is TRUE, but log errors until end of session.</string>
+ <string>Run as if RenderDebugGLSession is TRUE, but log errors until end of session.</string>
<key>map-to</key>
<string>DebugSession</string>
</map>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 73efa16abe..f545a5d1f1 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -9163,10 +9163,10 @@
<key>Value</key>
<real>0.5</real>
</map>
- <key>RenderDebugGL</key>
+ <key>RenderDebugGLSession</key>
<map>
<key>Comment</key>
- <string>Enable strict GL debugging.</string>
+ <string>Enable strict GL debugging on the start of next session.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index e01d713501..af7c21706a 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -604,7 +604,7 @@ static void settings_modify()
LLRenderTarget::sUseFBO = LLPipeline::sRenderDeferred && gSavedSettings.getBOOL("RenderAvatarVP");
LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor");
LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4]
- gDebugGL = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession;
+ gDebugGL = gDebugGLSession || gDebugSession;
gDebugPipeline = gSavedSettings.getBOOL("RenderDebugPipeline");
}
@@ -2708,6 +2708,15 @@ bool LLAppViewer::initConfiguration()
ll_init_fail_log(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "test_failures.log"));
}
+ if (gSavedSettings.getBOOL("RenderDebugGLSession"))
+ {
+ gDebugGLSession = TRUE;
+ gDebugGL = TRUE;
+ // gDebugGL can cause excessive logging
+ // so it's limited to a single session
+ gSavedSettings.setBOOL("RenderDebugGLSession", FALSE);
+ }
+
const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
{
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 2e32ffca26..5201a27572 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -63,7 +63,6 @@
#pragma GCC diagnostic ignored "-Wuninitialized"
#endif
-extern BOOL gGLDebugLoggingEnabled;
#define LL_MAX_INDICES_COUNT 1000000
static LLStaticHashedString sTextureIndexIn("texture_index_in");
@@ -1522,7 +1521,6 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
!rebuild_weights && //TODO: add support for weights
!volume.isUnique()) //source volume is NOT flexi
{ //use transform feedback to pack vertex buffer
- //gGLDebugLoggingEnabled = TRUE;
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_FEEDBACK);
LLGLEnable discard(GL_RASTERIZER_DISCARD);
LLVertexBuffer* buff = (LLVertexBuffer*) vf.mVertexBuffer.get();
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index bc425123e1..3d1f4e61cc 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -484,13 +484,6 @@ static bool handleRenderBumpChanged(const LLSD& newval)
return true;
}
-static bool handleRenderDebugGLChanged(const LLSD& newvalue)
-{
- gDebugGL = newvalue.asBoolean() || gDebugSession;
- gGL.clearErrors();
- return true;
-}
-
static bool handleRenderDebugPipelineChanged(const LLSD& newvalue)
{
gDebugPipeline = newvalue.asBoolean();
@@ -697,7 +690,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleRenderBumpChanged, _2));
gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderDeferredNoise")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
- gSavedSettings.getControl("RenderDebugGL")->getSignal()->connect(boost::bind(&handleRenderDebugGLChanged, _2));
gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _2));
gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _2));
gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleRenderDeferredChanged, _2));
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 77f756a123..7da40bd504 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -107,8 +107,6 @@ static LLTrace::BlockTimerStatHandle FTM_GEN_TRIANGLES("Generate Triangles");
static LLTrace::BlockTimerStatHandle FTM_GEN_VOLUME("Generate Volumes");
static LLTrace::BlockTimerStatHandle FTM_VOLUME_TEXTURES("Volume Textures");
-extern BOOL gGLDebugLoggingEnabled;
-
// Implementation class of LLMediaDataClientObject. See llmediadataclient.h
class LLMediaDataClientObjectImpl : public LLMediaDataClientObject
{
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index bea06299da..1caa0908ea 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -3121,14 +3121,14 @@ function="World.EnvPreset"
<menu_item_separator />
<menu_item_check
- label="Debug GL"
+ label="Start Debug GL on next run"
name="Debug GL">
<menu_item_check.on_check
function="CheckControl"
- parameter="RenderDebugGL" />
+ parameter="RenderDebugGLSession" />
<menu_item_check.on_click
function="ToggleControl"
- parameter="RenderDebugGL" />
+ parameter="RenderDebugGLSession" />
</menu_item_check>
<menu_item_check
label="Debug Pipeline"