weston/libweston
Armin Krezović 28d240f281 gl-renderer: Always setup gl-renderer
Currently, the gl-renderer setup is being done on per-output
basis. This isn't desirable when trying to make weston run
with zero outputs.

When there are no outputs present, there is no surface available
to attach an EGLContext to with eglMakeCurrent, which makes
any EGL command fail.

The problem is solved by using EGL_KHR_surfaceless_context to
bind an EGLContext to EGL_NO_SURFACE, or if that is
unavailable, creating a dummy PbufferSurface and binding an
EGLContext to it, so EGL gets set up properly.

v2:

- Move PbufferSurface creation into its own function
- Introduce a new EGLConfig with EGL_PBUFFER_BIT set
  and use it to create a PbufferSurface
- Make PbufferSurface attributes definition static
- Check for return of gl_renderer_setup and terminate
  in case it fails
- Remove redundant gl_renderer_setup call from
  gl_renderer_output_create
- Only destroy the dummy surface if it is valid

This patch causes a warning from Mesa when using the i965 driver:
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
A bug has been filed about it since it seems to be spurious:
https://bugs.freedesktop.org/show_bug.cgi?id=96694

Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
[Pekka: filed a Mesa bug and added the note in commit msg]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-06-27 15:57:11 +03:00
..
animation.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
bindings.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
clipboard.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
compositor-drm.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
compositor-drm.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
compositor-fbdev.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
compositor-fbdev.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
compositor-headless.c compositor-headless: Support starting with zero outputs 2016-06-27 13:17:05 +03:00
compositor-headless.h compositor-headless: Support starting with zero outputs 2016-06-27 13:17:05 +03:00
compositor-rdp.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
compositor-rdp.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
compositor-wayland.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
compositor-wayland.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
compositor-x11.c compositor-x11: fix title overflow in x11_backend_create_output 2016-06-24 07:08:23 +10:00
compositor-x11.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
compositor.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
compositor.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
data-device.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
dbus.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
dbus.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
gl-renderer.c gl-renderer: Always setup gl-renderer 2016-06-27 15:57:11 +03:00
gl-renderer.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
input.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
launcher-direct.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
launcher-impl.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
launcher-logind.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
launcher-util.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
launcher-util.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
launcher-weston-launch.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
libbacklight.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
libbacklight.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
libinput-device.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
libinput-device.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
libinput-seat.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
libinput-seat.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
libweston.pc.in Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
linux-dmabuf.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
linux-dmabuf.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
log.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
noop-renderer.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
pixman-renderer.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
pixman-renderer.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
screenshooter.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
spring-tool.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
timeline-object.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
timeline.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
timeline.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
vaapi-recorder.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
vaapi-recorder.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
version.h.in Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
vertex-clipping.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
vertex-clipping.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
weston-egl-ext.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
weston-launch.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
weston-launch.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
zoom.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00