From 7ad5ad409872310b8fa17c9a4b0352d06f4e65ee Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Wed, 20 Oct 2021 11:36:59 -0500 Subject: egl_helpers: ensure debug context attrs/bit exist Regression from e13fe1299d8aefdc264e74159cce07b8bfcf722c. Apparently, Broadcom's EGL does not support the EGL_CONTEXT_FLAGS_KHR attribute nor EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR. Just define these as EGL_NONE and 0 respectively if we do not have them. --- video/out/opengl/egl_helpers.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/video/out/opengl/egl_helpers.c b/video/out/opengl/egl_helpers.c index fc28c61e62..0766be3c54 100644 --- a/video/out/opengl/egl_helpers.c +++ b/video/out/opengl/egl_helpers.c @@ -45,6 +45,15 @@ typedef intptr_t EGLAttrib; #endif +// Not every EGL provider (like RPI) has these. +#ifndef EGL_CONTEXT_FLAGS_KHR +#define EGL_CONTEXT_FLAGS_KHR EGL_NONE +#endif + +#ifndef EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR +#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0 +#endif + struct mp_egl_config_attr { int attrib; const char *name; -- cgit v1.2.3