[qpa] Don't specify EGL_SURFACE_TYPE when choosing EGLConfig

Summary:
Since QPA only performs off-screen rendering, it does not require an EGLConfig
that supports any particular surface type.  Currently it requests a config
supporting window surfaces, however the EGLDeviceEXT platform, which is the
basis of the EGLStream back-end used with the proprietary NVIDIA driver, does
not support such surfaces resulting in eglChooseConfig not returning any valid
configs when that back-end is in use. Since QPA doesn't actually create any
window surfaces, it should be fine to remove this restriction to allow it to
initialize properly with the EGLStream back-end.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin, davidedmundson

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20455
This commit is contained in:
Erik Kurzinger 2019-04-11 07:39:55 -07:00
parent dd8a0407ca
commit a1e8541b49

View file

@ -43,7 +43,7 @@ static EGLConfig configFromGLFormat(EGLDisplay dpy, const QSurfaceFormat &format
#define SIZE( __buffer__ ) format.__buffer__##BufferSize() > 0 ? format.__buffer__##BufferSize() : 0
// not setting samples as QtQuick doesn't need it
const EGLint config_attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_SURFACE_TYPE, 0,
EGL_RED_SIZE, SIZE(red),
EGL_GREEN_SIZE, SIZE(green),
EGL_BLUE_SIZE, SIZE(blue),