summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerdisplay.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-07-08 10:10:22 -0700
committerGraham Linden <graham@lindenlab.com>2019-07-08 10:10:22 -0700
commit1d86dcd846ed5ea7734df507d15adf057cb2ebd0 (patch)
tree8177f71a7ef64c19ea0a4b10dacc45edda622e48 /indra/newview/llviewerdisplay.cpp
parent9f2148cc1f2469a1f45f8f3f736251a0300d1d6a (diff)
SL-10625 another shot across the bow
Move dynamic texture update (which does local back readback work) to just before swap which may keep the Intel driver from tripping on its own shoelaces and is also subjectively faster for bakes.
Diffstat (limited to 'indra/newview/llviewerdisplay.cpp')
-rw-r--r--indra/newview/llviewerdisplay.cpp38
1 files changed, 17 insertions, 21 deletions
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 736626debd..7101f6fbb0 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -130,9 +130,6 @@ void display_startup()
gPipeline.updateGL();
- // Update images?
- //gImageList.updateImages(0.01f);
-
// Written as branch to appease GCC which doesn't like different
// pointer types across ternary ops
//
@@ -149,11 +146,6 @@ void display_startup()
LLGLState::checkStates();
LLGLState::checkTextureChannels();
- if (frame_count++ > 1) // make sure we have rendered a frame first
- {
- LLViewerDynamicTexture::updateAllInstances();
- }
-
LLGLState::checkStates();
LLGLState::checkTextureChannels();
@@ -595,18 +587,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// Actually push all of our triangles to the screen.
//
- // do render-to-texture stuff here
- if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES))
- {
- LLAppViewer::instance()->pingMainloopTimeout("Display:DynamicTextures");
- LL_RECORD_BLOCK_TIME(FTM_UPDATE_DYNAMIC_TEXTURES);
- if (LLViewerDynamicTexture::updateAllInstances())
- {
- gGL.setColorMask(true, true);
- glClear(GL_DEPTH_BUFFER_BIT);
- }
- }
-
gViewerWindow->setup3DViewport();
gPipeline.resetFrameStats(); // Reset per-frame statistics.
@@ -1037,10 +1017,26 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if (!for_snapshot)
{
render_ui();
+ }
+
+ // do render-to-texture stuff here
+ if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES))
+ {
+ LLAppViewer::instance()->pingMainloopTimeout("Display:DynamicTextures");
+ LL_RECORD_BLOCK_TIME(FTM_UPDATE_DYNAMIC_TEXTURES);
+ if (LLViewerDynamicTexture::updateAllInstances())
+ {
+ gGL.setColorMask(true, true);
+ glClear(GL_DEPTH_BUFFER_BIT);
+ }
+ }
+
+ LLAppViewer::instance()->pingMainloopTimeout("Display:RenderUI");
+ if (!for_snapshot)
+ {
swap();
}
-
LLSpatialGroup::sNoDelete = FALSE;
gPipeline.clearReferences();