summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-16 20:09:15 +0100
committerwm4 <wm4@nowhere>2015-11-16 20:09:15 +0100
commite24e0ccd6828ff8a50fb290bed45a0f6d81eb00b (patch)
treee9b90ccb96617ffefa8db04477f290283c7c7b2e /video/out/opengl/video.c
parent514f5d760e08b42c4725973cef72034427d7285a (diff)
downloadmpv-e24e0ccd6828ff8a50fb290bed45a0f6d81eb00b.tar.bz2
mpv-e24e0ccd6828ff8a50fb290bed45a0f6d81eb00b.tar.xz
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.
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r--video/out/opengl/video.c6
1 files changed, 3 insertions, 3 deletions
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)