summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerdisplay.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2013-04-15 13:16:14 -0500
committerDave Parks <davep@lindenlab.com>2013-04-15 13:16:14 -0500
commit8025b8b2bc6028ed268e191d432cb3f740e351db (patch)
treeecc74cb4b2dceaf28b77919a2be04d33e80f10aa /indra/newview/llviewerdisplay.cpp
parent41097e74ecea7f99d2e4b0ee03dfa40ed6463f46 (diff)
NORSPEC-49 Add shader profiler, add support for ARB_depth_clamp where available
Diffstat (limited to 'indra/newview/llviewerdisplay.cpp')
-rw-r--r--indra/newview/llviewerdisplay.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index abeef7097a..1e5c5097ea 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -98,6 +98,7 @@ BOOL gDepthDirty = FALSE;
BOOL gResizeScreenTexture = FALSE;
BOOL gWindowResized = FALSE;
BOOL gSnapshot = FALSE;
+BOOL gShaderProfileFrame = FALSE;
U32 gRecentFrameCount = 0; // number of 'recent' frames
LLFrameTimer gRecentFPSTime;
@@ -340,6 +341,12 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
return;
}
+
+ if (gShaderProfileFrame)
+ {
+ LLGLSLShader::initProfile();
+ }
+
//LLGLState::verify(FALSE);
/////////////////////////////////////////////////
@@ -1018,6 +1025,12 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLAppViewer::instance()->pingMainloopTimeout("Display:Done");
gShiftFrame = false;
+
+ if (gShaderProfileFrame)
+ {
+ gShaderProfileFrame = FALSE;
+ LLGLSLShader::finishProfile();
+ }
}
void render_hud_attachments()