@@ -790,7 +790,8 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY)
790
790
{
791
791
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
792
792
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;
794
795
795
796
if (mRT == &mMainRT )
796
797
{ // hacky -- allocate auxillary buffer
@@ -846,7 +847,7 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY)
846
847
static LLCachedControl<bool > render_cas (gSavedSettings , " RenderCAS" , true );
847
848
if (shadow_detail > 0 || ssao || render_cas)
848
849
{ // 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 ;
850
851
}
851
852
else
852
853
{
@@ -906,7 +907,8 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY)
906
907
mBakeMap .allocate (LLAvatarAppearanceDefines::SCRATCH_TEX_WIDTH, LLAvatarAppearanceDefines::SCRATCH_TEX_HEIGHT, GL_RGBA);
907
908
}
908
909
// 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)
910
912
{
911
913
return false ;
912
914
}
@@ -7845,7 +7847,11 @@ void LLPipeline::renderFinalize()
7845
7847
gGL .setColorMask (true , true );
7846
7848
glClearColor (0 , 0 , 0 , 0 );
7847
7849
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;
7849
7855
7850
7856
if (hdr)
7851
7857
{
@@ -7855,9 +7861,6 @@ void LLPipeline::renderFinalize()
7855
7861
7856
7862
generateExposure (&mLuminanceMap , &mExposureMap );
7857
7863
7858
- LLRenderTarget* src = &mPostPingMap ;
7859
- LLRenderTarget* dest = &mPostPongMap ;
7860
-
7861
7864
static LLCachedControl<bool > render_cas (gSavedSettings , " RenderCAS" , true );
7862
7865
if (render_cas && gCASProgram .isComplete ())
7863
7866
{
0 commit comments