[libkwineffects] Detect AMD Navi GPUs

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27168
This commit is contained in:
Vlad Zahorodnii 2020-02-05 14:45:07 +02:00
parent 56d5f3a4f6
commit ab9a9c8428
3 changed files with 34 additions and 1 deletions

View file

@ -0,0 +1,21 @@
[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

View file

@ -225,6 +225,12 @@ static ChipClass detectRadeonClass(const QByteArray &chipset)
return Vega;
}
if (chipset.contains("NAVI10") ||
chipset.contains("NAVI12") ||
chipset.contains("NAVI14")) {
return Navi;
}
const QString chipset16 = QString::fromLatin1(chipset);
QString name = extract(chipset16, QStringLiteral("HD [0-9]{4}")); // HD followed by a space and 4 digits
if (!name.isEmpty()) {
@ -567,6 +573,8 @@ QByteArray GLPlatform::chipClassToString8(ChipClass chipClass)
return QByteArrayLiteral("Arctic Islands");
case Vega:
return QByteArrayLiteral("Vega");
case Navi:
return QByteArrayLiteral("Navi");
case NV10:
return QByteArrayLiteral("NV10");
@ -876,7 +884,10 @@ void GLPlatform::detect(OpenGLPlatformInterface platformInterface)
m_renderer.contains("VEGA10") ||
m_renderer.contains("VEGA12") ||
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_driver = Driver_RadeonSI;
}

View file

@ -123,6 +123,7 @@ enum ChipClass {
VolcanicIslands, // GL4.5 CL2.0 DX12 SM 6.0 2015
ArcticIslands, // GL4.5 CL2.0 DX12 SM 6.0 2016
Vega, // GL4.6 CL2.0 DX12 SM 6.0 2017
Navi, // GL4.6 CL2.0 DX12.1 SM 6.4 2019
UnknownRadeon = 999,
// NVIDIA