From d47dff3faa246256d9e29daa215db4b5aedcb3f2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 25 Sep 2015 00:07:20 +0200 Subject: 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. --- video/out/opengl/common.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'video/out/opengl/common.c') 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", -- cgit v1.2.3