summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-07-05 00:25:32 +0200
committerNiklas Haas <git@haasn.xyz>2017-07-05 11:21:58 +0200
commitad0d6caac76a0cff9e98912314e749c1fde32d98 (patch)
treee2f4cd6aff87503e05cbca1df4852a11f827f002 /video/out/opengl/video.c
parentb387f82aa40a1655590bbb0dffe58f9728a37b49 (diff)
downloadmpv-ad0d6caac76a0cff9e98912314e749c1fde32d98.tar.bz2
mpv-ad0d6caac76a0cff9e98912314e749c1fde32d98.tar.xz
vo_opengl: use textureGatherOffset for polar filters
This is more efficient on my machine (nvidia), but only when applied to groups of exactly 4 texels. So we switch to the more efficient textureGather for groups of 4. Some notes: - textureGatherOffset seems to be faster than textureGather by a non-negligible amount, but for some reason, textureOffset is still slower than a straight-up texture - textureGather* requires GLSL 400; and at least on nvidia, this requires actually allocating a GL 4.0 context. - the code in opengl/common.c that clamped the GLSL version to 330 is deprecated, because the old user shader style has been removed completely in the meantime - To combat the growing complexity of the polar sampling code, we drop the antiringing functionality from EWA shaders completely, since it never really worked well for EWA to begin with. (Horrific artifacting)
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r--video/out/opengl/video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 9823f1066d..a83e6e34b7 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -1583,7 +1583,7 @@ static void pass_sample(struct gl_video *p, struct img_tex tex,
} else if (strcmp(name, "oversample") == 0) {
pass_sample_oversample(p->sc, scaler, w, h);
} else if (scaler->kernel && scaler->kernel->polar) {
- pass_sample_polar(p->sc, scaler);
+ pass_sample_polar(p->sc, scaler, tex.components, p->gl->glsl_version);
} else if (scaler->kernel) {
pass_sample_separated(p, tex, scaler, w, h);
} else {