Skip to content
Snippets Groups Projects
Commit e61b6570 authored by David Parks's avatar David Parks
Browse files

SL-17701 Fix for crash on AMD WHQL drivers.

parent afb7efbf
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
...@@ -977,8 +977,11 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms) ...@@ -977,8 +977,11 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms)
static const GLuint BLOCKBINDING = 1; //picked by us static const GLuint BLOCKBINDING = 1; //picked by us
//Get the index, similar to a uniform location //Get the index, similar to a uniform location
GLuint UBOBlockIndex = glGetUniformBlockIndex(mProgramObject, "ReflectionProbes"); GLuint UBOBlockIndex = glGetUniformBlockIndex(mProgramObject, "ReflectionProbes");
//Set this index to a binding index if (UBOBlockIndex != GL_INVALID_INDEX)
glUniformBlockBinding(mProgramObject, UBOBlockIndex, BLOCKBINDING); {
//Set this index to a binding index
glUniformBlockBinding(mProgramObject, UBOBlockIndex, BLOCKBINDING);
}
} }
unbind(); unbind();
......
...@@ -268,20 +268,7 @@ void main() ...@@ -268,20 +268,7 @@ void main()
vec3 light = vec3(0); vec3 light = vec3(0);
// Punctual lights // Punctual lights
#define LIGHT_LOOP(i) light += calcPointLightOrSpotLight( \ #define LIGHT_LOOP(i) light += calcPointLightOrSpotLight( reflect0, reflect90, alphaRough, c_diff, light_diffuse[i].rgb, base.rgb, pos.xyz, v, n, light_position[i], light_direction[i].xyz, light_deferred_attenuation[i].x, light_deferred_attenuation[i].y, light_attenuation[i].z, light_attenuation[i].w );
reflect0, \
reflect90, \
alphaRough, \
c_diff, \
light_diffuse[i].rgb, \
base.rgb, \
pos.xyz, \
v, \
n, \
light_position[i], \
light_direction[i].xyz, \
light_deferred_attenuation[i].x, light_deferred_attenuation[i].y, \
light_attenuation[i].z, light_attenuation[i].w );
LIGHT_LOOP(1) LIGHT_LOOP(1)
LIGHT_LOOP(2) LIGHT_LOOP(2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment