diff options
author | wm4 <wm4@nowhere> | 2015-09-25 00:07:20 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-09-25 00:19:58 +0200 |
commit | d47dff3faa246256d9e29daa215db4b5aedcb3f2 (patch) | |
tree | e5cece949613a8b79591391ea5ed01c49b030563 /video/out/opengl/common.c | |
parent | b81d9c79a893f119ea80d230c20b77809be2b0d9 (diff) | |
download | mpv-d47dff3faa246256d9e29daa215db4b5aedcb3f2.tar.bz2 mpv-d47dff3faa246256d9e29daa215db4b5aedcb3f2.tar.xz |
vo_opengl: load certain EGL extensions needed for VAAPI EGL interop
These extensions use a bunch of EGL types, so we need to include the EGL
headers in common.h to use our GL function loader with this.
In the future, we should probably require presence of the EGL headers to
reduce the hacks. This might be not so simple at least with OSX, so for
now this has to do.
Diffstat (limited to 'video/out/opengl/common.c')
-rw-r--r-- | video/out/opengl/common.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/video/out/opengl/common.c b/video/out/opengl/common.c index 2b6d3949ef..8eafc09d25 100644 --- a/video/out/opengl/common.c +++ b/video/out/opengl/common.c @@ -72,6 +72,7 @@ static bool check_ext(GL *gl, const char *name) #define FN_OFFS(name) offsetof(GL, name) #define DEF_FN(name) {FN_OFFS(name), "gl" # name} +#define DEF_FN_EGL(name) {FN_OFFS(name), "egl" # name} #define DEF_FN_NAME(name, str) {FN_OFFS(name), str} struct gl_function { @@ -278,6 +279,22 @@ static const struct gl_functions gl_functions[] = { .extension = "GL_APPLE_rgb_422", .provides = MPGL_CAP_APPLE_RGB_422, }, + // EGL extensions for vaapi EGL interop + { + .extension = "EGL_KHR_image_base", + .functions = (const struct gl_function[]) { + DEF_FN_EGL(CreateImageKHR), + DEF_FN_EGL(DestroyImageKHR), + {0} + }, + }, + { + .extension = "GL_OES_EGL_image", + .functions = (const struct gl_function[]) { + DEF_FN(EGLImageTargetTexture2DOES), + {0} + }, + }, { .ver_core = 430, .extension = "GL_ARB_debug_output", |