summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/context_rpi.c
Commit message (Collapse)AuthorAgeFilesLines
* vo_gpu: rpi: defer gl_ctx_resize until after gl_ctx_initNiklas Haas2018-01-151-1/+3
| | | | | | | | This segfaults otherwise. The conditional is needed to break a circular dependency (gl_init depends on mpgl_load_functions which depends on recreate_dispmanx which calls gl_ctx_resize). Fixes #5398
* vo_opengl: refactor into vo_gpuNiklas Haas2017-09-211-41/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done in several steps: 1. refactor MPGLContext -> struct ra_ctx 2. move GL-specific stuff in vo_opengl into opengl/context.c 3. generalize context creation to support other APIs, and add --gpu-api 4. rename all of the --opengl- options that are no longer opengl-specific 5. move all of the stuff from opengl/* that isn't GL-specific into gpu/ (note: opengl/gl_utils.h became opengl/utils.h) 6. rename vo_opengl to vo_gpu 7. to handle window screenshots, the short-term approach was to just add it to ra_swchain_fns. Long term (and for vulkan) this has to be moved to ra itself (and vo_gpu altered to compensate), but this was a stop-gap measure to prevent this commit from getting too big 8. move ra->fns->flush to ra_gl_ctx instead 9. some other minor changes that I've probably already forgotten Note: This is one half of a major refactor, the other half of which is provided by rossy's following commit. This commit enables support for all linux platforms, while his version enables support for all non-linux platforms. Note 2: vo_opengl_cb.c also re-uses ra_gl_ctx so it benefits from the --opengl- options like --opengl-early-flush, --opengl-finish etc. Should be a strict superset of the old functionality. Disclaimer: Since I have no way of compiling mpv on all platforms, some of these ports were done blindly. Specifically, the blind ports included context_mali_fbdev.c and context_rpi.c. Since they're both based on egl_helpers, the port should have gone smoothly without any major changes required. But if somebody complains about a compile error on those platforms (assuming anybody actually uses them), you know where to complain.
* vo_opengl: add a generic EGL function loader functionwm42017-04-061-12/+1
| | | | | | | This is pretty trivial, but also quite annoying due to details like mismatching eglGetProcAddress() function signature (most callers just cast the function pointer), and ARM/Linux hacks. So move them all to one place.
* vo_opengl: context_rpi: fix stdatomic usagewm42016-10-211-1/+1
| | | | | | atomic_bool is not supported with e.g. atomic_fetch_and. Fixes #3699. Untested.
* vo_opengl: rpi: raise the video layerwm42016-09-301-3/+8
| | | | | | Was intended to put the GL layer above the standard console. (But actually that was done already, and the oddness I'm seeing seems to be an unrelated bug.)
* vo_opengl: rpi: cosmetic changewm42016-09-151-2/+2
| | | | I almost feel sorry wasting a commit on this.
* vo_rpi, vo_opengl: separate RPI/EGL-specific code for both VOswm42016-09-131-198/+71
| | | | | | | | | This used to be shared, but since vo_rpi is going to be removed, untangle them. There was barely any actual code shared since the recent changes anyway. As a subtle change, we also stop opening libGLESv2.so explicitly in the vo_opengl backend, and use RTLD_DEFAULT instead.
* vo_opengl: rpi: use new egl context creation helper functionwm42016-09-131-26/+13
| | | | Only for the "new" vo_opengl backend code.
* vo_opengl: rpi: merge vo_rpi featureswm42016-09-121-20/+254
| | | | | | | | | | | Since vo_rpi is going to be deprecated, better port its features to the vo_opengl backend. The most tricky part is the fact that recreating dispmanx elements will conflict with the GL context. Fortunately, RPI's EGL support is reasonably compliant, and we can transplant the context to newly created dispmanx elements, making this much easier. This means unlike vo_rpi, the GL state will actually not be recreated.
* vo_opengl: add hw overlay support and use it for RPIwm42016-09-121-1/+1
| | | | | | | | | | | This overlay support specifically skips the OpenGL rendering chain, and uses GL rendering only for OSD/subtitles. This is for devices which don't have performant GL support. hwdec_rpi.c contains code ported from vo_rpi.c. vo_rpi.c is going to be deprecated. I left in the code for uploading sw surfaces (as it might be slightly more efficient for rendering sw decoded video), although it's dead code for now.
* vo_opengl: rpi: don't include x11 header filewm42016-04-151-1/+0
| | | | Copy & paste bug.
* Change GPL/LGPL dual-licensed files to LGPLwm42016-01-191-12/+7
| | | | | | | | | | | Do this to make the license situation less confusing. This change should be of no consequence, since LGPL is compatible with GPL anyway, and making it LGPL-only does not restrict the use with GPL code. Additionally, the wording implies that this is allowed, and that we can just remove the GPL part.
* vo_rpi: fix compilationwm42015-12-261-1/+1
| | | | | | | | | Untested, but should be fine. Broken by commit 0a0bb905. Also fix the include statement in context_rpi.c, which caused another compilation failure. Also untested. (Because I'm lazy.) Fixes #2638.
* vo_opengl: prefix per-backend source files with context_wm42015-12-191-0/+244