From cfb212e470f131630284543b51f14ee417036ac7 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 27 Jan 2021 19:29:00 +0200 Subject: [PATCH] Detect more Intel GPUs This allows detecting Intel GPUs up to Xe graphics. --- .../data/glplatform/intel-kabylake-gt2-4.6 | 19 ++++++ libkwineffects/kwinglplatform.cpp | 68 ++++++++++++++++++- libkwineffects/kwinglplatform.h | 13 ++++ 3 files changed, 97 insertions(+), 3 deletions(-) create mode 100644 autotests/libkwineffects/data/glplatform/intel-kabylake-gt2-4.6 diff --git a/autotests/libkwineffects/data/glplatform/intel-kabylake-gt2-4.6 b/autotests/libkwineffects/data/glplatform/intel-kabylake-gt2-4.6 new file mode 100644 index 0000000000..f7f8962658 --- /dev/null +++ b/autotests/libkwineffects/data/glplatform/intel-kabylake-gt2-4.6 @@ -0,0 +1,19 @@ +[Driver] +Vendor=Intel +Renderer=Mesa Intel(R) UHD Graphics 620 (KBL GT2) +Version=4.6 (Compatibility Profile) Mesa 20.3.2 +ShadingLanguageVersion=4.60 + +[Settings] +LooseBinding=true +GLSL=true +TextureNPOT=true +Mesa=true +Intel=true +GLVersion=4,6 +GLSLVersion=4,60 +MesaVersion=20,3,2 +DriverVersion=20,3,2 +Driver=7 +ChipClass=2012 +Compositor=9 diff --git a/libkwineffects/kwinglplatform.cpp b/libkwineffects/kwinglplatform.cpp index 85fd182eef..4c3a2a91a7 100644 --- a/libkwineffects/kwinglplatform.cpp +++ b/libkwineffects/kwinglplatform.cpp @@ -415,19 +415,55 @@ static ChipClass detectIntelClass(const QByteArray &chipset) return I965; // GL 3.1, CL 1.1, DX 10.1 - if (chipset.contains("Sandybridge")) { + if (chipset.contains("Sandybridge") || chipset.contains("SNB GT")) { return SandyBridge; } // GL4.0, CL1.1, DX11, SM 5.0 - if (chipset.contains("Ivybridge")) { + if (chipset.contains("Ivybridge") || chipset.contains("IVB GT")) { return IvyBridge; } // GL4.0, CL1.2, DX11.1, SM 5.0 - if (chipset.contains("Haswell")) { + if (chipset.contains("Haswell") || chipset.contains("HSW GT")) { return Haswell; } + if (chipset.contains("BYT")) { + return BayTrail; + } + if (chipset.contains("CHV") || chipset.contains("BSW")) { + return Cherryview; + } + if (chipset.contains("BDW GT")) { + return Broadwell; + } + if (chipset.contains("SKL GT")) { + return Skylake; + } + if (chipset.contains("APL")) { + return ApolloLake; + } + if (chipset.contains("KBL GT")) { + return KabyLake; + } + if (chipset.contains("WHL GT")) { + return WhiskeyLake; + } + if (chipset.contains("CML GT")) { + return CometLake; + } + if (chipset.contains("CNL GT")) { + return CannonLake; + } + if (chipset.contains("CFL GT")) { + return CoffeeLake; + } + if (chipset.contains("ICL GT")) { + return IceLake; + } + if (chipset.contains("TGL GT")) { + return TigerLake; + } return UnknownIntel; } @@ -592,6 +628,32 @@ QByteArray GLPlatform::chipClassToString8(ChipClass chipClass) return QByteArrayLiteral("IvyBridge"); case Haswell: return QByteArrayLiteral("Haswell"); + case BayTrail: + return QByteArrayLiteral("Bay Trail"); + case Cherryview: + return QByteArrayLiteral("Cherryview"); + case Broadwell: + return QByteArrayLiteral("Broadwell"); + case ApolloLake: + return QByteArrayLiteral("Apollo Lake"); + case Skylake: + return QByteArrayLiteral("Skylake"); + case GeminiLake: + return QByteArrayLiteral("Gemini Lake"); + case KabyLake: + return QByteArrayLiteral("Kaby Lake"); + case CoffeeLake: + return QByteArrayLiteral("Coffee Lake"); + case WhiskeyLake: + return QByteArrayLiteral("Whiskey Lake"); + case CometLake: + return QByteArrayLiteral("Comet Lake"); + case CannonLake: + return QByteArrayLiteral("Cannon Lake"); + case IceLake: + return QByteArrayLiteral("Ice Lake"); + case TigerLake: + return QByteArrayLiteral("Tiger Lake"); case Adreno1XX: return QByteArrayLiteral("Adreno 1xx series"); diff --git a/libkwineffects/kwinglplatform.h b/libkwineffects/kwinglplatform.h index 21dad1f945..2f8be8ee78 100644 --- a/libkwineffects/kwinglplatform.h +++ b/libkwineffects/kwinglplatform.h @@ -131,6 +131,19 @@ enum ChipClass { SandyBridge, // GL3.1 CL1.1 DX10.1 SM 4.0 2010 IvyBridge, // GL4.0 CL1.1 DX11 SM 5.0 2012 Haswell, // GL4.0 CL1.2 DX11.1 SM 5.0 2013 + BayTrail, // GL4.0 CL1.2 DX11.1 SM 5.0 2013 + Cherryview, // GL4.0 CL1.2 DX11.2 SM 5.0 2013 + Broadwell, // GL4.4 CL2.0 DX11.2 SM 5.0 2014 + ApolloLake, // GL4.6 CL3.0 DX12 SM 6.0 2016 + Skylake, // GL4.6 CL3.0 DX12 SM 6.0 2015 + GeminiLake, // GL4.6 CL3.0 DX12 SM 6.0 2017 + KabyLake, // GL4.6 CL3.0 DX12 SM 6.0 2017 + CoffeeLake, // GL4.6 CL3.0 DX12 SM 6.0 2018 + WhiskeyLake, // GL4.6 GL3.0 DX12 SM 6.0 2018 + CometLake, // GL4.6 GL3.0 DX12 SM 6.0 2019 + CannonLake, // GL4.6 GL3.0 DX12 SM 6.0 2018 + IceLake, // GL4.6 CL3.0 DX12.1 SM 6.0 2019 + TigerLake, // GL4.6 CL3.0 DX12.1 SM 6.0 2020 UnknownIntel = 2999, // Qualcomm Adreno