diff options
authorMartin Gräßlin <mgraesslin@kde.org>2011-10-15 07:47:56 (GMT)
committerMartin Gräßlin <mgraesslin@kde.org>2011-10-15 07:47:56 (GMT)
commitcab2fee5c934ade31d457d470b042b578f74b9d8 (patch)
parentd4b83c3b37d3671ce0707adce26a4c1483a5b406 (diff)
Ensure that always one shader is on the ShaderStack with GL2
This brings some consistency with GLES2 where also one shader is always on the stack and allows to use the test whether a shader is bound to see if the GL2 code path is used. This fixes an issue with cover/flip switch which tested for a bound shader before the shader was pushed in multi screen setups. As well it should bring some improvements as the simple screen shader is not unbound and rebound in each rendered frame. BUG: 283609 FIXED-IN: 4.7.3
1 files changed, 4 insertions, 0 deletions
diff --git a/kwin/scene_opengl_glx.cpp b/kwin/scene_opengl_glx.cpp
index 8eb3282..ea66cff 100644
--- a/kwin/scene_opengl_glx.cpp
+++ b/kwin/scene_opengl_glx.cpp
@@ -95,6 +95,10 @@ SceneOpenGL::SceneOpenGL(Workspace* ws)
if (GLPlatform::instance()->supports(GLSL)) {
if (!ShaderManager::instance()->isValid()) {
kDebug(1212) << "No Scene Shaders available";
+ } else {
+ // push one shader on the stack so that one is always bound
+ // consistency with GLES
+ ShaderManager::instance()->pushShader(ShaderManager::SimpleShader);