Commit bedd8582 authored by Martin Flöser's avatar Martin Flöser

[platforms/virtual] Add support for EGL_MESA_platform_surfaceless

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:
parent a3bebb2f
......@@ -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"))) {
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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment