Merge lp:~smspillaz/unity/unity.fix_1041123 into lp:unity

Proposed by Sam Spilsbury on 2012-08-24
Status: Merged
Approved by: Omer Akram on 2012-08-25
Approved revision: 2611
Merged at revision: 2625
Proposed branch: lp:~smspillaz/unity/unity.fix_1041123
Merge into: lp:unity
Diff against target: 32 lines (+4/-0)
1 file modified
plugins/unityshell/src/unityshell.cpp (+4/-0)
To merge this branch: bzr merge lp:~smspillaz/unity/unity.fix_1041123
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve on 2012-08-25
Olivier Tilloy 2012-08-24 Approve on 2012-08-24
Review via email: mp+121152@code.launchpad.net

Commit message

Don't enable client states if BUILD_MODERN_COMPIZ_GL

Description of the change

Don't enable client states if BUILD_MODERN_COMPIZ_GL

To post a comment you must log in.
Olivier Tilloy (osomon) wrote :

I can confirm that this fixes the crash I’m observing when running unity trunk on precise with NVidia proprietary drivers.

I’m not familiar enough with the code to be able to tell whether this could introduce regressions though, so this would need to be tested on different HW configurations.

review: Approve
Daniel van Vugt (vanvugt) :
review: Approve
Unity Merger (unity-merger) wrote :

No commit message specified.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/unityshell.cpp'
2--- plugins/unityshell/src/unityshell.cpp 2012-08-21 10:33:07 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2012-08-24 10:22:22 +0000
4@@ -496,6 +496,7 @@
5 glMatrixMode(GL_MODELVIEW);
6 glPushMatrix();
7
8+#ifndef USE_MODERN_COMPIZ_GL
9 /* This is needed to Fix a crash in glDrawArrays with the NVIDIA driver
10 * see bugs #1031554 and #982626.
11 * The NVIDIA driver looks to see if the legacy GL_VERTEX_ARRAY,
12@@ -505,6 +506,7 @@
13 glDisableClientState(GL_VERTEX_ARRAY);
14 glDisableClientState(GL_TEXTURE_COORD_ARRAY);
15 #endif
16+#endif
17
18 glGetError();
19 }
20@@ -536,10 +538,12 @@
21
22 glPopAttrib();
23
24+#ifndef USE_MODERN_COMPIZ_GL
25 /* Re-enable the client states that have been disabled in nuxPrologue, for
26 * NVIDIA compatibility reasons */
27 glEnableClientState(GL_VERTEX_ARRAY);
28 glEnableClientState(GL_TEXTURE_COORD_ARRAY);
29+#endif
30 #else
31 #ifdef USE_GLES
32 glDepthRangef(0, 1);