egl_helpers: ensure debug context attrs/bit exist

Regression from e13fe1299d. 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.
This commit is contained in:
Dudemanguy 2021-10-20 11:36:59 -05:00
parent ef301893a5
commit 7ad5ad4098
1 changed files with 9 additions and 0 deletions

View File

@ -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;