diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-12-04 20:36:05 +0200 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-12-05 18:59:59 +0200 |
| commit | 396b97aebfb3294287a4a598f0be3900ccada69a (patch) | |
| tree | 938755d2ea0cbcfc02009f2961c2f93b686ef9ed /indra/newview/pipeline.cpp | |
| parent | 0dccb322ef30de1a6936a2286bae696f988224ab (diff) | |
viewer-private#330 Fix LLCachedControl for vintage
Diffstat (limited to 'indra/newview/pipeline.cpp')
| -rw-r--r-- | indra/newview/pipeline.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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) { |
