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:
Martin Gräßlin 2011-07-20 22:41:58 +02:00
parent 2566d184c4
commit 9c9ed80a2b

View file

@ -61,15 +61,19 @@ void LanczosFilter::init()
return;
m_inited = true;
#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");
if (config->group("Compositing").readEntry("GLTextureFilter", 2) != 2)
if (!force && config->group("Compositing").readEntry("GLTextureFilter", 2) != 2)
return; // disabled by config
// The lanczos filter is reported to be broken with the Intel driver and Mesa 7.10
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;
m_shader = new LanczosShader(this);