summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-07-30 11:12:48 -0700
committerGraham Linden <graham@lindenlab.com>2019-07-30 11:12:48 -0700
commitaf7e33f5c4de5a6e88f545217e5864c2aa7471e9 (patch)
tree7bcfec92d4c62e9562485fe18f7422772f504fae
parent2b99edc0992d2bdf3ec065393ab169316a344d13 (diff)
SL-10566 part 1
Move Environment update to a loc that is more likely to be hit only once per frame.
-rw-r--r--indra/newview/llviewerdisplay.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index b78937e3b0..ddce419f19 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -196,9 +196,6 @@ void display_update_camera()
LLViewerCamera::getInstance()->setFar(final_far);
gViewerWindow->setup3DRender();
- // update all the sky/atmospheric/water settings
- LLEnvironment::instance().update(LLViewerCamera::getInstance());
-
// Update land visibility too
LLWorld::getInstance()->setLandFarClip(final_far);
}
@@ -245,6 +242,7 @@ static LLTrace::BlockTimerStatHandle FTM_HUD_UPDATE("HUD Update");
static LLTrace::BlockTimerStatHandle FTM_DISPLAY_UPDATE_GEOM("Update Geom");
static LLTrace::BlockTimerStatHandle FTM_TEXTURE_UNBIND("Texture Unbind");
static LLTrace::BlockTimerStatHandle FTM_TELEPORT_DISPLAY("Teleport Display");
+static LLTrace::BlockTimerStatHandle FTM_EEP_UPDATE("Env Update");
// Paint the display!
void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
@@ -627,7 +625,13 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
stop_glerror();
display_update_camera();
stop_glerror();
-
+
+ {
+ LL_RECORD_BLOCK_TIME(FTM_EEP_UPDATE);
+ // update all the sky/atmospheric/water settings
+ LLEnvironment::instance().update(LLViewerCamera::getInstance());
+ }
+
// *TODO: merge these two methods
{
LL_RECORD_BLOCK_TIME(FTM_HUD_UPDATE);