1
0
Fork 0

egl-kms: set the EGL_PLATFORM explicitly

Otherwise, if we try egl-wayland first, we get the environment
variable from that, which crashes mesa trying to open the gbm device
as a wayland display.

https://bugzilla.gnome.org/show_bug.cgi?id=705836
This commit is contained in:
Giovanni Campagna 2013-07-17 14:08:32 +02:00
parent a4fa5711f9
commit dab054200c

View file

@ -268,6 +268,12 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer,
egl_renderer->platform = g_slice_new0 (CoglRendererKMS);
kms_renderer = egl_renderer->platform;
/* 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", "drm", 1);
kms_renderer->fd = open (device_name, O_RDWR);
if (kms_renderer->fd < 0)
{