Commit bdd68827 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[kwineffects] Drop KWIN_GL_DEBUG

Summary:
It has been broken for many years and no one has filed bug
reports about it (besides me).

BUG: 419285

Test Plan: Ran kwin with KWIN_GL_DEBUG and it still works.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28332
parent 2f6e9a63
......@@ -188,7 +188,7 @@ X-KDE-Library=kwin4_effect_cooleffect
#define KWIN_EFFECT_API_MAKE_VERSION( major, minor ) (( major ) << 8 | ( minor ))
#define KWIN_EFFECT_API_VERSION_MAJOR 0
#define KWIN_EFFECT_API_VERSION_MINOR 229
#define KWIN_EFFECT_API_VERSION_MINOR 230
#define KWIN_EFFECT_API_VERSION KWIN_EFFECT_API_MAKE_VERSION( \
KWIN_EFFECT_API_VERSION_MAJOR, KWIN_EFFECT_API_VERSION_MINOR )
......
......@@ -226,9 +226,6 @@ const QByteArray GLShader::prepareSource(GLenum shaderType, const QByteArray &so
if (GLPlatform::instance()->isGLES() && GLPlatform::instance()->glslVersion() < kVersionNumber(3, 0)) {
ba.append("precision highp float;\n");
}
if (ShaderManager::instance()->isShaderDebug()) {
ba.append("#define KWIN_SHADER_DEBUG 1\n");
}
ba.append(source);
if (GLPlatform::instance()->isGLES() && GLPlatform::instance()->glslVersion() >= kVersionNumber(3, 0)) {
ba.replace("#version 140", "#version 300 es\n\nprecision highp float;\n");
......@@ -557,8 +554,6 @@ void ShaderManager::cleanup()
ShaderManager::ShaderManager()
{
m_debug = qstrcmp(qgetenv("KWIN_GL_DEBUG"), "1") == 0;
const qint64 coreVersionNumber = GLPlatform::instance()->isGLES() ? kVersionNumber(3, 0) : kVersionNumber(1, 40);
if (GLPlatform::instance()->glslVersion() >= coreVersionNumber) {
m_resourcePath = QStringLiteral(":/effect-shaders-1.40/");
......@@ -995,11 +990,6 @@ bool ShaderManager::isShaderBound() const
return !m_boundShaders.isEmpty();
}
bool ShaderManager::isShaderDebug() const
{
return m_debug;
}
GLShader *ShaderManager::pushShader(ShaderTraits traits)
{
GLShader *shader = this->shader(traits);
......
......@@ -221,13 +221,6 @@ public:
* @return @c true if a shader is bound, @c false otherwise
*/
bool isShaderBound() const;
/**
* Is @c true if the environment variable KWIN_GL_DEBUG is set to 1.
* In that case shaders are compiled with KWIN_SHADER_DEBUG defined.
* @returns @c true if shaders are compiled with debug information
* @since 4.8
*/
bool isShaderDebug() const;
/**
* Pushes the current shader onto the stack and binds a shader
......@@ -332,7 +325,6 @@ private:
QStack<GLShader*> m_boundShaders;
QHash<ShaderTraits, GLShader *> m_shaderHash;
bool m_debug;
QString m_resourcePath;
static ShaderManager *s_shaderManager;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment