Merge lp:~compiz-team/compiz/quantal.fix_1127866 into lp:ubuntu/quantal/compiz

Proposed by Sam Spilsbury
Status: Work in progress
Proposed branch: lp:~compiz-team/compiz/quantal.fix_1127866
Merge into: lp:ubuntu/quantal/compiz
Diff against target: 238 lines (+190/-1)
6 files modified
debian/changelog (+10/-0)
debian/compiz-plugins-default.install (+1/-0)
debian/compiz-plugins.install (+0/-1)
debian/patches/100_workaround_virtualbox_hang.patch (+176/-0)
debian/patches/series (+1/-0)
debian/profile_upgrades/com.canonical.unity.unity.03.upgrade (+2/-0)
To merge this branch: bzr merge lp:~compiz-team/compiz/quantal.fix_1127866
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+148926@code.launchpad.net

Commit message

Workaround hangs in glXBindTexImageEXT - we need a server grab for the
external pixmap case, but we can just revert to using copytex if using
VirtualBox for now.

(LP: #1127866)

Description of the change

Workaround hangs in glXBindTexImageEXT - we need a server grab for the
external pixmap case, but we can just revert to using copytex if using
VirtualBox for now.

(LP: #1127866)

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

This fix looks good however the related bug report is missing information for the SRU process specific details regarding what is necessary can be found at http://wiki.ubuntu.com/StableReleaseUpdates. Thanks!

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Don't worry about this for now, we're just reverting the fix for the crash on llvmpipe until the virtualbox fix goes in upstream.

Unmerged revisions

3320. By Sam Spilsbury

Workaround hangs in glXBindTexImageEXT - we need a server grab for the
external pixmap case, but we can just revert to using copytex if using
VirtualBox for now.

(LP: #1127866)

3319. By Didier Roche-Tolomelli

releasing version 1:0.9.8.4+bzr3407-0ubuntu1

3318. By Timo Jyrinki

* New upstream snapshot.
  - Cherry-picked fixes in Ubuntu merged to development branch
  - Disable failing tests due to distro patch (LP: #1058577)
  - Fix leakage of destroyed_pixmaps_table, containing pointers to freed
    decor_t's which could result in a freed GHashTable being passed into
    g_hash_table_remove and causing a crash. (LP: #1060171)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-10-17 06:06:09 +0000
3+++ debian/changelog 2013-02-17 07:32:22 +0000
4@@ -1,3 +1,13 @@
5+compiz (1:0.9.8.4+bzr3408-0ubuntu1) quantal-proposed; urgency=low
6+
7+ * debian/patches/100_workaround_virtualbox_hang.patch
8+ - VirtualBox uses a shared-memory texture_from_pixmap_implementation
9+ which is not compatible with our server grab usage, so force
10+ a different bind method when running with virtualbox and binding
11+ an externally managed texture
12+
13+ -- Sam Spilsbury <smspillaz@gmail.com> Sun, 17 Feb 2013 10:26:40 +0800
14+
15 compiz (1:0.9.8.4+bzr3407-0ubuntu1) quantal-proposed; urgency=low
16
17 * New upstream snapshot.
18
19=== modified file 'debian/compiz-plugins-default.install'
20--- debian/compiz-plugins-default.install 2012-06-19 11:22:48 +0000
21+++ debian/compiz-plugins-default.install 2013-02-17 07:32:22 +0000
22@@ -1,6 +1,7 @@
23 debian/tmp/usr/*/compiz/*animation.*
24 debian/tmp/usr/*/compiz/*compiztoolbox.*
25 debian/tmp/usr/*/compiz/*composite.*
26+debian/tmp/usr/*/compiz/*copytex.*
27 debian/tmp/usr/*/compiz/*decor.*
28 debian/tmp/usr/*/compiz/*expo.*
29 debian/tmp/usr/*/compiz/*ezoom.*
30
31=== modified file 'debian/compiz-plugins.install'
32--- debian/compiz-plugins.install 2012-08-24 13:41:00 +0000
33+++ debian/compiz-plugins.install 2013-02-17 07:32:22 +0000
34@@ -3,7 +3,6 @@
35 debian/tmp/usr/*/compiz/*bench.*
36 debian/tmp/usr/*/compiz/*clone.*
37 debian/tmp/usr/*/compiz/*commands.*
38-debian/tmp/usr/*/compiz/*copytex.*
39 debian/tmp/usr/*/compiz/*crashhandler.*
40 debian/tmp/usr/*/compiz/*cube.*
41 debian/tmp/usr/*/compiz/*dbus.*
42
43=== added file 'debian/patches/100_workaround_virtualbox_hang.patch'
44--- debian/patches/100_workaround_virtualbox_hang.patch 1970-01-01 00:00:00 +0000
45+++ debian/patches/100_workaround_virtualbox_hang.patch 2013-02-17 07:32:22 +0000
46@@ -0,0 +1,176 @@
47+Index: quantal/plugins/opengl/include/opengl/opengl.h
48+===================================================================
49+--- quantal.orig/plugins/opengl/include/opengl/opengl.h 2013-02-17 10:37:32.625369000 +0800
50++++ quantal/plugins/opengl/include/opengl/opengl.h 2013-02-17 15:09:51.129086082 +0800
51+@@ -578,6 +578,17 @@
52+
53+ extern GLScreenPaintAttrib defaultScreenPaintAttrib;
54+
55++namespace compiz
56++{
57++namespace opengl
58++{
59++namespace internal
60++{
61++class DriverWorkaroundQuery;
62++}
63++}
64++}
65++
66+ class GLScreen;
67+ class GLFramebufferObject;
68+
69+@@ -767,6 +778,13 @@
70+
71+ bool glInitContext (XVisualInfo *);
72+
73++ /**
74++ * This is only meant to be used internally, here to avoid unnecessarily
75++ * breaking the API and ABI. Fetch any driver workarounds in place
76++ */
77++ const compiz::opengl::internal::DriverWorkaroundQuery &
78++ fetchDriverWorkarounds ();
79++
80+ WRAPABLE_HND (0, GLScreenInterface, bool, glPaintOutput,
81+ const GLScreenPaintAttrib &, const GLMatrix &,
82+ const CompRegion &, CompOutput *, unsigned int);
83+Index: quantal/plugins/opengl/src/privates.h
84+===================================================================
85+--- quantal.orig/plugins/opengl/src/privates.h 2013-02-17 10:37:32.625369000 +0800
86++++ quantal/plugins/opengl/src/privates.h 2013-02-17 15:10:47.237085872 +0800
87+@@ -44,6 +44,24 @@
88+
89+ extern CompOutput *targetOutput;
90+
91++namespace compiz
92++{
93++namespace opengl
94++{
95++namespace internal
96++{
97++class DriverWorkaroundQuery
98++{
99++ public:
100++
101++ virtual ~DriverWorkaroundQuery () {};
102++
103++ virtual bool unsafeForExternalBinds () const = 0;
104++};
105++}
106++}
107++}
108++
109+ class GLDoubleBuffer :
110+ public compiz::opengl::DoubleBuffer
111+ {
112+@@ -118,6 +136,7 @@
113+ class PrivateGLScreen :
114+ public ScreenInterface,
115+ public compiz::composite::PaintHandler,
116++ public compiz::opengl::internal::DriverWorkaroundQuery,
117+ public OpenglOptions
118+ {
119+ public:
120+@@ -200,6 +219,7 @@
121+ std::vector<GLTexture::BindPixmapProc> bindPixmap;
122+ bool hasCompositing;
123+ bool commonFrontbuffer;
124++ bool sharedMemoryTFP;
125+ bool incorrectRefreshRate; // hack for NVIDIA specifying an incorrect
126+ // refresh rate, causing us to miss vblanks
127+
128+@@ -214,6 +234,10 @@
129+
130+ Pixmap rootPixmapCopy;
131+ CompSize rootPixmapSize;
132++
133++ private:
134++
135++ bool unsafeForExternalBinds () const;
136+ };
137+
138+ class PrivateGLWindow :
139+Index: quantal/plugins/opengl/src/screen.cpp
140+===================================================================
141+--- quantal.orig/plugins/opengl/src/screen.cpp 2013-02-17 15:09:50.637086084 +0800
142++++ quantal/plugins/opengl/src/screen.cpp 2013-02-17 15:09:51.141086082 +0800
143+@@ -53,6 +53,7 @@
144+
145+
146+ using namespace compiz::opengl;
147++namespace cglint = compiz::opengl::internal;
148+
149+ namespace GL {
150+ #ifdef USE_GLES
151+@@ -287,6 +288,18 @@
152+ };
153+
154+ bool
155++PrivateGLScreen::unsafeForExternalBinds () const
156++{
157++ return sharedMemoryTFP;
158++}
159++
160++const cglint::DriverWorkaroundQuery &
161++GLScreen::fetchDriverWorkarounds ()
162++{
163++ return *priv;
164++}
165++
166++bool
167+ GLScreen::glInitContext (XVisualInfo *visinfo)
168+ {
169+ DetectionWorkaround workaround;
170+@@ -582,6 +595,7 @@
171+
172+ priv->commonFrontbuffer = true;
173+ priv->incorrectRefreshRate = false;
174++ priv->sharedMemoryTFP = false;
175+ if (glRenderer != NULL && strstr (glRenderer, "on llvmpipe"))
176+ {
177+ /*
178+@@ -602,6 +616,18 @@
179+ priv->incorrectRefreshRate = true;
180+ }
181+
182++ if (glVendor != NULL && strstr (glVendor, "Humper"))
183++ {
184++ /*
185++ * VirtualBox uses XShm/XCopyArea in order to implement
186++ * texture_from_pixmap. Because of this, they require
187++ * a second X connection to track damage events and
188++ * changes to the pixmap, and this is incompatible with
189++ * taking a server grab on when querying and binding
190++ * externally managed pixmaps */
191++ priv->sharedMemoryTFP = true;
192++ }
193++
194+ if (strstr (glExtensions, "GL_ARB_texture_non_power_of_two"))
195+ GL::textureNonPowerOfTwo = true;
196+ GL::textureNonPowerOfTwoMipmap = GL::textureNonPowerOfTwo;
197+Index: quantal/plugins/opengl/src/texture.cpp
198+===================================================================
199+--- quantal.orig/plugins/opengl/src/texture.cpp 2013-02-17 10:37:32.625369000 +0800
200++++ quantal/plugins/opengl/src/texture.cpp 2013-02-17 15:09:51.141086082 +0800
201+@@ -41,6 +41,7 @@
202+ #include "glx-tfp-bind.h"
203+
204+ namespace cgl = compiz::opengl;
205++namespace cglint = compiz::opengl::internal;
206+
207+ #ifdef USE_GLES
208+ std::map<Damage, EglTexture*> boundPixmapTex;
209+@@ -648,6 +649,13 @@
210+ !GL::textureFromPixmap)
211+ return GLTexture::List ();
212+
213++ GLScreen *gs = GLScreen::get (screen);
214++ const cglint::DriverWorkaroundQuery &query (gs->fetchDriverWorkarounds ());
215++
216++ if (query.unsafeForExternalBinds () &&
217++ source == cgl::ExternallyManaged)
218++ return GLTexture::List ();
219++
220+ GLTexture::List rv (1);
221+ TfpTexture *tex = NULL;
222+ unsigned int target = 0;
223
224=== modified file 'debian/patches/series'
225--- debian/patches/series 2012-10-09 11:02:28 +0000
226+++ debian/patches/series 2013-02-17 07:32:22 +0000
227@@ -8,3 +8,4 @@
228 99_valid_ccsm_desktop_file.patch
229 100_expo_layout.patch
230 unity_support_test.patch
231+100_workaround_virtualbox_hang.patch
232
233=== added file 'debian/profile_upgrades/com.canonical.unity.unity.03.upgrade'
234--- debian/profile_upgrades/com.canonical.unity.unity.03.upgrade 1970-01-01 00:00:00 +0000
235+++ debian/profile_upgrades/com.canonical.unity.unity.03.upgrade 2013-02-17 07:32:22 +0000
236@@ -0,0 +1,2 @@
237+[core]
238++s0_active_plugins = copytex

Subscribers

People subscribed via source and target branches