summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-30 20:48:30 +0100
committerwm4 <wm4@nowhere>2019-12-16 00:25:51 +0100
commite1586585b4c54b1f76379728e4f1478b2fd5b3ce (patch)
tree56f9ab11a71592d852c37ecc06b3d17873616064 /wscript_build.py
parent4ae43a1c40b2e6f96ce2c62bc5f16d55f91436f5 (diff)
downloadmpv-e1586585b4c54b1f76379728e4f1478b2fd5b3ce.tar.bz2
mpv-e1586585b4c54b1f76379728e4f1478b2fd5b3ce.tar.xz
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.
Diffstat (limited to 'wscript_build.py')
0 files changed, 0 insertions, 0 deletions