summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/egl_helpers.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:14 +0000
commit60e8a3d404f0640fa5a3f834eae54b4f1fb9127d (patch)
tree1da89a218d0ecf010c67a87cb2f625c4cb18e7d7 /video/out/opengl/egl_helpers.c
parentAdding upstream version 0.37.0. (diff)
downloadmpv-60e8a3d404f0640fa5a3f834eae54b4f1fb9127d.tar.xz
mpv-60e8a3d404f0640fa5a3f834eae54b4f1fb9127d.zip
Adding upstream version 0.38.0.upstream/0.38.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'video/out/opengl/egl_helpers.c')
-rw-r--r--video/out/opengl/egl_helpers.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/video/out/opengl/egl_helpers.c b/video/out/opengl/egl_helpers.c
index 3bf6239..18d9027 100644
--- a/video/out/opengl/egl_helpers.c
+++ b/video/out/opengl/egl_helpers.c
@@ -192,18 +192,20 @@ static bool create_context(struct ra_ctx *ctx, EGLDisplay display,
}
if (!egl_ctx) {
// Fallback for EGL 1.4 without EGL_KHR_create_context or GLES
- // Add the context flags only for GLES - GL has been attempted above
EGLint attrs[] = {
- EGL_CONTEXT_CLIENT_VERSION, 2,
- es ? EGL_CONTEXT_FLAGS_KHR : EGL_NONE, ctx_flags,
+ EGL_CONTEXT_FLAGS_KHR, ctx_flags,
+ es ? EGL_CONTEXT_CLIENT_VERSION : EGL_NONE, 2,
EGL_NONE
};
egl_ctx = eglCreateContext(display, config, EGL_NO_CONTEXT, attrs);
+ if (!egl_ctx)
+ egl_ctx = eglCreateContext(display, config, EGL_NO_CONTEXT, &attrs[2]);
}
if (!egl_ctx) {
- MP_MSG(ctx, msgl, "Could not create EGL context for %s!\n", name);
+ MP_MSG(ctx, msgl, "Could not create EGL context for %s (error=%d)!\n",
+ name, eglGetError());
return false;
}