mpv/video/out/opengl
wm4 e1586585b4 vo_gpu: opengl: make it work with EGL 1.4
This tries to deal with the crazy EGL situation. The summary is:

- using eglGetDisplay() with multiple windowing platforms doesn't really
  work, but Mesa had an awful hack for it
- this hack can be disabled at build time, and some distros sometimes
  accidentally or intentionally do so
- Mesa will probably eventually disable it by default
- we switched to eglGetPlatformDisplay(), but this requires EGL 1.5
- the very regrettable graphics company (also known as Nvidia) ships
  drivers (for old hardware I think) that are EGL 1.4 only
- that means even though we "require" EGL 1.5 and link against it, the
  runtime EGL may be 1.4
- trying to run mpv there crashes in the dynamic linker
- so we have to go through some more awful compatibility hacks

This commit tries to do it "properly", but using EGL 1.4 as base. The
plaform selection mechanism is a messy extension there, which got
elevated to core API in 1.5 (but OF COURSE in incompatible ways).

I'm not sure whether the EGL 1.5 code path (by parsing the EGL_VERSION)
is really needed, but if you ask me, it feels slightly saner not to rely
on an EGL 1.4 kludge forever. But maybe this is just an instance of
self-harm, since they will most likely never drop or not provide this
API.

Also, unlike before, we actually check the extension string for the
individual platform extensions, because who knows, some EGL
implementations might curse us if we pass unknown platform parameters.
(But actually, the more I think about this, the more bullshit it is.)

X11 and Wayland were the only ones trying to call eglGetPlatformDisplay,
so they're the only ones which are adjusted in this commit.

Unfortunately, correct function of this commit is unconfirmed. It's
possible that it crashes with the old drivers mentioned above.

Why didn't they solve it like this:

struct native_display {
    int platform_type;
    void *native_display;
};

Could have kept eglGetDisplay() without all the obnoxious extension BS.
2019-12-16 00:25:51 +01:00
..
angle_dynamic.c
angle_dynamic.h
common.c vo_gpu: opengl: do not free "GL" sub-allocations 2019-11-29 20:23:27 +01:00
common.h
context.c vo_gpu/opengl: fully initialize FBO when passing it to rendering 2019-10-30 15:54:41 +01:00
context.h vo: use a struct for vsync feedback stuff 2018-12-06 10:30:25 +01:00
context_android.c context_android: move common code to a separate file 2019-09-27 00:05:06 +03:00
context_angle.c vo: make swapchain-depth option generic for all VOs 2019-09-28 14:10:01 +03:00
context_cocoa.c
context_drm_egl.c drm: avoid division by 0 in drm_pflip_cb with bad drivers 2019-12-07 18:34:25 +01:00
context_dxinterop.c vo: make swapchain-depth option generic for all VOs 2019-09-28 14:10:01 +03:00
context_glx.c vo_gpu: context_glx: Add X11 native resource 2019-11-16 15:35:32 -08:00
context_rpi.c rpi: destroy fullscreen change handling 2019-12-11 18:50:37 +01:00
context_wayland.c vo_gpu: opengl: make it work with EGL 1.4 2019-12-16 00:25:51 +01:00
context_win.c
context_x11egl.c vo_gpu: opengl: make it work with EGL 1.4 2019-12-16 00:25:51 +01:00
egl_helpers.c vo_gpu: opengl: make it work with EGL 1.4 2019-12-16 00:25:51 +01:00
egl_helpers.h vo_gpu: opengl: make it work with EGL 1.4 2019-12-16 00:25:51 +01:00
formats.c
formats.h
gl_headers.h vo_gpu: opengl: add hack for ancient Mesa/GLX 2019-11-30 13:38:28 +01:00
hwdec_d3d11egl.c vo_gpu: hwdec_d3d11egl: add missing P010 format to supported list 2019-10-17 22:45:05 +02:00
hwdec_drmprime_drm.c vo_gpu: hwdec_drmprime_drm: add hwdec ctx 2019-09-27 13:08:27 +02:00
hwdec_dxva2egl.c
hwdec_dxva2gldx.c
hwdec_ios.m
hwdec_osx.c
hwdec_rpi.c
hwdec_vdpau.c vo_gpu: vdpau actually works under EGL 2019-11-07 22:53:13 +01:00
libmpv_gl.c
oml_sync.c oml_sync: fix typo in comment 2019-09-20 00:32:29 +02:00
oml_sync.h vo_gpu: glx: move OML sync code to an independent file 2019-09-08 23:23:43 +10:00
ra_gl.c vo_gpu: opengl: add support for IMGFMT_RGB30 2019-11-02 17:46:46 +01:00
ra_gl.h
utils.c
utils.h