[platforms/virtual] Add support for EGL_MESA_platform_surfaceless
Summary: Thus we don't require vgem any more which fails with latest mesa. Kepping the vgem variant as fallback for older systems. See T10245 Test Plan: SceneOpenGL Test passes without init vgem, not tested with latest mesa Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D17980
This commit is contained in:
parent
a3bebb2fb8
commit
bedd85821f
2 changed files with 9 additions and 1 deletions
|
@ -11,7 +11,8 @@ The following additional software needs to be installed for running the test sui
|
|||
* breeze window decoration
|
||||
|
||||
# Preparing a run of the test suite
|
||||
Please load the kernel module "vgem". This is required to provide a virtual OpenGL device.
|
||||
In case your system does not support the EGL extension EGL_MESA_platform_surfaceless,
|
||||
please load the kernel module "vgem". This is required to provide a virtual OpenGL device.
|
||||
|
||||
sudo modprobe vgem
|
||||
|
||||
|
|
|
@ -99,6 +99,13 @@ bool EglGbmBackend::initializeEgl()
|
|||
// Use eglGetPlatformDisplayEXT() to get the display pointer
|
||||
// if the implementation supports it.
|
||||
if (display == EGL_NO_DISPLAY) {
|
||||
// first try surfaceless
|
||||
if (hasClientExtension(QByteArrayLiteral("EGL_MESA_platform_surfaceless"))) {
|
||||
display = eglGetPlatformDisplayEXT(EGL_PLATFORM_SURFACELESS_MESA, EGL_DEFAULT_DISPLAY, nullptr);
|
||||
}
|
||||
}
|
||||
if (display == EGL_NO_DISPLAY) {
|
||||
qCDebug(KWIN_VIRTUAL) << "Failed to create surfaceless platform, trying with vgem device";
|
||||
const bool hasMesaGBM = hasClientExtension(QByteArrayLiteral("EGL_MESA_platform_gbm"));
|
||||
const bool hasKHRGBM = hasClientExtension(QByteArrayLiteral("EGL_KHR_platform_gbm"));
|
||||
const GLenum platform = hasMesaGBM ? EGL_PLATFORM_GBM_MESA : EGL_PLATFORM_GBM_KHR;
|
||||
|
|
Loading…
Reference in a new issue