From e24e0ccd6828ff8a50fb290bed45a0f6d81eb00b Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 16 Nov 2015 20:09:15 +0100 Subject: vo_opengl: force dumb mode if RG textures are not available Something goes wrong somewhere. Don't bother, it's only needed for compatibility with our absolute baseline (GL 2.1/GLES 2). On the other hand, we can process nv12 formats just fine. --- video/out/opengl/video.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'video/out/opengl/video.c') diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index c62cbeeafa..31596b4561 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -2357,13 +2357,15 @@ static void check_gl_features(struct gl_video *p) bool have_1d_tex = gl->mpgl_caps & MPGL_CAP_1D_TEX; bool have_3d_tex = gl->mpgl_caps & MPGL_CAP_3D_TEX; bool have_mix = gl->glsl_version >= 130; + bool have_texrg = gl->mpgl_caps & MPGL_CAP_TEX_RG; if (gl->es && p->opts.pbo) { p->opts.pbo = 0; MP_WARN(p, "Disabling PBOs (GLES unsupported).\n"); } - if (p->opts.dumb_mode || gl->es || !have_fbo || !test_fbo(p)) { + if (p->opts.dumb_mode || gl->es || !have_fbo || !test_fbo(p) || !have_texrg) + { if (!p->opts.dumb_mode) { MP_WARN(p, "High bit depth FBOs unsupported. Enabling dumb mode.\n" "Most extended features will be disabled.\n"); @@ -2591,8 +2593,6 @@ static bool init_format(int fmt, struct gl_video *init) // YUV/half-packed if (fmt == IMGFMT_NV12 || fmt == IMGFMT_NV21) { - if (!(init->gl->mpgl_caps & MPGL_CAP_TEX_RG)) - return false; plane_format[0] = find_tex_format(gl, 1, 1); plane_format[1] = find_tex_format(gl, 1, 2); if (fmt == IMGFMT_NV21) -- cgit v1.2.3