From ad0d6caac76a0cff9e98912314e749c1fde32d98 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Wed, 5 Jul 2017 00:25:32 +0200 Subject: 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) --- video/out/opengl/video_shaders.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'video/out/opengl/video_shaders.h') 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); -- cgit v1.2.3