Commit acae320e authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

gl: don't do direct rendering below OpenGL 3.0

See comments.
parent 96b96301
......@@ -1125,7 +1125,14 @@ generic_init(opengl_tex_converter_t *tc, bool allow_dr)
const bool has_bs =
HasExtension(tc->glexts, "GL_ARB_buffer_storage") ||
HasExtension(tc->glexts, "GL_EXT_buffer_storage");
supports_map_persistent = has_pbo && has_bs && tc->api->BufferStorage
/* Ensure we do direct rendering with OpenGL 3.0 or higher. Indeed,
* persistent mapped buffers seems to be slow with OpenGL 2.1 drivers
* and bellow. This may be caused by OpenGL compatibility layer. */
const unsigned char *ogl_version = glGetString(GL_VERSION);
const bool glver_ok = strverscmp((const char *)ogl_version, "3.0") >= 0;
supports_map_persistent = glver_ok && has_pbo && has_bs && tc->api->BufferStorage
&& tc->api->MapBufferRange && tc->api->FlushMappedBufferRange
&& tc->api->UnmapBuffer && tc->api->FenceSync && tc->api->DeleteSync
&& tc->api->ClientWaitSync;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment