summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/video_shaders.h
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_shaders.h
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_shaders.h')
-rw-r--r--video/out/opengl/video_shaders.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/opengl/video_shaders.h b/video/out/opengl/video_shaders.h
index 207824b169..6498033ad1 100644
--- a/video/out/opengl/video_shaders.h
+++ b/video/out/opengl/video_shaders.h
@@ -30,7 +30,8 @@ extern const struct m_sub_options deband_conf;
void sampler_prelude(struct gl_shader_cache *sc, int tex_num);
void pass_sample_separated_gen(struct gl_shader_cache *sc, struct scaler *scaler,
int d_x, int d_y);
-void pass_sample_polar(struct gl_shader_cache *sc, struct scaler *scaler);
+void pass_sample_polar(struct gl_shader_cache *sc, struct scaler *scaler,
+ int components, int glsl_version);
void pass_sample_bicubic_fast(struct gl_shader_cache *sc);
void pass_sample_oversample(struct gl_shader_cache *sc, struct scaler *scaler,
int w, int h);