diff --git a/src/compositor.c b/src/compositor.c index dfc279dc937d8ee815b3097138c8125e286eb3b4..aaaaa63e1524d50790b04890aba44e0d6cc4dd00 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1083,29 +1083,6 @@ check_glx_renderer (ScreenInfo *screen_info) return TRUE; } -static void -init_glx_extensions (ScreenInfo *screen_info) -{ - g_return_if_fail (screen_info != NULL); - - TRACE ("entering init_glx_extensions"); - - screen_info->has_glx_sync_control = - epoxy_has_glx_extension (myScreenGetXDisplay (screen_info), - screen_info->screen, - "GLX_OML_sync_control"); - - screen_info->has_glx_video_sync = - epoxy_has_glx_extension (myScreenGetXDisplay (screen_info), - screen_info->screen, - "GLX_SGI_video_sync"); - - screen_info->has_texture_from_pixmap = - epoxy_has_glx_extension (myScreenGetXDisplay (screen_info), - screen_info->screen, - "GLX_EXT_texture_from_pixmap"); -} - static gboolean check_gl_extensions (ScreenInfo *screen_info) { @@ -1325,17 +1302,6 @@ init_glx (ScreenInfo *screen_info) return FALSE; } - init_glx_extensions (screen_info); - if (!screen_info->has_glx_video_sync && !screen_info->has_glx_sync_control) - { - g_warning ("Screen is missing required GLX extension, vsync disabled."); - /* - * Strictly speaking, we /could/ be using GLX without VSync support, but what - * would be the point? Chances are we'd be using swrast anyway... - */ - return FALSE; - } - if (!choose_glx_settings (screen_info)) { g_warning ("Cannot find a matching GLX config, vsync disabled."); @@ -1401,35 +1367,6 @@ init_glx (ScreenInfo *screen_info) return TRUE; } -/* Following routine is taken from gdk GL context code by Alexander Larsson */ -static void -wait_glx_vblank (ScreenInfo *screen_info) -{ - guint32 current_count; - - g_return_if_fail (screen_info != NULL); - - TRACE ("entering wait_glx_vblank"); - - if (screen_info->has_glx_sync_control) - { - gint64 ust, msc, sbc; - - glXGetSyncValuesOML (myScreenGetXDisplay (screen_info), - screen_info->glx_window, - &ust, &msc, &sbc); - glXWaitForMscOML (myScreenGetXDisplay (screen_info), - screen_info->glx_window, - 0, 2, (msc + 1) % 2, - &ust, &msc, &sbc); - } - else if (screen_info->has_glx_video_sync) - { - glXGetVideoSyncSGI (¤t_count); - glXWaitVideoSyncSGI (2, (current_count + 1) % 2, ¤t_count); - } -} - static GLXDrawable create_glx_drawable (ScreenInfo *screen_info, Pixmap pixmap) { @@ -2225,7 +2162,6 @@ paint_all (ScreenInfo *screen_info, XserverRegion region, gushort buffer) if (screen_info->use_glx) /* glx first if available */ { glXWaitX (); - wait_glx_vblank (screen_info); bind_glx_texture (screen_info, screen_info->rootPixmap[buffer]); redraw_glx_texture (screen_info); diff --git a/src/screen.h b/src/screen.h index 1309092305d5811a52fc7a83a8c824136ebb4800..e29f4e9feee17bddf032975471070ec4364761de 100644 --- a/src/screen.h +++ b/src/screen.h @@ -207,9 +207,6 @@ struct _ScreenInfo gboolean use_present; #ifdef HAVE_EPOXY - gboolean has_glx_sync_control; - gboolean has_glx_video_sync; - gboolean has_texture_from_pixmap; gboolean texture_inverted; GLuint rootTexture;