keep buffer swap pref automatic until GPU detected

enforce to "e" (cheap) when driver is still unknown after
detection must be assumed to have run, so a sane value is available
when the context is up

BUG: 322355
FIXED-IN: 4.11
REVIEW: 111548
This commit is contained in:
Thomas Lübking 2013-07-17 15:44:42 +02:00
parent 2f5ceb15e4
commit ac32664dc1
3 changed files with 7 additions and 1 deletions

View file

@ -74,6 +74,9 @@ void EglOnXBackend::init()
glPlatform->detect(EglPlatformInterface);
if (GLPlatform::instance()->driver() == Driver_Intel)
options->setUnredirectFullscreen(false); // bug #252817
options->setGlPreferBufferSwap(options->glPreferBufferSwap()); // resolve autosetting
if (options->glPreferBufferSwap() == Options::AutoSwapStrategy)
options->setGlPreferBufferSwap('e'); // for unknown drivers - should not happen
glPlatform->printResults();
initGL(EglPlatformInterface);
if (!hasGLExtension("GL_OES_EGL_image")) {

View file

@ -97,6 +97,9 @@ void GlxBackend::init()
glPlatform->detect(GlxPlatformInterface);
if (GLPlatform::instance()->driver() == Driver_Intel)
options->setUnredirectFullscreen(false); // bug #252817
options->setGlPreferBufferSwap(options->glPreferBufferSwap()); // resolve autosetting
if (options->glPreferBufferSwap() == Options::AutoSwapStrategy)
options->setGlPreferBufferSwap('e'); // for unknown drivers - should not happen
glPlatform->printResults();
initGL(GlxPlatformInterface);
// Check whether certain features are supported

View file

@ -767,7 +767,7 @@ void Options::setGlPreferBufferSwap(char glPreferBufferSwap)
// see http://www.x.org/releases/X11R7.7/doc/dri2proto/dri2proto.txt, item 2.5
if (GLPlatform::instance()->driver() == Driver_NVidia)
glPreferBufferSwap = CopyFrontBuffer;
else
else if (GLPlatform::instance()->driver() != Driver_Unknown) // undetected, finally resolved when context is initialized
glPreferBufferSwap = ExtendDamage;
}
if (m_glPreferBufferSwap == (GlSwapStrategy)glPreferBufferSwap) {