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
=== modified file 'plugins/opengl/src/screen.cpp'
--- plugins/opengl/src/screen.cpp 2013-01-09 10:57:03 +0000
+++ plugins/opengl/src/screen.cpp 2013-05-13 15:57:27 +0000
@@ -1058,7 +1058,7 @@
10581058
1059 for (i = 0; i <= MAX_DEPTH; i++)1059 for (i = 0; i <= MAX_DEPTH; i++)
1060 {1060 {
1061 int j, db, stencil, depth, alpha, mipmap, rgba;1061 int j, db, stencil, depth, alpha, mipmap, msaaBuffers, msaaSamples, rgba;
10621062
1063 priv->glxPixmapFBConfigs[i].fbConfig = NULL;1063 priv->glxPixmapFBConfigs[i].fbConfig = NULL;
1064 priv->glxPixmapFBConfigs[i].mipmap = 0;1064 priv->glxPixmapFBConfigs[i].mipmap = 0;
@@ -1066,11 +1066,13 @@
1066 priv->glxPixmapFBConfigs[i].textureFormat = 0;1066 priv->glxPixmapFBConfigs[i].textureFormat = 0;
1067 priv->glxPixmapFBConfigs[i].textureTargets = 0;1067 priv->glxPixmapFBConfigs[i].textureTargets = 0;
10681068
1069 db = MAXSHORT;1069 db = MAXSHORT;
1070 stencil = MAXSHORT;1070 stencil = MAXSHORT;
1071 depth = MAXSHORT;1071 depth = MAXSHORT;
1072 mipmap = 0;1072 msaaBuffers = MAXSHORT;
1073 rgba = 0;1073 msaaSamples = MAXSHORT;
1074 mipmap = 0;
1075 rgba = 0;
10741076
1075 for (j = 0; j < nElements; j++)1077 for (j = 0; j < nElements; j++)
1076 {1078 {
@@ -1146,7 +1148,21 @@
1146 depth = value;1148 depth = value;
11471149
1148 (*GL::getFBConfigAttrib) (dpy, fbConfigs[j],1150 (*GL::getFBConfigAttrib) (dpy, fbConfigs[j],
1149 GLX_BIND_TO_MIPMAP_TEXTURE_EXT, &value);1151 GLX_SAMPLE_BUFFERS, &value);
1152 if (value > msaaBuffers)
1153 continue;
1154
1155 msaaBuffers = value;
1156
1157 (*GL::getFBConfigAttrib) (dpy, fbConfigs[j],
1158 GLX_SAMPLES, &value);
1159 if (value > msaaSamples)
1160 continue;
1161
1162 msaaSamples = value;
1163
1164 (*GL::getFBConfigAttrib) (dpy, fbConfigs[j],
1165 GLX_BIND_TO_MIPMAP_TEXTURE_EXT, &value);
1150 if (value < mipmap)1166 if (value < mipmap)
1151 continue;1167 continue;
11521168

Subscribers

People subscribed via source and target branches