diff options
author | wm4 <wm4@nowhere> | 2015-11-19 21:20:40 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-19 21:20:40 +0100 |
commit | 1a8b06f67e8063f687bfc251440235c86b7bdcb7 (patch) | |
tree | 14387335facf7da57bf8538e8a3d9ebf341f98fe /video/out/opengl/video.c | |
parent | 92d06f43fa1ee1a39d4b97849d11ca8e68d01813 (diff) | |
download | mpv-1a8b06f67e8063f687bfc251440235c86b7bdcb7.tar.bz2 mpv-1a8b06f67e8063f687bfc251440235c86b7bdcb7.tar.xz |
vo_opengl: make 1D textures completely optional
Polar scalers use 1D textures, because they're slightly faster on some
GPUs than 2D textures. But 2D textures work too, so add support for
them.
Allows using these scalers with ANGLE.
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r-- | video/out/opengl/video.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 9bc3c61f6c..f7ca9d79d4 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -1041,7 +1041,7 @@ static void reinit_scaler(struct gl_video *p, struct scaler *scaler, scaler->insufficient = !mp_init_filter(scaler->kernel, sizes, scale_factor); - if (scaler->kernel->polar) { + if (scaler->kernel->polar && (gl->mpgl_caps & MPGL_CAP_1D_TEX)) { scaler->gl_target = GL_TEXTURE_1D; } else { scaler->gl_target = GL_TEXTURE_2D; @@ -2355,7 +2355,6 @@ static void check_gl_features(struct gl_video *p) GL *gl = p->gl; bool have_float_tex = gl->mpgl_caps & MPGL_CAP_FLOAT_TEX; bool have_fbo = gl->mpgl_caps & MPGL_CAP_FB; - 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; @@ -2400,8 +2399,6 @@ static void check_gl_features(struct gl_video *p) char *reason = NULL; if (!have_float_tex) reason = "(float tex. missing)"; - if (!have_1d_tex && kernel->polar) - reason = "(1D tex. missing)"; if (reason) { p->opts.scaler[n].kernel.name = "bilinear"; MP_WARN(p, "Disabling scaler #%d %s.\n", n, reason); |