mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 15:22:08 +00:00
- Fixed uninitialized variable in case GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 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.
This commit is contained in:
parent
74e69567ef
commit
589f9b5c24
1 changed files with 1 additions and 1 deletions
|
@ -177,7 +177,7 @@ void gl_LoadExtensions()
|
||||||
|
|
||||||
// Mesa implements shader storage only for fragment shaders.
|
// 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.
|
// 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);
|
glGetIntegerv(GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS, &v);
|
||||||
if (v == 0)
|
if (v == 0)
|
||||||
gl.flags &= ~RFL_SHADER_STORAGE_BUFFER;
|
gl.flags &= ~RFL_SHADER_STORAGE_BUFFER;
|
||||||
|
|
Loading…
Reference in a new issue