gl-renderer: add EGL surfaceless platform support
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>
This commit is contained in:
committed by
Pekka Paalanen
parent
53b7fd70b8
commit
ecdf50d38e
@@ -3303,6 +3303,8 @@ platform_to_extension(EGLenum platform)
|
||||
return "wayland";
|
||||
case EGL_PLATFORM_X11_KHR:
|
||||
return "x11";
|
||||
case EGL_PLATFORM_SURFACELESS_MESA:
|
||||
return "surfaceless";
|
||||
default:
|
||||
assert(0 && "bad EGL platform enum");
|
||||
}
|
||||
@@ -3369,6 +3371,10 @@ gl_renderer_display_create(struct weston_compositor *ec,
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user