Merge lp:~bregma/compiz/lp-1424013-trusty into lp:compiz/0.9.11

Proposed by Stephen M. Webb
Status: Merged
Approved by: Christopher Townsend
Approved revision: 3873
Merged at revision: 3873
Proposed branch: lp:~bregma/compiz/lp-1424013-trusty
Merge into: lp:compiz/0.9.11
Diff against target: 57 lines (+25/-2)
1 file modified
plugins/opengl/src/screen.cpp (+25/-2)
To merge this branch: bzr merge lp:~bregma/compiz/lp-1424013-trusty
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Christopher Townsend Approve
Review via email: mp+252573@code.launchpad.net

Commit message

Add a blacklist of Nvidia integrated GPU's affected by the Nvidia X11 Sync patch.

Description of the change

This is to make a blacklist of Nvidia integrated GPU's that are affected by the recent X11 Sync patch provided by Nvidia.

Cherry-picked from lp:compiz trunk.

To post a comment you must log in.
Revision history for this message
Christopher Townsend (townsend) wrote :

Yep

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/opengl/src/screen.cpp'
2--- plugins/opengl/src/screen.cpp 2015-01-08 16:00:35 +0000
3+++ plugins/opengl/src/screen.cpp 2015-03-11 12:35:03 +0000
4@@ -74,6 +74,15 @@
5 static const size_t NUM_X11_SYNCS = 16;
6
7 /**
8+ * The GPUs to blacklist for X11 sync
9+ */
10+static const char* BLACKLIST_X11_SYNC_GPUS[] = { "GeForce 6150LE",
11+ "GeForce 6150SE",
12+ "GeForce 7025",
13+ "GeForce 7050 PV" };
14+static const int BLACKLIST_SZ = sizeof(BLACKLIST_X11_SYNC_GPUS) / sizeof(BLACKLIST_X11_SYNC_GPUS[0]);
15+
16+/**
17 * The maximum time to wait for a sync object, in nanoseconds.
18 */
19 static const GLuint64 MAX_SYNC_WAIT_TIME = 1000000000ull; // One second
20@@ -564,6 +573,8 @@
21 DetectionWorkaround workaround;
22 #endif
23
24+ int i;
25+
26 #ifdef USE_GLES
27 Display *xdpy;
28 Window overlay;
29@@ -621,7 +632,7 @@
30 visualid = XVisualIDFromVisual (attr.visual);
31 config = configs[0];
32
33- for (int i = 0; i < count; ++i)
34+ for (i = 0; i < count; ++i)
35 {
36 eglGetConfigAttrib (dpy, configs[i], EGL_SAMPLE_BUFFERS, &val);
37 if (val > msaaBuffers)
38@@ -1101,7 +1112,19 @@
39 GL::importSync = (GL::GLImportSyncProc)
40 getProcAddress ("glImportSyncEXT");
41
42- if (GL::importSync)
43+ bool blacklist = false;
44+
45+ for (i = 0; i < BLACKLIST_SZ; ++i)
46+ {
47+ if (strstr (glVendor, "NVIDIA") &&
48+ strstr (glRenderer, BLACKLIST_X11_SYNC_GPUS[i]))
49+ {
50+ blacklist = true;
51+ break;
52+ }
53+ }
54+
55+ if (GL::importSync && !blacklist)
56 GL::xToGLSync = true;
57 }
58

Subscribers

People subscribed via source and target branches