Skip to content

Commit

Permalink
- disable shader storage blocks if none get reported for vertex shaders.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed May 19, 2018
1 parent c6f7d92 commit 3069b53
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gl_load/gl_interface.cpp
Expand Up @@ -238,7 +238,12 @@ void gl_LoadExtensions()
// Intel's GLSL compiler is a bit broken with extensions, so unlock the feature only if not on Intel or having GL 4.3.
if (strstr(gl.vendorstring, "Intel") == NULL || gl_version >= 4.3f)
{
gl.flags |= RFL_SHADER_STORAGE_BUFFER;
// Mesa implements shader storage only for fragment shaders.
// Just disable the feature there. The light buffer may just use a uniform buffer without any adverse effects.
int v;
glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, &v);
if (v > 0)
gl.flags |= RFL_SHADER_STORAGE_BUFFER;
}
}
gl.flags |= RFL_BUFFER_STORAGE;
Expand Down

0 comments on commit 3069b53

Please sign in to comment.