From 293c696ddb2a3799ca055d548df8f9f2521e4a27 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Tue, 12 Sep 2017 06:30:10 +0200 Subject: 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. --- video/out/opengl/common.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'video') diff --git a/video/out/opengl/common.c b/video/out/opengl/common.c index 3d03c478b9..db317ee843 100644 --- a/video/out/opengl/common.c +++ b/video/out/opengl/common.c @@ -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[]) { -- cgit v1.2.3