1 |
dilfridge 11/09/05 22:18:32 |
2 |
|
3 |
Added: kwin-4.6.5-mesadri.patch |
4 |
Log: |
5 |
Backport fix for Intel DRI mis-detection, bug 380737 |
6 |
|
7 |
(Portage version: 2.1.10.13/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 kde-base/kwin/files/kwin-4.6.5-mesadri.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kwin/files/kwin-4.6.5-mesadri.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kwin/files/kwin-4.6.5-mesadri.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: kwin-4.6.5-mesadri.patch |
16 |
=================================================================== |
17 |
commit afe966579d56f85444c432a3a6adf026d2941bd5 |
18 |
Author: Martin Gräßlin <mgraesslin@×××.org> |
19 |
Date: Sun May 1 11:49:26 2011 +0200 |
20 |
|
21 |
Enable direct rendering for all Mesa drivers |
22 |
|
23 |
As KWin requires at least Mesa 7.10 for OpenGL we can be sure |
24 |
that all Mesa drivers support DRI2 and can enable direct rendering |
25 |
for it. |
26 |
|
27 |
Parsing the version string to identify if it is a mesa driver. |
28 |
This can cause breakage again in future versions of Mesa. |
29 |
Unfortunately version, vendor and renderer are the only information |
30 |
queryable just with OpenGL API. |
31 |
BUG: 270942 |
32 |
FIXED-IN: 4.7.0 |
33 |
|
34 |
diff --git a/kwin/opengltest/opengltest.cpp b/kwin/opengltest/opengltest.cpp |
35 |
index d2d8f70..eda7b51 100644 |
36 |
--- a/kwin/opengltest/opengltest.cpp |
37 |
+++ b/kwin/opengltest/opengltest.cpp |
38 |
@@ -81,16 +81,9 @@ int main(int argc, char *argv[]) |
39 |
if ((major == 1 && minor < 3) && !strstr(glxExtensions, "GLX_EXT_texture_from_pixmap")) |
40 |
return 1; |
41 |
|
42 |
- // Assume that direct rendering works with DRI2 drivers |
43 |
- const GLubyte *renderer = glGetString(GL_RENDERER); |
44 |
- if (strstr((const char *)renderer, "DRI2")) |
45 |
- return 0; |
46 |
- |
47 |
- // The Intel driver doesn't have DRI2 in the renderer string |
48 |
- if (strstr((const char *)renderer, "GEM")) |
49 |
- return 0; |
50 |
- |
51 |
- if (strstr((const char *)renderer, "Gallium")) |
52 |
+ // Assume that all Mesa drivers support direct rendering |
53 |
+ const GLubyte *version = glGetString(GL_VERSION); |
54 |
+ if (strstr((const char *)version, "Mesa")) |
55 |
return 0; |
56 |
|
57 |
// Direct contexts also work with the NVidia driver |