Merge lp:~3v1n0/compiz/msaa-configs-ignore-0.9.9 into lp:compiz/0.9.9

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 3655
Merged at revision: 3655
Proposed branch: lp:~3v1n0/compiz/msaa-configs-ignore-0.9.9
Merge into: lp:compiz/0.9.9
Diff against target: 53 lines (+23/-7)
1 file modified
plugins/opengl/src/screen.cpp (+23/-7)
To merge this branch: bzr merge lp:~3v1n0/compiz/msaa-configs-ignore-0.9.9
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Sam Spilsbury Approve
Review via email: mp+163551@code.launchpad.net

Commit message

OpenGL Screen: Ignore the MSAA configs during initialization

This fixes a crash with new MESA drivers and high monitor resolutions
caused by the fact that we're accidentally using some MSAA configs with
some drivers in Mesa 9.0.
Taking in account the values of GLX_SAMPLES and GLX_SAMPLE_BUFFERS
fixes the issue.

See mesa bug https://bugs.freedesktop.org/show_bug.cgi?id=61182

Description of the change

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve
3655. By Marco Trevisan (Treviño)

GLScreen: use compiz name conventions

Revision history for this message
PS Jenkins bot (ps-jenkins) :
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 2013-01-09 10:57:03 +0000
3+++ plugins/opengl/src/screen.cpp 2013-05-13 15:57:27 +0000
4@@ -1058,7 +1058,7 @@
5
6 for (i = 0; i <= MAX_DEPTH; i++)
7 {
8- int j, db, stencil, depth, alpha, mipmap, rgba;
9+ int j, db, stencil, depth, alpha, mipmap, msaaBuffers, msaaSamples, rgba;
10
11 priv->glxPixmapFBConfigs[i].fbConfig = NULL;
12 priv->glxPixmapFBConfigs[i].mipmap = 0;
13@@ -1066,11 +1066,13 @@
14 priv->glxPixmapFBConfigs[i].textureFormat = 0;
15 priv->glxPixmapFBConfigs[i].textureTargets = 0;
16
17- db = MAXSHORT;
18- stencil = MAXSHORT;
19- depth = MAXSHORT;
20- mipmap = 0;
21- rgba = 0;
22+ db = MAXSHORT;
23+ stencil = MAXSHORT;
24+ depth = MAXSHORT;
25+ msaaBuffers = MAXSHORT;
26+ msaaSamples = MAXSHORT;
27+ mipmap = 0;
28+ rgba = 0;
29
30 for (j = 0; j < nElements; j++)
31 {
32@@ -1146,7 +1148,21 @@
33 depth = value;
34
35 (*GL::getFBConfigAttrib) (dpy, fbConfigs[j],
36- GLX_BIND_TO_MIPMAP_TEXTURE_EXT, &value);
37+ GLX_SAMPLE_BUFFERS, &value);
38+ if (value > msaaBuffers)
39+ continue;
40+
41+ msaaBuffers = value;
42+
43+ (*GL::getFBConfigAttrib) (dpy, fbConfigs[j],
44+ GLX_SAMPLES, &value);
45+ if (value > msaaSamples)
46+ continue;
47+
48+ msaaSamples = value;
49+
50+ (*GL::getFBConfigAttrib) (dpy, fbConfigs[j],
51+ GLX_BIND_TO_MIPMAP_TEXTURE_EXT, &value);
52 if (value < mipmap)
53 continue;
54

Subscribers

People subscribed via source and target branches