From 7d9155171d622012630a9e99457ce9bb0457feea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Fri, 4 Dec 2009 01:13:33 +0000 Subject: [PATCH] compositing detection for r300 I've had missing compositing since about a week on my ATI x1300. After a bit of debugging with the help of fredrikh and mgraesslin, the version string reported seems to be the culprit. I've special-cased the different version string for the R300 driver and it works again now. The strings my r300 reports are: DRI R300 Project Mesa DRI R300 (RV515 7149) 20090101 x86/MMX/SSE2 TCL 1.4 (1.5 Mesa 7.6) reviewed by fredrikh kwin people, please have another look, I don't want to break anybody else's setup... CCMAIL:kwin@kde.org svn path=/trunk/KDE/kdebase/workspace/; revision=1058156 --- compositingprefs.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compositingprefs.cpp b/compositingprefs.cpp index 7dcfa545e4..52eba5cbd4 100644 --- a/compositingprefs.cpp +++ b/compositingprefs.cpp @@ -270,6 +270,9 @@ void CompositingPrefs::detectDriverAndVersion() { mDriver = "radeon"; mVersion = Version( mGLRenderer.split(' ')[ 3 ] ); + // Check that the version string is changed, and try the fifth element if it does + if (!mVersion.startsWith("20")) + mVersion = Version( mGLRenderer.split(' ')[ 5 ] ); } else if( mGLRenderer == "Software Rasterizer" ) { @@ -330,6 +333,11 @@ void CompositingPrefs::applyDriverSpecificOptions() kDebug( 1212 ) << "radeon r200 >= 20060602, enabling compositing"; mEnableCompositing = true; } + if( mGLRenderer.startsWith( "Mesa DRI R300" ) && mVersion >= Version( "20090101" )) // krazy:exclude=strings + { + kDebug( 1212 ) << "radeon r300 >= 20090101, enabling compositing"; + mEnableCompositing = true; + } } else if( mDriver == "fglrx" ) { // radeon r200 only ?