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:
parent
a4fa5711f9
commit
dab054200c
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue