Skinned shaders were exceeding maximum amount of vertex uniforms on amd hardware.
-Changed the transform matrix uniform to a 3x4 matrix and packed translation into it to free up uniforms. (3x3 is converted to 3x4 internally, so we were needlessly eating 3*52 extra uniform slots. translationPalette might also have been treated as a vec4 internally too, wasting 52 more slots.) -matrix3x4 requires opengl2.1 and newer, so added a new featuretable mask. -Also added a featuretable mask to disable hardware skinning and deferred shading on hardware with less than 1024 vertex uniforms. NOTE: On old old old amd hardware, evidently a 3x4 matrix might be upgraded to 4x4. I'm unsure, but I doubt such hardware has 1024+ uniform components available to begin with. 4x3 supposedly doesn't do this, but opengl is column-major, so this makes little sense.
This commit is contained in:
@@ -634,13 +634,17 @@ void LLFeatureManager::applyBaseMasks()
|
||||
{
|
||||
maskFeatures("Intel");
|
||||
}
|
||||
if (gGLManager.mGLVersion < 1.5f)
|
||||
{
|
||||
maskFeatures("OpenGLPre15");
|
||||
}
|
||||
if (gGLManager.mGLVersion < 3.f)
|
||||
{
|
||||
maskFeatures("OpenGLPre30");
|
||||
if(gGLManager.mGLVersion < 2.1f || glUniformMatrix3x4fvARB == NULL) //glUniformMatrix3x4fv is part of glsl 1.20 spec.
|
||||
{
|
||||
maskFeatures("OpenGLPre21");
|
||||
if (gGLManager.mGLVersion < 1.5f)
|
||||
{
|
||||
maskFeatures("OpenGLPre15");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gGLManager.mNumTextureImageUnits <= 8)
|
||||
{
|
||||
@@ -650,6 +654,10 @@ void LLFeatureManager::applyBaseMasks()
|
||||
{
|
||||
maskFeatures("MapBufferRange");
|
||||
}
|
||||
if (gGLManager.mGLMaxVertexUniformComponents < 1024)
|
||||
{
|
||||
maskFeatures("VertexUniformsLT1024");
|
||||
}
|
||||
|
||||
// now mask by gpu string
|
||||
// Replaces ' ' with '_' in mGPUString to deal with inability for parser to handle spaces
|
||||
|
||||
Reference in New Issue
Block a user