diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2022-12-09 16:34:28 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2022-12-09 16:34:28 -0500 |
commit | f41278082f2ab204ec60c15ee1530ca4440937a5 (patch) | |
tree | c382bb0e6cde299e853d09b19a47f1d82dc537fa /indra/newview/lldrawpoolbump.cpp | |
parent | fc424a0db90fd2d2e44e85a19750ad6eaa57b28a (diff) | |
parent | e3b34fec6962e6deda3dd9dd83bf9fa20ab594af (diff) |
SL-18809: Merge 'DRTVWR-559' of secondlife/viewer into sl-18809
Diffstat (limited to 'indra/newview/lldrawpoolbump.cpp')
-rw-r--r-- | indra/newview/lldrawpoolbump.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 684cf55b6b..6af4e2274c 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -41,6 +41,7 @@ #include "lldrawable.h" #include "llface.h" #include "llsky.h" +#include "llstartup.h" #include "lltextureentry.h" #include "llviewercamera.h" #include "llviewertexturelist.h" @@ -79,11 +80,6 @@ static S32 bump_channel = -1; #define LL_BUMPLIST_MULTITHREADED 0 // TODO -- figure out why this doesn't work -// static -void LLStandardBumpmap::init() -{ - LLStandardBumpmap::restoreGL(); -} // static void LLStandardBumpmap::shutdown() @@ -94,7 +90,7 @@ void LLStandardBumpmap::shutdown() // static void LLStandardBumpmap::restoreGL() { - addstandard(); + addstandard(); } // static @@ -107,6 +103,12 @@ void LLStandardBumpmap::addstandard() return ; } + if (LLStartUp::getStartupState() < STATE_SEED_CAP_GRANTED) + { + // Not ready, need caps for images + return; + } + // can't assert; we destroyGL and restoreGL a lot during *first* startup, which populates this list already, THEN we explicitly init the list as part of *normal* startup. Sigh. So clear the list every time before we (re-)add the standard bumpmaps. //llassert( LLStandardBumpmap::sStandardBumpmapCount == 0 ); clear(); @@ -297,7 +299,7 @@ void LLDrawPoolBump::beginShiny() void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& diffuse_channel, S32& cube_channel) { LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL; - if( cube_map ) + if( cube_map && !LLPipeline::sReflectionProbesEnabled ) { if (shader ) { @@ -344,7 +346,7 @@ void LLDrawPoolBump::renderShiny() { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); - if( gSky.mVOSkyp->getCubeMap() ) + if( gSky.mVOSkyp->getCubeMap() && !LLPipeline::sReflectionProbesEnabled ) { LLGLEnable blend_enable(GL_BLEND); if (mShaderLevel > 1) @@ -376,7 +378,7 @@ void LLDrawPoolBump::renderShiny() void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& diffuse_channel, S32& cube_channel) { LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL; - if( cube_map ) + if( cube_map && !LLPipeline::sReflectionProbesEnabled) { if (shader_level > 1) { @@ -444,7 +446,7 @@ void LLDrawPoolBump::beginFullbrightShiny() LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL; - if (cube_map) + if (cube_map && !LLPipeline::sReflectionProbesEnabled) { // Make sure that texture coord generation happens for tex unit 1, as that's the one we use for // the cube map in the one pass shiny shaders @@ -532,7 +534,7 @@ void LLDrawPoolBump::endFullbrightShiny() LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_SHINY); LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL; - if( cube_map ) + if( cube_map && !LLPipeline::sReflectionProbesEnabled ) { cube_map->disable(); if (shader->mFeatures.hasReflectionProbes) @@ -786,8 +788,6 @@ void LLBumpImageList::init() llassert( mBrightnessEntries.size() == 0 ); llassert( mDarknessEntries.size() == 0 ); - LLStandardBumpmap::init(); - LLStandardBumpmap::restoreGL(); sMainQueue = LL::WorkQueue::getInstance("mainloop"); sTexUpdateQueue = LL::WorkQueue::getInstance("LLImageGL"); // Share work queue with tex loader. |