From 711b434970256ae2fd37667debd773e55c005565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 13 Oct 2012 08:35:30 +0200 Subject: [PATCH] Detect latest Intel hardware in GLPlatform Added support for IvyBridge and Haswell. REVIEW: 106819 --- libkwineffects/kwinglplatform.cpp | 15 +++++++++++++++ libkwineffects/kwinglplatform.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/libkwineffects/kwinglplatform.cpp b/libkwineffects/kwinglplatform.cpp index d5d498bf12..b936c79117 100644 --- a/libkwineffects/kwinglplatform.cpp +++ b/libkwineffects/kwinglplatform.cpp @@ -335,6 +335,7 @@ static ChipClass detectNVidiaClass(const QString &chipset) static ChipClass detectIntelClass(const QByteArray &chipset) { + // see mesa repository: src/mesa/drivers/dri/intel/intel_context.c // GL 1.3, DX8? SM ? if (chipset.contains("845G") || chipset.contains("830M") || @@ -374,6 +375,16 @@ static ChipClass detectIntelClass(const QByteArray &chipset) return SandyBridge; } + // GL4.0, CL1.1, DX11, SM 5.0 + if (chipset.contains("Ivybridge")) { + return IvyBridge; + } + + // GL4.0, CL1.2, DX11.1, SM 5.0 + if (chipset.contains("Haswell")) { + return Haswell; + } + return UnknownIntel; } @@ -468,6 +479,10 @@ QString GLPlatform::chipClassToString(ChipClass chipClass) return "i965"; case SandyBridge: return "SandyBridge"; + case IvyBridge: + return "IvyBridge"; + case Haswell: + return "Haswell"; default: return "Unknown"; diff --git a/libkwineffects/kwinglplatform.h b/libkwineffects/kwinglplatform.h index cda141d9f9..8940681ad3 100644 --- a/libkwineffects/kwinglplatform.h +++ b/libkwineffects/kwinglplatform.h @@ -126,6 +126,8 @@ enum ChipClass { I915, // GL1.4/1.5 DX9/DX9c SM 2.0 2004 I965, // GL2.0/2.1 DX9/DX10 SM 3.0/4.0 2006 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 UnknownIntel = 2999, UnknownChipClass = 99999