diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterpreferencesgraphicsadvanced.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llsettingsvo.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewershadermgr.cpp | 4 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 11 |
4 files changed, 11 insertions, 8 deletions
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp index cc4ca611ab..cf5b2d033b 100644 --- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp +++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp @@ -321,7 +321,7 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings() } // Vintage mode - LLCachedControl<bool> is_not_vintage(gSavedSettings, "RenderDisableVintageMode"); + static LLCachedControl<bool> is_not_vintage(gSavedSettings, "RenderDisableVintageMode"); LLSliderCtrl* tonemapMix = getChild<LLSliderCtrl>("TonemapMix"); LLComboBox* tonemapSelect = getChild<LLComboBox>("TonemapType"); LLTextBox* tonemapLabel = getChild<LLTextBox>("TonemapTypeText"); diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index 836b181623..25df53fe05 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -671,7 +671,7 @@ void LLSettingsVOSky::updateSettings() // After some A/B comparison of relesae vs EEP, tweak to allow strength to fall below 2 // at night, for better match. (mSceneLightStrength is a divisor, so lower value means brighter // local lights) - LLCachedControl<F32> sdr(gSavedSettings, "RenderSunDynamicRange", 1.f); + static LLCachedControl<F32> sdr(gSavedSettings, "RenderSunDynamicRange", 1.f); F32 sun_dynamic_range = llmax(sdr(), 0.0001f); mSceneLightStrength = 2.0f * (0.75f + sun_dynamic_range * dp); diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 83386eb1ec..9f04c98770 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -258,7 +258,7 @@ static bool make_rigged_variant(LLGLSLShader& shader, LLGLSLShader& riggedShader static void add_common_permutations(LLGLSLShader* shader) { - LLCachedControl<bool> emissive(gSavedSettings, "RenderEnableEmissiveBuffer", false); + static LLCachedControl<bool> emissive(gSavedSettings, "RenderEnableEmissiveBuffer", false); if (emissive) { @@ -782,7 +782,7 @@ std::string LLViewerShaderMgr::loadBasicShaders() attribs["MAX_JOINTS_PER_MESH_OBJECT"] = std::to_string(LLSkinningUtil::getMaxJointCount()); - LLCachedControl<bool> emissive(gSavedSettings, "RenderEnableEmissiveBuffer", false); + static LLCachedControl<bool> emissive(gSavedSettings, "RenderEnableEmissiveBuffer", false); if (emissive) { diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e92d59e4e4..4b50b7218e 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -349,8 +349,9 @@ bool addDeferredAttachments(LLRenderTarget& target, bool for_impostor = false) U32 norm = GL_RGBA16F; U32 emissive = GL_RGB16F; - bool hdr = gSavedSettings.getBOOL("RenderHDREnabled") && gGLManager.mGLVersion > 4.05f; - LLCachedControl<bool> has_emissive(gSavedSettings, "RenderEnableEmissiveBuffer", false); + static LLCachedControl<bool> has_emissive(gSavedSettings, "RenderEnableEmissiveBuffer", false); + static LLCachedControl<bool> has_hdr(gSavedSettings, "RenderHDREnabled", true); + bool hdr = has_hdr() && gGLManager.mGLVersion > 4.05f; if (!hdr) { @@ -803,7 +804,8 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; - bool hdr = gGLManager.mGLVersion > 4.05f && gSavedSettings.getBOOL("RenderHDREnabled"); + static LLCachedControl<bool> has_hdr(gSavedSettings, "RenderHDREnabled", true); + bool hdr = gGLManager.mGLVersion > 4.05f && has_hdr(); if (mRT == &mMainRT) { // hacky -- allocate auxillary buffer @@ -7894,7 +7896,8 @@ void LLPipeline::renderFinalize() gGL.setColorMask(true, true); glClearColor(0, 0, 0, 0); - bool hdr = gGLManager.mGLVersion > 4.05f && gSavedSettings.getBOOL("RenderHDREnabled"); + static LLCachedControl<bool> has_hdr(gSavedSettings, "RenderHDREnabled", true); + bool hdr = gGLManager.mGLVersion > 4.05f && has_hdr(); if (hdr) { |