vo_opengl: use GLX_MESA_swap_control where available

This overrides the use of GLX_SGI_swap_control, because apparently
GLX_SGI_swap_control doesn't support SwapInterval(0), but the
GLX_MESA_swap_interval does.

Of course, everybody except mesa just accepts SwapInterval(0) even for
GLX_SGI_swap_control, but mesa needs to be the special snowflake here
and reject it, forcing us to load their stupid named extension instead.

Meanwhile khronos has done nothing except spit out GLX_EXT_swap_control
(not to be confused with GL_EXT_swap_control, which is exported by
WGL_EXT_swap_control), that doesn't fix the problem because mesa doesn't
implement it anyway.

What a fucking mess.
This commit is contained in:
Niklas Haas 2017-09-12 06:30:10 +02:00
parent 67d1ec8fad
commit 293c696ddb
1 changed files with 9 additions and 0 deletions

View File

@ -383,6 +383,15 @@ static const struct gl_functions gl_functions[] = {
{0},
},
},
// This one overrides GLX_SGI_swap_control on platforms using mesa. The
// only difference is that it supports glXSwapInterval(0).
{
.extension = "GLX_MESA_swap_control",
.functions = (const struct gl_function[]) {
DEF_FN_NAME(SwapInterval, "glXSwapIntervalMESA"),
{0},
},
},
{
.extension = "WGL_EXT_swap_control",
.functions = (const struct gl_function[]) {