summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-09-12 20:15:23 +0100
committerGraham Linden <graham@lindenlab.com>2018-09-12 20:15:23 +0100
commit211ae97cbd79f5329424e59b0e4816f06da72e71 (patch)
treecdb687afe4462a93482b08459bd179f64333b768
parent4fe44b9033ee793134b7c080c71931c62c33ddf9 (diff)
SL-9635 remove init of libatmosphere causing crashes on Intel HD
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp2
-rw-r--r--indra/newview/llviewershadermgr.cpp32
2 files changed, 6 insertions, 28 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index e7929e0bbf..def2c5263d 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -163,7 +163,7 @@ void LLDrawPoolWLSky::renderDome(const LLVector3& camPosLocal, F32 camHeightLoca
void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 camHeightLocal) const
{
- if (gPipeline.useAdvancedAtmospherics() && gPipeline.canUseWindLightShaders())
+ if (gPipeline.useAdvancedAtmospherics() && gPipeline.canUseWindLightShaders() && gAtmosphere)
{
sky_shader->bind();
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 5e7e87c163..568a8fc516 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -2105,31 +2105,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
success = gDeferredPostNoDoFProgram.createShader(NULL, NULL);
}
- // this shader uses gather so it can't live with the other basic shaders safely
- /*if (success && (mVertexShaderLevel[SHADER_WINDLIGHT] >= 3))
- {
- gDownsampleMinMaxDepthRectProgram.mName = "DownsampleMinMaxDepthRect Shader";
- gDownsampleMinMaxDepthRectProgram.mShaderFiles.clear();
- gDownsampleMinMaxDepthRectProgram.mShaderFiles.push_back(make_pair("windlight/downsampleMinMaxDepthV.glsl", GL_VERTEX_SHADER_ARB));
- gDownsampleMinMaxDepthRectProgram.mShaderFiles.push_back(make_pair("windlight/downsampleMinMaxDepthRectF.glsl", GL_FRAGMENT_SHADER_ARB));
- gDownsampleMinMaxDepthRectProgram.mShaderLevel = mVertexShaderLevel[SHADER_WINDLIGHT];
- success = gDownsampleMinMaxDepthRectProgram.createShader(NULL, NULL);
- }*/
-
- // this shader uses gather so it can't live with the other basic shaders safely
- /*if (success && (mVertexShaderLevel[SHADER_WINDLIGHT] >= 3))
- {
- gInscatterRectProgram.mName = "Inscatter Shader";
- gInscatterRectProgram.mShaderFiles.clear();
- gInscatterRectProgram.mShaderFiles.push_back(make_pair("windlight/advancedAtmoV.glsl", GL_VERTEX_SHADER_ARB));
- gInscatterRectProgram.mShaderFiles.push_back(make_pair("windlight/advancedAtmoF.glsl", GL_FRAGMENT_SHADER_ARB));
- gInscatterRectProgram.mShaderLevel = mVertexShaderLevel[SHADER_WINDLIGHT];
- llassert(gAtmosphere != nullptr);
- gInscatterRectProgram.mExtraLinkObject = gAtmosphere->getAtmosphericShaderForLink();
- success = gInscatterRectProgram.createShader(NULL, NULL);
- llassert(success);
- }*/
-
if (success)
{
gDeferredWLSkyProgram.mName = "Deferred Windlight Sky Shader";
@@ -2139,7 +2114,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredWLSkyProgram.mShaderFiles.push_back(make_pair("deferred/skyF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredWLSkyProgram.mShaderLevel = mVertexShaderLevel[SHADER_WINDLIGHT];
gDeferredWLSkyProgram.mShaderGroup = LLGLSLShader::SG_SKY;
- if (mVertexShaderLevel[SHADER_WINDLIGHT] > 1)
+ if (gAtmosphere && mVertexShaderLevel[SHADER_WINDLIGHT] > 1)
{
gDeferredWLSkyProgram.mExtraLinkObject = gAtmosphere->getAtmosphericShaderForLink();
}
@@ -2155,7 +2130,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredWLCloudProgram.mShaderFiles.push_back(make_pair("deferred/cloudsF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredWLCloudProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
gDeferredWLCloudProgram.mShaderGroup = LLGLSLShader::SG_SKY;
- if (mVertexShaderLevel[SHADER_WINDLIGHT] >= 3)
+ if (gAtmosphere && mVertexShaderLevel[SHADER_WINDLIGHT] >= 3)
{
gDeferredWLSkyProgram.mExtraLinkObject = gAtmosphere->getAtmosphericShaderForLink();
}
@@ -3537,11 +3512,14 @@ BOOL LLViewerShaderMgr::loadShadersWindLight()
return TRUE;
}
+#if USE_ADVANCED_ATMOSPHERICS
+// disabled until we can determine why low-end machines crash during this init...
if (mVertexShaderLevel[SHADER_WINDLIGHT] > 1)
{
// Prepare precomputed atmospherics textures using libatmosphere
LLAtmosphere::initClass();
}
+#endif
if (success)
{