From af7e33f5c4de5a6e88f545217e5864c2aa7471e9 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 30 Jul 2019 11:12:48 -0700 Subject: SL-10566 part 1 Move Environment update to a loc that is more likely to be hit only once per frame. --- indra/newview/llviewerdisplay.cpp | 12 ++++++++---- 1 file 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); -- cgit v1.2.3