[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#519729: Patch to fix redraw issue on Nvidia cards

This patch was made from this commit to compiz. Patch is for package compiz-fusion-plugins-main 0.7.6-1 (from Sid).

Comments from commit:
Add workaround to force X-to-GLX synchronization, which should help for
the race condition in the XDamage protocol Nvidia users are suffering

This is my first patch, so maybe something is wrong..

diff -ruN a/metadata/workarounds.xml.in b/metadata/workarounds.xml.in
--- a/metadata/workarounds.xml.in	2008-06-03 05:51:24.000000000 +0700
+++ b/metadata/workarounds.xml.in	2009-03-16 14:19:52.000000000 +0600
@@ -48,6 +48,11 @@
                 <_long>Fix for broken GLX_MESA_copy_sub_buffer on XGL in fglrx.</_long>
+            <option type="bool" name="force_glx_sync">
+                <_short>Force synchronization between X and GLX</_short>
+                <_long>Force synchronization between X and GLX, which may help for window parts not redrawing correctly when using Nvidia drivers, but also may decrease performance.</_long>
+                <default>false</default>
+            </option>
                 <_short>Window stickyness</_short>
                 <option type="bool" name="sticky_alldesktops">
diff -ruN a/src/workarounds/workarounds.c b/src/workarounds/workarounds.c
--- a/src/workarounds/workarounds.c	2008-06-03 05:51:24.000000000 +0700
+++ b/src/workarounds/workarounds.c	2009-03-16 14:18:46.000000000 +0600
@@ -197,6 +197,9 @@
     currentScreen = s;
+    if (workaroundsGetForceGlxSync (s->display))
+        glXWaitX();
     UNWRAP (ws, s, paintScreen);
     (*s->paintScreen) (s, outputs, numOutputs, mask);
     WRAP (ws, s, paintScreen, workaroundsPaintScreen);

Reply to: