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:
parent
2f5ceb15e4
commit
ac32664dc1
3 changed files with 7 additions and 1 deletions
|
@ -74,6 +74,9 @@ void EglOnXBackend::init()
|
||||||
glPlatform->detect(EglPlatformInterface);
|
glPlatform->detect(EglPlatformInterface);
|
||||||
if (GLPlatform::instance()->driver() == Driver_Intel)
|
if (GLPlatform::instance()->driver() == Driver_Intel)
|
||||||
options->setUnredirectFullscreen(false); // bug #252817
|
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();
|
glPlatform->printResults();
|
||||||
initGL(EglPlatformInterface);
|
initGL(EglPlatformInterface);
|
||||||
if (!hasGLExtension("GL_OES_EGL_image")) {
|
if (!hasGLExtension("GL_OES_EGL_image")) {
|
||||||
|
|
|
@ -97,6 +97,9 @@ void GlxBackend::init()
|
||||||
glPlatform->detect(GlxPlatformInterface);
|
glPlatform->detect(GlxPlatformInterface);
|
||||||
if (GLPlatform::instance()->driver() == Driver_Intel)
|
if (GLPlatform::instance()->driver() == Driver_Intel)
|
||||||
options->setUnredirectFullscreen(false); // bug #252817
|
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();
|
glPlatform->printResults();
|
||||||
initGL(GlxPlatformInterface);
|
initGL(GlxPlatformInterface);
|
||||||
// Check whether certain features are supported
|
// Check whether certain features are supported
|
||||||
|
|
|
@ -767,7 +767,7 @@ void Options::setGlPreferBufferSwap(char glPreferBufferSwap)
|
||||||
// see http://www.x.org/releases/X11R7.7/doc/dri2proto/dri2proto.txt, item 2.5
|
// see http://www.x.org/releases/X11R7.7/doc/dri2proto/dri2proto.txt, item 2.5
|
||||||
if (GLPlatform::instance()->driver() == Driver_NVidia)
|
if (GLPlatform::instance()->driver() == Driver_NVidia)
|
||||||
glPreferBufferSwap = CopyFrontBuffer;
|
glPreferBufferSwap = CopyFrontBuffer;
|
||||||
else
|
else if (GLPlatform::instance()->driver() != Driver_Unknown) // undetected, finally resolved when context is initialized
|
||||||
glPreferBufferSwap = ExtendDamage;
|
glPreferBufferSwap = ExtendDamage;
|
||||||
}
|
}
|
||||||
if (m_glPreferBufferSwap == (GlSwapStrategy)glPreferBufferSwap) {
|
if (m_glPreferBufferSwap == (GlSwapStrategy)glPreferBufferSwap) {
|
||||||
|
|
Loading…
Reference in a new issue