[cogl/wip/outputs: 10/11] kms: set EGL_PLATFORM environment variable
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/outputs: 10/11] kms: set EGL_PLATFORM environment variable
- Date: Mon, 12 Aug 2013 16:47:23 +0000 (UTC)
commit 61da870b063de273aca23fcc69bce410d58ae71c
Author: Robert Bragg <robert linux intel com>
Date: Sat Jun 15 21:46:44 2013 +0100
kms: set EGL_PLATFORM environment variable
Although EGL doesn't currently have a standard way of supporting
multiple platforms and being able explicitly select a platform, Mesa at
least lets you explicitly select a platform via the EGL_PLATFORM
environment variable. This makes the egl-kms winsys set EGL_PLATFORM to
"gbm".
cogl/winsys/cogl-winsys-egl-kms.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-egl-kms.c b/cogl/winsys/cogl-winsys-egl-kms.c
index 107a815..dac951b 100644
--- a/cogl/winsys/cogl-winsys-egl-kms.c
+++ b/cogl/winsys/cogl-winsys-egl-kms.c
@@ -536,6 +536,12 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer,
goto error;
}
+ /* The EGL API doesn't provide for a way to explicitly select a
+ * platform when the driver can support multiple. Mesa allows
+ * selection using an environment variable though so that's what
+ * we're doing here... */
+ g_setenv ("EGL_PLATFORM", "gbm", 1);
+
egl_renderer->edpy = eglGetDisplay ((EGLNativeDisplayType)kms_renderer->gbm);
if (egl_renderer->edpy == EGL_NO_DISPLAY)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]