Skip to content

Commit 73420f4

Browse files
#3184 Fix for crash on some GPUs when setting quality to High or higher (#3201)
1 parent 9cc343b commit 73420f4

File tree

5 files changed

+16
-2
lines changed

5 files changed

+16
-2
lines changed

indra/llrender/llgl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,6 +1259,7 @@ bool LLGLManager::initGL()
12591259
glGetIntegerv(GL_MAX_INTEGER_SAMPLES, &mMaxIntegerSamples);
12601260
glGetIntegerv(GL_MAX_SAMPLE_MASK_WORDS, &mMaxSampleMaskWords);
12611261
glGetIntegerv(GL_MAX_SAMPLES, &mMaxSamples);
1262+
glGetIntegerv(GL_MAX_VARYING_VECTORS, &mMaxVaryingVectors);
12621263
glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &mMaxUniformBlockSize);
12631264

12641265
// sanity clamp max uniform block size to 64k just in case

indra/llrender/llgl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class LLGLManager
8888
S32 mGLMaxTextureSize;
8989
F32 mMaxAnisotropy = 0.f;
9090
S32 mMaxUniformBlockSize = 0;
91+
S32 mMaxVaryingVectors = 0;
9192

9293
// GL 4.x capabilities
9394
bool mHasCubeMapArray = false;

indra/newview/featuretable.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version 72
1+
version 73
22
// The version number above should be incremented IF AND ONLY IF some
33
// change has been made that is sufficiently important to justify
44
// resetting the graphics preferences of all users to the recommended
@@ -428,3 +428,7 @@ RenderVintageMode 1 1
428428

429429
list TexUnit16orLess
430430
RenderTerrainPBRDetail 1 -1
431+
432+
list VaryingVectors16orLess
433+
RenderTerrainPBRPlanarSampleCount 1 1
434+

indra/newview/featuretable_mac.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version 66
1+
version 67
22
// The version number above should be incremented IF AND ONLY IF some
33
// change has been made that is sufficiently important to justify
44
// resetting the graphics preferences of all users to the recommended
@@ -426,3 +426,7 @@ RenderReflectionProbeDetail 0 0
426426
RenderReflectionsEnabled 0 0
427427
RenderMirrors 0 0
428428
RenderVintageMode 1 1
429+
430+
list VaryingVectors16orLess
431+
RenderTerrainPBRPlanarSampleCount 1 1
432+

indra/newview/llfeaturemanager.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,10 @@ void LLFeatureManager::applyBaseMasks()
721721
// Make extra sure that vintage mode also gets enabled.
722722
gSavedSettings.setBOOL("RenderVintageMode", true);
723723
}
724+
if (gGLManager.mMaxVaryingVectors <= 16)
725+
{
726+
maskFeatures("VaryingVectors16orLess");
727+
}
724728

725729
// now mask by gpu string
726730
// Replaces ' ' with '_' in mGPUString to deal with inability for parser to handle spaces

0 commit comments

Comments
 (0)