← Back to team overview

compiz team mailing list archive

[Merge] lp:~vanvugt/compiz/fix-763005-trunk into lp:compiz

 

Daniel van Vugt has proposed merging lp:~vanvugt/compiz/fix-763005-trunk into lp:compiz.

Requested reviews:
  compiz packagers (compiz)
Related bugs:
  Bug #763005 in fglrx-installer (Ubuntu): "Compiz's "Sync to Vblank" makes display stutter/slow with some drivers (like fglrx)"
  https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/763005

For more details, see:
https://code.launchpad.net/~vanvugt/compiz/fix-763005-trunk/+merge/68229

Fix slow/stuttering display when sync to Vblank is enabled. (LP: #763005)

This occurs with some drivers like fglrx where glXGetVideoSyncSGI and/or glXWaitVideoSyncSGI are particularly slow. It's true ATI/AMD could improve the performance of their driver to avoid this bug, but simplifying the relevant compiz logic avoids the bug for any driver.

-- 
https://code.launchpad.net/~vanvugt/compiz/fix-763005-trunk/+merge/68229
Your team compiz packagers is requested to review the proposed merge of lp:~vanvugt/compiz/fix-763005-trunk into lp:compiz.
=== added file 'debian/patches/092_fix_slow_vsync_lp763005.patch'
--- debian/patches/092_fix_slow_vsync_lp763005.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/092_fix_slow_vsync_lp763005.patch	2011-07-18 10:48:20 +0000
@@ -0,0 +1,62 @@
+Description: Fix slow/stuttering display when sync to Vblank is enabled.
+  This occurs with some drivers like fglrx where glXGetVideoSyncSGI and/or
+  glXWaitVideoSyncSGI are particularly slow. It's true ATI/AMD could improve
+  the performance of their driver to avoid this bug, but simplifying the
+  relevant compiz logic avoids the bug for any driver.
+Author: Daniel van Vugt <vanvugt@xxxxxxxxx>
+Bug-Ubuntu: https://launchpad.net/bugs/763005
+
+=== modified file 'plugins/opengl/src/screen.cpp'
+--- old/plugins/opengl/src/screen.cpp	2011-04-06 19:37:45 +0000
++++ new/plugins/opengl/src/screen.cpp	2011-07-18 09:52:54 +0000
+@@ -36,7 +36,6 @@
+     GLXReleaseTexImageProc   releaseTexImage = NULL;
+     GLXQueryDrawableProc     queryDrawable = NULL;
+     GLXCopySubBufferProc     copySubBuffer = NULL;
+-    GLXGetVideoSyncProc      getVideoSync = NULL;
+     GLXWaitVideoSyncProc     waitVideoSync = NULL;
+     GLXGetFBConfigsProc      getFBConfigs = NULL;
+     GLXGetFBConfigAttribProc getFBConfigAttrib = NULL;
+@@ -227,9 +226,6 @@
+ 
+     if (strstr (glxExtensions, "GLX_SGI_video_sync"))
+     {
+-	GL::getVideoSync = (GL::GLXGetVideoSyncProc)
+-	    getProcAddress ("glXGetVideoSyncSGI");
+-
+ 	GL::waitVideoSync = (GL::GLXWaitVideoSyncProc)
+ 	    getProcAddress ("glXWaitVideoSyncSGI");
+     }
+@@ -1004,17 +1000,12 @@
+ void
+ PrivateGLScreen::waitForVideoSync ()
+ {
+-    unsigned int sync;
+-
+-    if (!optionGetSyncToVblank ())
+-	return;
+-
+-    if (GL::getVideoSync)
++    if (optionGetSyncToVblank () && GL::waitVideoSync)
+     {
+-	glFlush ();
+-
+-	(*GL::getVideoSync) (&sync);
+-	(*GL::waitVideoSync) (2, (sync + 1) % 2, &sync);
++        // Docs: http://www.opengl.org/registry/specs/SGI/video_sync.txt
++        unsigned int frameno;
++        glFlush ();
++        (*GL::waitVideoSync) (1, 0, &frameno);
+     }
+ }
+ 
+@@ -1153,7 +1144,7 @@
+ bool
+ PrivateGLScreen::hasVSync ()
+ {
+-   return (GL::getVideoSync && optionGetSyncToVblank ());
++   return (GL::waitVideoSync && optionGetSyncToVblank ());
+ }
+ 
+ void
+

=== modified file 'debian/patches/series'
--- debian/patches/series	2011-07-05 09:29:20 +0000
+++ debian/patches/series	2011-07-18 10:48:20 +0000
@@ -8,3 +8,4 @@
 086_new_grid_defaults.patch
 090_run_gtk_init.patch
 091_no_use_gnome_but_desktop_file.patch
+092_fix_slow_vsync_lp763005.patch


Follow ups