Skip to content

Commit

Permalink
- Fixed uninitialized variable in case GL_MAX_VERTEX_SHADER_STORAGE_B…
Browse files Browse the repository at this point in the history
…LOCKS does not exist.

Old graphics, like mine (Intel Sandybridge Mobile, GL 3.0 Mesa) do not support this, therefore most of the time RFL_SHADER_STORAGE_BUFFER wasn't unset (I found no consequence of this on my machine, but better safe than sorry).

Found out by Valgrind.
  • Loading branch information
edward-san authored and madame-rachelle committed Jun 7, 2019
1 parent 5c1fa3d commit d0ead3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rendering/gl_load/gl_interface.cpp
Expand Up @@ -177,7 +177,7 @@ void gl_LoadExtensions()

// 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;
int v = 0;
glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, &v);
if (v == 0)
gl.flags &= ~RFL_SHADER_STORAGE_BUFFER;
Expand Down

0 comments on commit d0ead3e

Please sign in to comment.