summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/CASF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflPostF.glsl2
-rw-r--r--indra/newview/llfeaturemanager.cpp15
-rw-r--r--indra/newview/llviewershadermgr.cpp9
-rw-r--r--indra/newview/llviewertexture.cpp2
-rw-r--r--indra/newview/llviewertexturelist.cpp2
-rw-r--r--indra/newview/pipeline.cpp27
8 files changed, 46 insertions, 15 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl b/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl
index e80c59b39f..017855325c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl
@@ -1150,7 +1150,7 @@ vec3 linear_to_srgb(vec3 cl);
AF3 ASignedF3(AF3 m){return ASatF3(m*AF3_(A_INFN_F));}
AF4 ASignedF4(AF4 m){return ASatF4(m*AF4_(A_INFN_F));}
//------------------------------------------------------------------------------------------------------------------------------
- AF1 AGtZeroF1(AF1 m){return ASatF1(m*AF1_(A_INFP_F));}
+// #2744 avoid constant overflow AF1 AGtZeroF1(AF1 m){return ASatF1(m*AF1_(A_INFP_F));}
AF2 AGtZeroF2(AF2 m){return ASatF2(m*AF2_(A_INFP_F));}
AF3 AGtZeroF3(AF3 m){return ASatF3(m*AF3_(A_INFP_F));}
AF4 AGtZeroF4(AF4 m){return ASatF4(m*AF4_(A_INFP_F));}
diff --git a/indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl b/indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl
index feb0947649..b3964c9215 100644
--- a/indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/radianceGenF.glsl
@@ -130,7 +130,7 @@ vec4 prefilterEnvMap(vec3 R)
float totalWeight = 0.0;
float envMapDim = float(textureSize(reflectionProbes, 0).s);
float roughness = mipLevel/max_probe_lod;
- int numSamples = max(int(PROBE_FILTER_SAMPLES*roughness), 1);
+ uint numSamples = uint(max(PROBE_FILTER_SAMPLES*roughness, 1));
float numMips = max_probe_lod+1;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflPostF.glsl b/indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflPostF.glsl
index 9ac389f926..dc135243a6 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflPostF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflPostF.glsl
@@ -81,7 +81,7 @@ void main()
vec4 collectedColor = vec4(0);
- float w = tapScreenSpaceReflection(4, tc, pos, norm.xyz, collectedColor, diffuseMap, 0);
+ float w = tapScreenSpaceReflection(4, tc, pos, norm.xyz, collectedColor, diffuseMap, 0.f);
collectedColor.rgb *= specCol.rgb;
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 88024b8390..7a99702e27 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -655,6 +655,21 @@ void LLFeatureManager::applyBaseMasks()
if (gGLManager.mIsIntel)
{
maskFeatures("Intel");
+ if (gGLManager.mGLVersion < 4.59f)
+ {
+ // if we don't have OpenGL 4.6 on intel, set it to OpenGL 3.3
+ // we also want to trigger the GL3 fallbacks on these chipsets
+ // this is expected to be mainly pre-Haswell Intel HD Graphics 4X00 and 5X00.
+ // A lot of these chips claim 4.3 or 4.4 support, but don't seem to work.
+ // https://code.blender.org/2019/04/supported-gpus-in-blender-2-80/
+ // https://docs.blender.org/manual/en/latest/troubleshooting/gpu/windows/intel.html#legacy-intel-hd-4000-5000
+ // https://www.intel.com/content/www/us/en/support/articles/000005524/graphics.html
+ // this will disable things like reflection probes, HDR, FXAA and SMAA
+ gGLManager.mGLVersion = llmin(gGLManager.mGLVersion, 3.33f);
+ // and select GLSL version for OpenGL 3.3
+ gGLManager.mGLSLVersionMajor = 3;
+ gGLManager.mGLSLVersionMinor = 30;
+ }
}
if (gGLManager.mIsApple)
{
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index f5af9cc397..cdebb08b18 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -2501,7 +2501,14 @@ bool LLViewerShaderMgr::loadShadersDeferred()
gCASProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER));
gCASProgram.mShaderFiles.push_back(make_pair("deferred/CASF.glsl", GL_FRAGMENT_SHADER));
gCASProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED];
- gCASProgram.createShader();
+ success = gCASProgram.createShader();
+ // llassert(success);
+ if (!success)
+ {
+ LL_WARNS() << "Failed to create shader '" << gCASProgram.mName << "', disabling!" << LL_ENDL;
+ // continue as if this shader never happened
+ success = true;
+ }
}
if (success)
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index c10e28d688..03c586b270 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -2917,7 +2917,7 @@ void LLViewerLODTexture::processTextureStats()
mDesiredDiscardLevel = 0;
}
// Generate the request priority and render priority
- else if (mDontDiscard || !mUseMipMaps)
+ else if (mDontDiscard || !mUseMipMaps || (getFTType() == FTT_MAP_TILE))
{
mDesiredDiscardLevel = 0;
if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT)
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 538e6a6763..411190eb67 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1071,7 +1071,7 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
imagep->mCreatePending = false;
mCreateTextureList.pop();
- if (imagep->getDiscardLevel() < imagep->getDesiredDiscardLevel())
+ if (imagep->hasGLTexture() && imagep->getDiscardLevel() < imagep->getDesiredDiscardLevel())
{
LL_WARNS_ONCE("Texture") << "Texture will be downscaled immediately after loading." << LL_ENDL;
imagep->scaleDown();
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 76b8cebf94..af0bd013b2 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1436,15 +1436,24 @@ void LLPipeline::createLUTBuffers()
mPbrBrdfLut.allocate(512, 512, GL_RG16F);
mPbrBrdfLut.bindTarget();
- gDeferredGenBrdfLutProgram.bind();
-
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.vertex2f(-1, -1);
- gGL.vertex2f(-1, 1);
- gGL.vertex2f(1, -1);
- gGL.vertex2f(1, 1);
- gGL.end();
- gGL.flush();
+
+ if (gDeferredGenBrdfLutProgram.isComplete())
+ {
+ gDeferredGenBrdfLutProgram.bind();
+ llassert_always(LLGLSLShader::sCurBoundShaderPtr != nullptr);
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.vertex2f(-1, -1);
+ gGL.vertex2f(-1, 1);
+ gGL.vertex2f(1, -1);
+ gGL.vertex2f(1, 1);
+ gGL.end();
+ gGL.flush();
+ }
+ else
+ {
+ LL_WARNS("Brad") << gDeferredGenBrdfLutProgram.mName << " failed to load, cannot be used!" << LL_ENDL;
+ }
gDeferredGenBrdfLutProgram.unbind();
mPbrBrdfLut.flush();