From 1626d7a51a0170fac3a54bca2f736eb50147fb77 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Wed, 27 Oct 2021 11:45:06 +0200 Subject: [PATCH] platforms/drm: only use glDrawBuffer with desktop GL That function is not available with GLES, and calling it is only necessary for NVidia. --- src/plugins/platforms/drm/egl_gbm_backend.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/drm/egl_gbm_backend.cpp b/src/plugins/platforms/drm/egl_gbm_backend.cpp index 776967c9a8..0ab9b6d592 100644 --- a/src/plugins/platforms/drm/egl_gbm_backend.cpp +++ b/src/plugins/platforms/drm/egl_gbm_backend.cpp @@ -359,7 +359,9 @@ bool EglGbmBackend::makeContextCurrent(const Output::RenderData &render) const qCCritical(KWIN_DRM) << "eglMakeCurrent failed:" << getEglErrorString(); return false; } - glDrawBuffer(GL_BACK); + if (!GLPlatform::instance()->isGLES()) { + glDrawBuffer(GL_BACK); + } return true; }