skip SWAP_BEHAVIOR_PRESERVED for supportsBufferAge
pointless and unsupported on latter MESA/DRI3 http://lists.freedesktop.org/archives/mesa-dev/2015-November/100869.html Thanks to Uriy Zhuravlev for reporting and investigation BUG: 356992 CCBUG: 356882 FIXED-IN: 5.5.4 REVIEW: 126783
This commit is contained in:
parent
e65f7a349f
commit
c7aefc6b6b
2 changed files with 5 additions and 1 deletions
|
@ -89,6 +89,8 @@ EglOnXBackend::~EglOnXBackend()
|
|||
|
||||
void EglOnXBackend::init()
|
||||
{
|
||||
initEGL(); // required to toggle
|
||||
initBufferAge(); // EGL_SWAP_BEHAVIOR_PRESERVED_BIT
|
||||
if (!initRenderingContext()) {
|
||||
setFailed(QStringLiteral("Could not initialize rendering context"));
|
||||
return;
|
||||
|
@ -267,7 +269,7 @@ EGLSurface EglOnXBackend::createSurface(xcb_window_t window)
|
|||
bool EglOnXBackend::initBufferConfigs()
|
||||
{
|
||||
const EGLint config_attribs[] = {
|
||||
EGL_SURFACE_TYPE, EGL_WINDOW_BIT|EGL_SWAP_BEHAVIOR_PRESERVED_BIT,
|
||||
EGL_SURFACE_TYPE, EGL_WINDOW_BIT | (supportsBufferAge() ? 0 : EGL_SWAP_BEHAVIOR_PRESERVED_BIT),
|
||||
EGL_RED_SIZE, 1,
|
||||
EGL_GREEN_SIZE, 1,
|
||||
EGL_BLUE_SIZE, 1,
|
||||
|
|
|
@ -96,6 +96,8 @@ void initGLX()
|
|||
void initEGL()
|
||||
{
|
||||
EGLDisplay dpy = eglGetCurrentDisplay();
|
||||
if (dpy == EGL_NO_DISPLAY)
|
||||
dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
int major, minor;
|
||||
eglInitialize(dpy, &major, &minor);
|
||||
eglVersion = MAKE_GL_VERSION(major, minor, 0);
|
||||
|
|
Loading…
Reference in a new issue