From e401f3ff118fcf32b93cfe4e89852960d5bf8ff9 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Thu, 7 Sep 2023 15:43:02 +0200 Subject: [PATCH] libkwineffects: drop gallium detection It's not used anywhere --- autotests/libkwineffects/kwinglplatformtest.cpp | 4 ---- src/libkwineffects/glplatform.cpp | 13 ------------- src/libkwineffects/glplatform.h | 11 ----------- 3 files changed, 28 deletions(-) diff --git a/autotests/libkwineffects/kwinglplatformtest.cpp b/autotests/libkwineffects/kwinglplatformtest.cpp index 79b31705e9..25e9f7b0b5 100644 --- a/autotests/libkwineffects/kwinglplatformtest.cpp +++ b/autotests/libkwineffects/kwinglplatformtest.cpp @@ -151,14 +151,12 @@ void GLPlatformTest::testPriorDetect() QCOMPARE(gl->glVersion(), Version()); QCOMPARE(gl->glslVersion(), Version()); QCOMPARE(gl->mesaVersion(), Version()); - QCOMPARE(gl->galliumVersion(), Version()); QCOMPARE(gl->driverVersion(), Version()); QCOMPARE(gl->driver(), Driver_Unknown); QCOMPARE(gl->chipClass(), UnknownChipClass); QCOMPARE(gl->isMesaDriver(), false); - QCOMPARE(gl->isGalliumDriver(), false); QCOMPARE(gl->isRadeon(), false); QCOMPARE(gl->isNvidia(), false); QCOMPARE(gl->isIntel(), false); @@ -247,7 +245,6 @@ void GLPlatformTest::testDetect() QCOMPARE(gl->glVersion(), readVersion(settingsGroup, "GLVersion")); QCOMPARE(gl->glslVersion(), readVersion(settingsGroup, "GLSLVersion")); QCOMPARE(gl->mesaVersion(), readVersion(settingsGroup, "MesaVersion")); - QCOMPARE(gl->galliumVersion(), readVersion(settingsGroup, "GalliumVersion")); QEXPECT_FAIL("amd-catalyst-radeonhd-7700M-3.1.13399", "Detects GL version instead of driver version", Continue); QCOMPARE(gl->driverVersion(), readVersion(settingsGroup, "DriverVersion")); @@ -255,7 +252,6 @@ void GLPlatformTest::testDetect() QCOMPARE(gl->chipClass(), ChipClass(settingsGroup.readEntry("ChipClass", int(UnknownChipClass)))); QCOMPARE(gl->isMesaDriver(), settingsGroup.readEntry("Mesa", false)); - QCOMPARE(gl->isGalliumDriver(), settingsGroup.readEntry("Gallium", false)); QCOMPARE(gl->isRadeon(), settingsGroup.readEntry("Radeon", false)); QCOMPARE(gl->isNvidia(), settingsGroup.readEntry("Nvidia", false)); QCOMPARE(gl->isIntel(), settingsGroup.readEntry("Intel", false)); diff --git a/src/libkwineffects/glplatform.cpp b/src/libkwineffects/glplatform.cpp index 0bd66b507f..279ee5411f 100644 --- a/src/libkwineffects/glplatform.cpp +++ b/src/libkwineffects/glplatform.cpp @@ -879,13 +879,10 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface) const QList tokens = m_context->renderer().toByteArray().split(' '); if (m_context->renderer().contains("Gallium")) { // Sample renderer string: Gallium 0.4 on AMD RV740 - m_galliumVersion = Version::parseString(tokens.at(1)); m_chipset = (tokens.at(3) == "AMD" || tokens.at(3) == "ATI") ? tokens.at(4) : tokens.at(3); } else { // The renderer string does not contain "Gallium" anymore. m_chipset = tokens.at(0); - // We don't know the actual version anymore, but it's at least 0.4. - m_galliumVersion = Version(0, 4, 0); } // R300G @@ -1094,11 +1091,6 @@ Version GLPlatform::mesaVersion() const return m_mesaVersion; } -Version GLPlatform::galliumVersion() const -{ - return m_galliumVersion; -} - Version GLPlatform::driverVersion() const { if (isMesaDriver()) { @@ -1123,11 +1115,6 @@ bool GLPlatform::isMesaDriver() const return mesaVersion().isValid(); } -bool GLPlatform::isGalliumDriver() const -{ - return galliumVersion().isValid(); -} - bool GLPlatform::isRadeon() const { return m_chipClass >= R100 && m_chipClass <= UnknownRadeon; diff --git a/src/libkwineffects/glplatform.h b/src/libkwineffects/glplatform.h index f07528a081..0cd82c38ad 100644 --- a/src/libkwineffects/glplatform.h +++ b/src/libkwineffects/glplatform.h @@ -195,11 +195,6 @@ public: */ Version mesaVersion() const; - /** - * Returns the Gallium version if the driver is a Gallium driver, and 0 otherwise. - */ - Version galliumVersion() const; - /** * Returns the driver version. * @@ -222,11 +217,6 @@ 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. */ @@ -393,7 +383,6 @@ private: Version m_glslVersion; Version m_mesaVersion; Version m_driverVersion; - Version m_galliumVersion; bool m_looseBinding : 1; bool m_packInvert : 1; bool m_supportsTimerQuery : 1;