diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-02-01 16:51:22 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-02-01 16:51:22 -0600 |
commit | d09f7ffc44977b8f68b0c0b530ea12c8b545abc9 (patch) | |
tree | cd30ac57f8aacacd8574fc853b3f2719b2bf03ad /user/kwin | |
parent | f6522a6562cfb5ab0e2ffc18d2a0dc2ada80ac88 (diff) | |
download | packages-d09f7ffc44977b8f68b0c0b530ea12c8b545abc9.tar.gz packages-d09f7ffc44977b8f68b0c0b530ea12c8b545abc9.tar.bz2 packages-d09f7ffc44977b8f68b0c0b530ea12c8b545abc9.tar.xz packages-d09f7ffc44977b8f68b0c0b530ea12c8b545abc9.zip |
user/kwin: Backport Gallium fix from 5.11.x
Diffstat (limited to 'user/kwin')
-rw-r--r-- | user/kwin/APKBUILD | 8 | ||||
-rw-r--r-- | user/kwin/kwin-backport-gallium-version-detection.patch | 191 |
2 files changed, 196 insertions, 3 deletions
diff --git a/user/kwin/APKBUILD b/user/kwin/APKBUILD index d684e442f..cc9a1cf80 100644 --- a/user/kwin/APKBUILD +++ b/user/kwin/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=kwin pkgver=5.8.7 -pkgrel=0 +pkgrel=1 pkgdesc="Modern, stylish window manager (requires OpenGL)" url="https://www.kde.org/" arch="all" @@ -24,7 +24,8 @@ install="" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" source="http://download.kde.org/stable/plasma/$pkgver/kwin-$pkgver.tar.xz kwin-5.8-stop-depending-on-qt5-internals.patch - kwin-5.8-respect-uint.patch" + kwin-5.8-respect-uint.patch + kwin-backport-gallium-version-detection.patch" builddir="$srcdir/kwin-$pkgver" build() { @@ -55,4 +56,5 @@ package() { sha512sums="f1f3b01f85378e663385887add8dd5b2f40076cfc57f7cf638e83e2424fedb576b4b431b14151422ea43c535677131e61b8d9e7fe60e5a5f4ea06520c895bd1e kwin-5.8.7.tar.xz 7186dd317204612ba26f11315238f527949424d08f32dc0dab8c1391d642529433cfd7091dc2a057fe849976dee70eed7aab3c8be55b20b8c0655da57976b48e kwin-5.8-stop-depending-on-qt5-internals.patch -aaefa9951ec1475adf00784b202d0ca9f92a60634a869387432411e8b7928d9f10b46968998a4ada47228834e8c7f6c9bf1c8dd988673b22619e8e1295e086c7 kwin-5.8-respect-uint.patch" +aaefa9951ec1475adf00784b202d0ca9f92a60634a869387432411e8b7928d9f10b46968998a4ada47228834e8c7f6c9bf1c8dd988673b22619e8e1295e086c7 kwin-5.8-respect-uint.patch +9c8cdb884defc3e16444b41de0c53e10774cef6d8d0a461376ba64cc3457dfe19579e13ce45df721e32643dddf518df7d787ee36bcba840ef1bf2b7009d9b1ab kwin-backport-gallium-version-detection.patch" diff --git a/user/kwin/kwin-backport-gallium-version-detection.patch b/user/kwin/kwin-backport-gallium-version-detection.patch new file mode 100644 index 000000000..8c021c4e6 --- /dev/null +++ b/user/kwin/kwin-backport-gallium-version-detection.patch @@ -0,0 +1,191 @@ +From e302f87598de6853147c872b631e9a1fe4864f42 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt <fabian@ritter-vogt.de> +Date: Sat, 23 Dec 2017 23:30:07 +0100 +Subject: Properly detect Gallium drivers with newer Mesa + +Summary: +The renderer string does not contain "Gallium 0.4 on" anymore, +instead it directly contains the gallium driver's name. +So assume that every unknown renderer is a gallium driver. + +Test Plan: Added a testcase, it succeeds only with this patch. + +Reviewers: #plasma, graesslin + +Subscribers: kwin, plasma-devel, #kwin + +Tags: #kwin + +Differential Revision: https://phabricator.kde.org/D9495 +--- + .../libkwineffects/data/glplatform/llvmpipe-5.0 | 22 ++++ + libkwineffects/kwinglplatform.cpp | 114 +++++++++++---------- + 2 files changed, 82 insertions(+), 54 deletions(-) + create mode 100644 autotests/libkwineffects/data/glplatform/llvmpipe-5.0 + +diff --git a/autotests/libkwineffects/data/glplatform/llvmpipe-5.0 b/autotests/libkwineffects/data/glplatform/llvmpipe-5.0 +new file mode 100644 +index 0000000..56aa352 +--- /dev/null ++++ b/autotests/libkwineffects/data/glplatform/llvmpipe-5.0 +@@ -0,0 +1,22 @@ ++[Driver] ++Vendor=VMware, Inc. ++Renderer=llvmpipe (LLVM 5.0, 256 bits) ++Version=3.0 Mesa 17.2.6 ++ShadingLanguageVersion=1.30 ++ ++[Settings] ++LooseBinding=true ++GLSL=true ++TextureNPOT=true ++Mesa=true ++Gallium=true ++SoftwareEmulation=true ++GLVersion=3,0 ++GLSLVersion=1,30 ++MesaVersion=17,2,6 ++GalliumVersion=0,4 ++DriverVersion=17,2,6 ++Driver=12 ++ChipClass=99999 ++Compositor=9 ++ +diff --git a/libkwineffects/kwinglplatform.cpp b/libkwineffects/kwinglplatform.cpp +index 2b7b9a4..f5febc0 100644 +--- a/libkwineffects/kwinglplatform.cpp ++++ b/libkwineffects/kwinglplatform.cpp +@@ -702,14 +702,69 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface) + m_chipClass = detectIntelClass(chipset); + } + ++ // Properietary drivers ++ // ==================================================== ++ else if (m_vendor == "ATI Technologies Inc.") { ++ m_chipClass = detectRadeonClass(m_renderer); ++ m_driver = Driver_Catalyst; ++ ++ if (versionTokens.count() > 1 && versionTokens.at(2)[0] == '(') ++ m_driverVersion = parseVersionString(versionTokens.at(1)); ++ else if (versionTokens.count() > 0) ++ m_driverVersion = parseVersionString(versionTokens.at(0)); ++ else ++ m_driverVersion = 0; ++ } ++ ++ else if (m_vendor == "NVIDIA Corporation") { ++ m_chipClass = detectNVidiaClass(m_renderer); ++ m_driver = Driver_NVidia; ++ ++ int index = versionTokens.indexOf("NVIDIA"); ++ if (versionTokens.count() > index) ++ m_driverVersion = parseVersionString(versionTokens.at(index + 1)); ++ else ++ m_driverVersion = 0; ++ } ++ ++ else if (m_vendor == "Qualcomm") { ++ m_driver = Driver_Qualcomm; ++ m_chipClass = detectQualcommClass(m_renderer); ++ } ++ ++ else if (m_renderer == "Software Rasterizer") { ++ m_driver = Driver_Swrast; ++ } ++ ++ // Virtual Hardware ++ // ==================================================== ++ else if (m_vendor == "Humper" && m_renderer == "Chromium") { ++ // Virtual Box ++ m_driver = Driver_VirtualBox; ++ ++ const int index = versionTokens.indexOf("Chromium"); ++ if (versionTokens.count() > index) ++ m_driverVersion = parseVersionString(versionTokens.at(index + 1)); ++ else ++ m_driverVersion = 0; ++ } ++ + // Gallium drivers + // ==================================================== +- else if (m_renderer.contains("Gallium")) { +- // Sample renderer string: Gallium 0.4 on AMD RV740 ++ else { + const QList<QByteArray> tokens = m_renderer.split(' '); +- m_galliumVersion = parseVersionString(tokens.at(1)); +- m_chipset = (tokens.at(3) == "AMD" || tokens.at(3) == "ATI") ? +- tokens.at(4) : tokens.at(3); ++ if (m_renderer.contains("Gallium")) { ++ // Sample renderer string: Gallium 0.4 on AMD RV740 ++ m_galliumVersion = parseVersionString(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 = kVersionNumber(0, 4, 0); ++ } + + // R300G + if (m_vendor == QByteArrayLiteral("X.Org R300 Project")) { +@@ -764,55 +819,6 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface) + } + } + +- +- // Properietary drivers +- // ==================================================== +- else if (m_vendor == "ATI Technologies Inc.") { +- m_chipClass = detectRadeonClass(m_renderer); +- m_driver = Driver_Catalyst; +- +- if (versionTokens.count() > 1 && versionTokens.at(2)[0] == '(') +- m_driverVersion = parseVersionString(versionTokens.at(1)); +- else if (versionTokens.count() > 0) +- m_driverVersion = parseVersionString(versionTokens.at(0)); +- else +- m_driverVersion = 0; +- } +- +- else if (m_vendor == "NVIDIA Corporation") { +- m_chipClass = detectNVidiaClass(m_renderer); +- m_driver = Driver_NVidia; +- +- int index = versionTokens.indexOf("NVIDIA"); +- if (versionTokens.count() > index) +- m_driverVersion = parseVersionString(versionTokens.at(index + 1)); +- else +- m_driverVersion = 0; +- } +- +- else if (m_vendor == "Qualcomm") { +- m_driver = Driver_Qualcomm; +- m_chipClass = detectQualcommClass(m_renderer); +- } +- +- else if (m_renderer == "Software Rasterizer") { +- m_driver = Driver_Swrast; +- } +- +- // Virtual Hardware +- // ==================================================== +- else if (m_vendor == "Humper" && m_renderer == "Chromium") { +- // Virtual Box +- m_driver = Driver_VirtualBox; +- +- const int index = versionTokens.indexOf("Chromium"); +- if (versionTokens.count() > index) +- m_driverVersion = parseVersionString(versionTokens.at(index + 1)); +- else +- m_driverVersion = 0; +- } +- +- + // Driver/GPU specific features + // ==================================================== + if (isRadeon()) { +-- +cgit v0.11.2 + |