mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 23:32:02 +00:00
- only activate shader storage buffers on modern drivers also supporting GL_ARB_buffer storage. Early adopters of this extension (i.e. older AMD drivers mainly) tend to implement this badly.
This commit is contained in:
parent
df1364e2d7
commit
c773a500f2
1 changed files with 10 additions and 2 deletions
|
@ -133,8 +133,16 @@ void gl_LoadExtensions()
|
||||||
if (!Args->CheckParm("-gl3"))
|
if (!Args->CheckParm("-gl3"))
|
||||||
{
|
{
|
||||||
// don't use GL 4.x features when running in GL 3 emulation mode.
|
// don't use GL 4.x features when running in GL 3 emulation mode.
|
||||||
if (CheckExtension("GL_ARB_shader_storage_buffer_object")) gl.flags |= RFL_SHADER_STORAGE_BUFFER;
|
if (CheckExtension("GL_ARB_buffer_storage"))
|
||||||
if (CheckExtension("GL_ARB_buffer_storage")) gl.flags |= RFL_BUFFER_STORAGE;
|
{
|
||||||
|
// work around a problem with older AMD drivers: Their implementation of shader storage buffer objects is piss-poor and does not match uniform buffers even closely.
|
||||||
|
// Recent drivers, GL 4.4 don't have this problem, these can easily be recognized by also supporting the GL_ARB_buffer_storage extension.
|
||||||
|
if (CheckExtension("GL_ARB_shader_storage_buffer_object"))
|
||||||
|
{
|
||||||
|
gl.flags |= RFL_SHADER_STORAGE_BUFFER;
|
||||||
|
}
|
||||||
|
gl.flags |= RFL_BUFFER_STORAGE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int v;
|
int v;
|
||||||
|
|
Loading…
Reference in a new issue