From e2d4cba4c8d3f66094b14916912c723d310547cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 5 Feb 2011 12:06:32 +0100 Subject: [PATCH] Temporarily workaround regression with NVIDIA. KWin's new shaders fail with NVIDIA and present just a black screen for the ortho shader (generic shader seems to work). Temporarily disabling the shaders to force a fallback to old rendering code. Of course the bug in the shader needs to be fixed. --- lib/kwinglutils.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/kwinglutils.cpp b/lib/kwinglutils.cpp index ff75932a39..49b94167a6 100644 --- a/lib/kwinglutils.cpp +++ b/lib/kwinglutils.cpp @@ -23,6 +23,7 @@ along with this program. If not, see . #ifdef KWIN_HAVE_OPENGL #include "kwinglobals.h" #include "kwineffects.h" +#include "kwinglplatform.h" #include "kdebug.h" #include @@ -1182,6 +1183,11 @@ GLShader *ShaderManager::loadShaderFromCode(const QByteArray &vertexSource, cons void ShaderManager::initShaders() { + // HACK: the generic shaders fail with NVIDIA's blob + // temporarily disable them to force kwin on GL 1.x profile + if (GLPlatform::instance()->driver() == Driver_NVidia) { + return; + } m_orthoShader = new GLShader(":/resources/scene-vertex.glsl", ":/resources/scene-fragment.glsl"); if (m_orthoShader->isValid()) { pushShader(SimpleShader, true);