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.
This commit is contained in:
Martin Gräßlin 2011-02-05 12:06:32 +01:00 committed by Marco Martin
parent 0b6e47ea35
commit e2d4cba4c8

View file

@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef KWIN_HAVE_OPENGL #ifdef KWIN_HAVE_OPENGL
#include "kwinglobals.h" #include "kwinglobals.h"
#include "kwineffects.h" #include "kwineffects.h"
#include "kwinglplatform.h"
#include "kdebug.h" #include "kdebug.h"
#include <kstandarddirs.h> #include <kstandarddirs.h>
@ -1182,6 +1183,11 @@ GLShader *ShaderManager::loadShaderFromCode(const QByteArray &vertexSource, cons
void ShaderManager::initShaders() 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"); m_orthoShader = new GLShader(":/resources/scene-vertex.glsl", ":/resources/scene-fragment.glsl");
if (m_orthoShader->isValid()) { if (m_orthoShader->isValid()) {
pushShader(SimpleShader, true); pushShader(SimpleShader, true);