diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2021-10-02 17:44:34 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2021-10-16 20:33:53 +0000 |
commit | 0b918edfb59d071c561a19b7d1a454cdbfd80e70 (patch) | |
tree | b55915758a2a6d217586c80a97edf10cabca3d7d /video/out/opengl/egl_helpers.c | |
parent | 0282196f4a3e8c6f0c6613cbd461fcc2f426dca5 (diff) | |
download | mpv-0b918edfb59d071c561a19b7d1a454cdbfd80e70.tar.bz2 mpv-0b918edfb59d071c561a19b7d1a454cdbfd80e70.tar.xz |
vo_gpu: opengl: reduce versions in mpgl_preferred_gl_versions
Currently mpv requires a bare minimum of GL 2.1, although it tries to
use 3.2+ core contexts when possible.
The GLX and EGL spec effectively guarantee that the implementation will
give you the highest compatible version possible. In other words:
Requesting 3.2 core profile will always give you core profile and the
version will be in the 3.2 .. 4.6 range - as supported by the drivers.
Similarly for 2.1 - implementation will give you either:
- 2.1 .. 3.1, or
- 3.2 .. 4.6 compat profile
This has been verified against the Mesa drivers (i965, iris, swrast) and
Nvidia binary drivers.
As such, drop the list to 320, 210 and terminating 0.
v2:
- mpgl_preferred_gl_versions -> mpgl_min_required_gl_versions
- update ^^ comment
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'video/out/opengl/egl_helpers.c')
-rw-r--r-- | video/out/opengl/egl_helpers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/opengl/egl_helpers.c b/video/out/opengl/egl_helpers.c index bcd85bfb73..2bdf3df0f2 100644 --- a/video/out/opengl/egl_helpers.c +++ b/video/out/opengl/egl_helpers.c @@ -184,8 +184,8 @@ static bool create_context(struct ra_ctx *ctx, EGLDisplay display, egl_ctx = eglCreateContext(display, config, EGL_NO_CONTEXT, attrs); } else { - for (int n = 0; mpgl_preferred_gl_versions[n]; n++) { - int ver = mpgl_preferred_gl_versions[n]; + for (int n = 0; mpgl_min_required_gl_versions[n]; n++) { + int ver = mpgl_min_required_gl_versions[n]; if (!ra_gl_ctx_test_version(ctx, ver, false)) continue; |