summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-07-19 21:32:35 +0100
committerGraham Linden <graham@lindenlab.com>2018-07-19 21:32:35 +0100
commite3ef7294775c59a8b96ee05b52bba8acc3f8bfa3 (patch)
treec2d04defd154c6cabb8c1c11128999832f6f7683 /indra/newview
parent31aa86b7039b025b23b5b02455e65be103e2ea0b (diff)
Remove optimization of building skybox as possible source of MAINT-8864
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvosky.cpp29
-rw-r--r--indra/newview/llvosky.h2
2 files changed, 10 insertions, 21 deletions
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 1b1c167410..899da3e420 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -423,7 +423,7 @@ void LLVOSky::init()
for (S32 tile = 0; tile < NUM_TILES; ++tile)
{
initSkyTextureDirs(side, tile);
- createSkyTexture(side, tile, false);
+ createSkyTexture(side, tile);
}
}
@@ -548,7 +548,7 @@ void LLVOSky::initSkyTextureDirs(const S32 side, const S32 tile)
}
}
-void LLVOSky::createSkyTexture(const S32 side, const S32 tile, bool use_windlight_shaders)
+void LLVOSky::createSkyTexture(const S32 side, const S32 tile)
{
S32 tile_x = tile % NUM_TILES_X;
S32 tile_y = tile / NUM_TILES_X;
@@ -561,10 +561,7 @@ void LLVOSky::createSkyTexture(const S32 side, const S32 tile, bool use_windligh
{
for (x = tile_x_pos; x < (tile_x_pos + sTileResX); ++x)
{
- if (use_windlight_shaders)
- {
- mSkyTex[side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(mSkyTex[side].getDir(x, y)), x, y);
- }
+ mSkyTex[side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(mSkyTex[side].getDir(x, y)), x, y);
mShinyTex[side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(mSkyTex[side].getDir(x, y), true), x, y);
}
}
@@ -647,8 +644,6 @@ bool LLVOSky::updateSky()
mForceUpdate = mForceUpdate || color_changed;
mForceUpdate = mForceUpdate || !mInitialized;
- bool use_windlight_shaders = gPipeline.canUseWindLightShaders();
-
if (mForceUpdate && forceupdThrottle.hasExpired())
{
LL_RECORD_BLOCK_TIME(FTM_VOSKY_UPDATEFORCED);
@@ -671,7 +666,7 @@ bool LLVOSky::updateSky()
{
for (int tile = 0; tile < NUM_TILES; tile++)
{
- createSkyTexture(side, tile, use_windlight_shaders);
+ createSkyTexture(side, tile);
}
}
@@ -679,13 +674,10 @@ bool LLVOSky::updateSky()
{
LLImageRaw* raw1 = nullptr;
LLImageRaw* raw2 = nullptr;
- if (use_windlight_shaders)
- {
- raw1 = mSkyTex[side].getImageRaw(TRUE);
- raw2 = mSkyTex[side].getImageRaw(FALSE);
- raw2->copy(raw1);
- mSkyTex[side].createGLImage(mSkyTex[side].getWhich(FALSE));
- }
+ raw1 = mSkyTex[side].getImageRaw(TRUE);
+ raw2 = mSkyTex[side].getImageRaw(FALSE);
+ raw2->copy(raw1);
+ mSkyTex[side].createGLImage(mSkyTex[side].getWhich(FALSE));
raw1 = mShinyTex[side].getImageRaw(TRUE);
raw2 = mShinyTex[side].getImageRaw(FALSE);
@@ -697,10 +689,7 @@ bool LLVOSky::updateSky()
// update the sky texture
for (S32 i = 0; i < 6; ++i)
{
- if (use_windlight_shaders)
- {
- mSkyTex[i].create(1.0f);
- }
+ mSkyTex[i].create(1.0f);
mShinyTex[i].create(1.0f);
}
diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h
index 758a4a8c94..d8039b7f80 100644
--- a/indra/newview/llvosky.h
+++ b/indra/newview/llvosky.h
@@ -290,7 +290,7 @@ protected:
void updateDirections(void);
void initSkyTextureDirs(const S32 side, const S32 tile);
- void createSkyTexture(const S32 side, const S32 tile, bool use_windlight_shaders);
+ void createSkyTexture(const S32 side, const S32 tile);
LLPointer<LLViewerFetchedTexture> mSunTexturep[2];
LLPointer<LLViewerFetchedTexture> mMoonTexturep[2];