summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/utils.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-04-03 18:08:36 +0200
committerwm4 <wm4@nowhere>2017-04-03 18:12:42 +0200
commit1c0bd59bc2da7ee11598bbb1d5b4e0c9797ccfbe (patch)
treecc9f830b4609d969e4d78c045849e61ee3f7d088 /video/out/opengl/utils.c
parent31611fc46b29e0704004e21f1e25de2f9608e109 (diff)
downloadmpv-1c0bd59bc2da7ee11598bbb1d5b4e0c9797ccfbe.tar.bz2
mpv-1c0bd59bc2da7ee11598bbb1d5b4e0c9797ccfbe.tar.xz
vo_opengl: use 16 bit textures with angle
Regression due to 03fe506. It accidentally changed the default value if glGetTexLevelParameteriv() is not available, which is the case with ANGLE.
Diffstat (limited to 'video/out/opengl/utils.c')
-rw-r--r--video/out/opengl/utils.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/video/out/opengl/utils.c b/video/out/opengl/utils.c
index 2ec8f43898..36e63e03ff 100644
--- a/video/out/opengl/utils.c
+++ b/video/out/opengl/utils.c
@@ -1255,8 +1255,12 @@ void gl_pbo_upload_uninit(struct gl_pbo_upload *pbo)
int gl_determine_16bit_tex_depth(GL *gl)
{
const struct gl_format *fmt = gl_find_unorm_format(gl, 2, 1);
- if (!gl->GetTexLevelParameteriv || !fmt)
+ if (!gl->GetTexLevelParameteriv || !fmt) {
+ // ANGLE supports ES 3.0 and the extension, but lacks the function above.
+ if (gl->mpgl_caps & MPGL_CAP_EXT16)
+ return 16;
return -1;
+ }
GLuint tex;
gl->GenTextures(1, &tex);