if (gl_renderer->display_create(b->compositor,
EGL_PLATFORM_GBM_KHR,
(void *)b->gbm,
+ EGL_WINDOW_BIT,
format,
n_formats) < 0) {
return -1;
if (gl_renderer->display_create(compositor,
EGL_PLATFORM_WAYLAND_KHR,
b->parent.wl_display,
+ EGL_WINDOW_BIT,
wayland_formats,
ARRAY_LENGTH(wayland_formats)) < 0) {
weston_log("Failed to initialize the GL renderer; "
ret = gl_renderer->display_create(b->compositor, EGL_PLATFORM_X11_KHR,
(void *) b->dpy,
+ EGL_WINDOW_BIT,
x11_formats,
ARRAY_LENGTH(x11_formats));
gl_renderer_display_create(struct weston_compositor *ec,
EGLenum platform,
void *native_display,
+ EGLint egl_surface_type,
const uint32_t *drm_formats,
unsigned drm_formats_count)
{
goto fail_with_error;
if (!gr->has_configless_context) {
- EGLint surface_type = EGL_WINDOW_BIT;
-
if (!gr->has_surfaceless_context)
- surface_type |= EGL_PBUFFER_BIT;
+ egl_surface_type |= EGL_PBUFFER_BIT;
gr->egl_config = gl_renderer_get_egl_config(gr,
- surface_type,
+ egl_surface_type,
drm_formats,
drm_formats_count);
if (gr->egl_config == EGL_NO_CONFIG_KHR) {
typedef intptr_t EGLNativeDisplayType;
typedef intptr_t EGLNativeWindowType;
#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
+#define EGL_PBUFFER_BIT 0x0001
+#define EGL_WINDOW_BIT 0x0004
#endif /* ENABLE_EGL */
int (*display_create)(struct weston_compositor *ec,
EGLenum platform,
void *native_display,
+ EGLint egl_surface_type,
const uint32_t *drm_formats,
unsigned drm_formats_count);