From 3ada211c30cb21d74dfbf4164f6e685efc39bf76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Tue, 11 Jan 2011 22:32:51 +0000 Subject: [PATCH] Don't enable loose binding with Gallium drivers in Mesa 7.10. It's currently broken because of a regression in the mesa state tracker. FIXED-IN: 4.6.0 BUG: 259872 svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1213870 --- lib/kwinglplatform.cpp | 9 +++++++++ lib/kwinglplatform.h | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/lib/kwinglplatform.cpp b/lib/kwinglplatform.cpp index 04ad9241ca..b4b0128d51 100644 --- a/lib/kwinglplatform.cpp +++ b/lib/kwinglplatform.cpp @@ -716,6 +716,10 @@ void GLPlatform::detect() m_limitedGLSL = m_supportsGLSL && m_chipClass < I965; } + + // Loose binding is broken with Gallium drivers in Mesa 7.10 + if (isGalliumDriver() && mesaVersion() >= kVersionNumber(7, 10)) + m_looseBinding = false; } static void print(const QString &label, const QString &setting) @@ -835,6 +839,11 @@ bool GLPlatform::isMesaDriver() const return mesaVersion() > 0; } +bool GLPlatform::isGalliumDriver() const +{ + return galliumVersion() > 0; +} + bool GLPlatform::isRadeon() const { return m_chipClass >= R100 && m_chipClass <= UnknownRadeon; diff --git a/lib/kwinglplatform.h b/lib/kwinglplatform.h index 0769912065..0228d6522d 100644 --- a/lib/kwinglplatform.h +++ b/lib/kwinglplatform.h @@ -218,6 +218,11 @@ public: */ bool isMesaDriver() const; + /** + * Returns true if the driver is a Gallium driver, and false otherwise. + */ + bool isGalliumDriver() const; + /** * Returns true if the GPU is a Radeon GPU, and false otherwise. */