Skip to content

Commit 126659e

Browse files
authored
Merge pull request #3084 from Ansariel/develop-merge-fix
Fix error/broken build after ExtraFPS merge
2 parents 652bc17 + 7c0d8f0 commit 126659e

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

indra/newview/pipeline.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,8 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY)
790790
{
791791
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
792792

793-
bool hdr = gGLManager.mGLVersion > 4.05f && gSavedSettings.getBOOL("RenderHDREnabled");
793+
static LLCachedControl<bool> render_hdr(gSavedSettings, "RenderHDREnabled", true);
794+
bool hdr = gGLManager.mGLVersion > 4.05f && render_hdr;
794795

795796
if (mRT == &mMainRT)
796797
{ // hacky -- allocate auxillary buffer
@@ -846,7 +847,7 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY)
846847
static LLCachedControl<bool> render_cas(gSavedSettings, "RenderCAS", true);
847848
if (shadow_detail > 0 || ssao || render_cas)
848849
{ //only need mRT->deferredLight for shadows OR ssao
849-
if (!mRT->deferredLight.allocate(resX, resY, GL_RGBA16F)) return false;
850+
if (!mRT->deferredLight.allocate(resX, resY, screenFormat)) return false;
850851
}
851852
else
852853
{
@@ -906,7 +907,8 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY)
906907
mBakeMap.allocate(LLAvatarAppearanceDefines::SCRATCH_TEX_WIDTH, LLAvatarAppearanceDefines::SCRATCH_TEX_HEIGHT, GL_RGBA);
907908
}
908909
//HACK make screenbuffer allocations start failing after 30 seconds
909-
if (gSavedSettings.getBOOL("SimulateFBOFailure"))
910+
static LLCachedControl<bool> simulate_fbo_failure(gSavedSettings, "SimulateFBOFailure", false);
911+
if (simulate_fbo_failure)
910912
{
911913
return false;
912914
}
@@ -7845,7 +7847,11 @@ void LLPipeline::renderFinalize()
78457847
gGL.setColorMask(true, true);
78467848
glClearColor(0, 0, 0, 0);
78477849

7848-
bool hdr = gGLManager.mGLVersion > 4.05f && gSavedSettings.getBOOL("RenderHDREnabled");
7850+
LLRenderTarget* src = &mPostPingMap;
7851+
LLRenderTarget* dest = &mPostPongMap;
7852+
7853+
static LLCachedControl<bool> render_hdr(gSavedSettings, "RenderHDREnabled", true);
7854+
bool hdr = gGLManager.mGLVersion > 4.05f && render_hdr;
78497855

78507856
if (hdr)
78517857
{
@@ -7855,9 +7861,6 @@ void LLPipeline::renderFinalize()
78557861

78567862
generateExposure(&mLuminanceMap, &mExposureMap);
78577863

7858-
LLRenderTarget* src = &mPostPingMap;
7859-
LLRenderTarget* dest = &mPostPongMap;
7860-
78617864
static LLCachedControl<bool> render_cas(gSavedSettings, "RenderCAS", true);
78627865
if (render_cas && gCASProgram.isComplete())
78637866
{

0 commit comments

Comments
 (0)