summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolsimple.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-07-17 00:24:08 -0500
committerDave Parks <davep@lindenlab.com>2011-07-17 00:24:08 -0500
commit6469f1c2f21ecd3b15a18957d882ef6a16b17ecf (patch)
tree3159983e7a9c6c008d8334bceb672dfc16e2ca35 /indra/newview/lldrawpoolsimple.cpp
parentddbd5cee7480e565e447486a21e67c301a716b1f (diff)
SH-2031 High risk changeset, but potentially high reward. Addresses frame stalls in renderer by never using the fixed function pipeline if shaders are available.
Diffstat (limited to 'indra/newview/lldrawpoolsimple.cpp')
-rw-r--r--indra/newview/lldrawpoolsimple.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp
index 5dbb27cabb..224f149c6b 100644
--- a/indra/newview/lldrawpoolsimple.cpp
+++ b/indra/newview/lldrawpoolsimple.cpp
@@ -49,6 +49,8 @@ void LLDrawPoolGlow::beginPostDeferredPass(S32 pass)
gDeferredFullbrightProgram.bind();
}
+static LLFastTimer::DeclareTimer FTM_RENDER_GLOW_PUSH("Glow Push");
+
void LLDrawPoolGlow::renderPostDeferred(S32 pass)
{
LLFastTimer t(FTM_RENDER_GLOW);
@@ -62,7 +64,11 @@ void LLDrawPoolGlow::renderPostDeferred(S32 pass)
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
gGL.setColorMask(false, true);
- pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
+
+ {
+ LLFastTimer t(FTM_RENDER_GLOW_PUSH);
+ pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
+ }
gGL.setColorMask(true, false);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
@@ -374,10 +380,14 @@ void LLDrawPoolFullbright::endRenderPass(S32 pass)
LLFastTimer t(FTM_RENDER_FULLBRIGHT);
LLRenderPass::endRenderPass(pass);
+ stop_glerror();
+
if (mVertexShaderLevel > 0)
{
fullbright_shader->unbind();
}
+
+ stop_glerror();
}
void LLDrawPoolFullbright::render(S32 pass)
@@ -385,6 +395,8 @@ void LLDrawPoolFullbright::render(S32 pass)
LLFastTimer t(FTM_RENDER_FULLBRIGHT);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
+ stop_glerror();
+
if (mVertexShaderLevel > 0)
{
fullbright_shader->bind();
@@ -398,6 +410,8 @@ void LLDrawPoolFullbright::render(S32 pass)
U32 fullbright_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR;
renderTexture(LLRenderPass::PASS_FULLBRIGHT, fullbright_mask);
}
+
+ stop_glerror();
}
S32 LLDrawPoolFullbright::getNumPasses()