Commit ab9a9c84 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[libkwineffects] Detect AMD Navi GPUs

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27168
parent 56d5f3a4
[Driver]
Vendor=X.Org
Renderer=AMD NAVI10 (DRM 3.36.0, 5.5.1-arch1-1, LLVM 9.0.1)
Version=4.5 (Core Profile) Mesa 19.3.3
ShadingLanguageVersion=4.50
[Settings]
LooseBinding=true
GLSL=true
TextureNPOT=true
Mesa=true
Gallium=true
Radeon=true
GLVersion=4,5
GLSLVersion=4,50
MesaVersion=19,3,3
GalliumVersion=0,4
DriverVersion=19,3,3
Driver=16
ChipClass=14
Compositor=9
...@@ -225,6 +225,12 @@ static ChipClass detectRadeonClass(const QByteArray &chipset) ...@@ -225,6 +225,12 @@ static ChipClass detectRadeonClass(const QByteArray &chipset)
return Vega; return Vega;
} }
if (chipset.contains("NAVI10") ||
chipset.contains("NAVI12") ||
chipset.contains("NAVI14")) {
return Navi;
}
const QString chipset16 = QString::fromLatin1(chipset); const QString chipset16 = QString::fromLatin1(chipset);
QString name = extract(chipset16, QStringLiteral("HD [0-9]{4}")); // HD followed by a space and 4 digits QString name = extract(chipset16, QStringLiteral("HD [0-9]{4}")); // HD followed by a space and 4 digits
if (!name.isEmpty()) { if (!name.isEmpty()) {
...@@ -567,6 +573,8 @@ QByteArray GLPlatform::chipClassToString8(ChipClass chipClass) ...@@ -567,6 +573,8 @@ QByteArray GLPlatform::chipClassToString8(ChipClass chipClass)
return QByteArrayLiteral("Arctic Islands"); return QByteArrayLiteral("Arctic Islands");
case Vega: case Vega:
return QByteArrayLiteral("Vega"); return QByteArrayLiteral("Vega");
case Navi:
return QByteArrayLiteral("Navi");
case NV10: case NV10:
return QByteArrayLiteral("NV10"); return QByteArrayLiteral("NV10");
...@@ -876,7 +884,10 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface) ...@@ -876,7 +884,10 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface)
m_renderer.contains("VEGA10") || m_renderer.contains("VEGA10") ||
m_renderer.contains("VEGA12") || m_renderer.contains("VEGA12") ||
m_renderer.contains("VEGA20") || m_renderer.contains("VEGA20") ||
m_renderer.contains("RAVEN"))) { m_renderer.contains("RAVEN") ||
m_renderer.contains("NAVI10") ||
m_renderer.contains("NAVI12") ||
m_renderer.contains("NAVI14"))) {
m_chipClass = detectRadeonClass(m_renderer); m_chipClass = detectRadeonClass(m_renderer);
m_driver = Driver_RadeonSI; m_driver = Driver_RadeonSI;
} }
......
...@@ -123,6 +123,7 @@ enum ChipClass { ...@@ -123,6 +123,7 @@ enum ChipClass {
VolcanicIslands, // GL4.5 CL2.0 DX12 SM 6.0 2015 VolcanicIslands, // GL4.5 CL2.0 DX12 SM 6.0 2015
ArcticIslands, // GL4.5 CL2.0 DX12 SM 6.0 2016 ArcticIslands, // GL4.5 CL2.0 DX12 SM 6.0 2016
Vega, // GL4.6 CL2.0 DX12 SM 6.0 2017 Vega, // GL4.6 CL2.0 DX12 SM 6.0 2017
Navi, // GL4.6 CL2.0 DX12.1 SM 6.4 2019
UnknownRadeon = 999, UnknownRadeon = 999,
// NVIDIA // NVIDIA
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment