Add environment variable to enforce Lanczos Filter
By setting KWIN_FORCE_LANCZOS=1 the settings and driver check are overwritten. This should help to test mesa bug 33275 (https://bugs.freedesktop.org/show_bug.cgi?id=33275)
This commit is contained in:
parent
2566d184c4
commit
9c9ed80a2b
1 changed files with 6 additions and 2 deletions
|
@ -61,15 +61,19 @@ void LanczosFilter::init()
|
||||||
return;
|
return;
|
||||||
m_inited = true;
|
m_inited = true;
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||||
|
const bool force = (qstrcmp(qgetenv("KWIN_FORCE_LANCZOS"), "1") == 0);
|
||||||
|
if (force) {
|
||||||
|
kWarning(1212) << "Lanczos Filter forced on by environment variable";
|
||||||
|
}
|
||||||
|
|
||||||
KSharedConfigPtr config = KSharedConfig::openConfig("kwinrc");
|
KSharedConfigPtr config = KSharedConfig::openConfig("kwinrc");
|
||||||
|
|
||||||
if (config->group("Compositing").readEntry("GLTextureFilter", 2) != 2)
|
if (!force && config->group("Compositing").readEntry("GLTextureFilter", 2) != 2)
|
||||||
return; // disabled by config
|
return; // disabled by config
|
||||||
|
|
||||||
// The lanczos filter is reported to be broken with the Intel driver and Mesa 7.10
|
// The lanczos filter is reported to be broken with the Intel driver and Mesa 7.10
|
||||||
GLPlatform *gl = GLPlatform::instance();
|
GLPlatform *gl = GLPlatform::instance();
|
||||||
if (gl->driver() == Driver_Intel && gl->mesaVersion() >= kVersionNumber(7, 10))
|
if (!force && gl->driver() == Driver_Intel && gl->mesaVersion() >= kVersionNumber(7, 10))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_shader = new LanczosShader(this);
|
m_shader = new LanczosShader(this);
|
||||||
|
|
Loading…
Reference in a new issue