This allows passing EGL_PLATFORM_SURFACELESS_MESA to
gl_renderer_display_create(). It is not useful on its own, because the
surfaceless platform has no window surfaces.
This feature will be used by the headless backend.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
return "wayland";
case EGL_PLATFORM_X11_KHR:
return "x11";
+ case EGL_PLATFORM_SURFACELESS_MESA:
+ return "surfaceless";
default:
assert(0 && "bad EGL platform enum");
}
return -1;
}
+ /* Surfaceless is unusable without platform_base extension */
+ if (supports == 0 && platform == EGL_PLATFORM_SURFACELESS_MESA)
+ return -1;
+
gr = zalloc(sizeof *gr);
if (gr == NULL)
return -1;
#define EGL_PLATFORM_X11_KHR 0x31D5
#endif
+#ifndef EGL_PLATFORM_SURFACELESS_MESA
+#define EGL_PLATFORM_SURFACELESS_MESA 0x31DD
+#endif
+
#ifndef EGL_KHR_cl_event2
#define EGL_KHR_cl_event2 1
typedef void *EGLSyncKHR;
#define EGL_PLATFORM_GBM_KHR 0x31D7
#define EGL_PLATFORM_WAYLAND_KHR 0x31D8
#define EGL_PLATFORM_X11_KHR 0x31D5
+#define EGL_PLATFORM_SURFACELESS_MESA 0x31DD
#endif /* ENABLE_EGL */