summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-05-14 12:02:02 +0200
committerwm4 <wm4@nowhere>2016-05-14 12:02:02 +0200
commit449b948ee8b53f17a2dd6469f6a14c8dd4c04ccd (patch)
tree13dec45699d70c1d0260868da19266c0cdb1de9f
parent77d50cb3cfb381137900c7568169b41ffa7b5273 (diff)
downloadmpv-449b948ee8b53f17a2dd6469f6a14c8dd4c04ccd.tar.bz2
mpv-449b948ee8b53f17a2dd6469f6a14c8dd4c04ccd.tar.xz
vo_opengl: remove some pointless compatibility
Remove non-texture_rg compatibility from LUT sampling. OpenGL without texture_rg support will always trigger dumb-mode, and dumb-mode does not use LUTs. It used not to, and that was when this made sense.
-rw-r--r--video/out/opengl/utils.c1
-rw-r--r--video/out/opengl/video_shaders.c6
2 files changed, 3 insertions, 4 deletions
diff --git a/video/out/opengl/utils.c b/video/out/opengl/utils.c
index 1085110802..c586f5d9a2 100644
--- a/video/out/opengl/utils.c
+++ b/video/out/opengl/utils.c
@@ -907,7 +907,6 @@ void gl_sc_gen_shader_and_reset(struct gl_shader_cache *sc)
// fragment shader; still requires adding used uniforms and VAO elements
bstr *frag = &sc->tmp[4];
ADD_BSTR(frag, *header);
- ADD(frag, "#define RG %s\n", gl->mpgl_caps & MPGL_CAP_TEX_RG ? "rg" : "ra");
if (gl->glsl_version >= 130) {
ADD(frag, "#define texture1D texture\n");
ADD(frag, "#define texture3D texture\n");
diff --git a/video/out/opengl/video_shaders.c b/video/out/opengl/video_shaders.c
index cf022b96dd..a31088edc9 100644
--- a/video/out/opengl/video_shaders.c
+++ b/video/out/opengl/video_shaders.c
@@ -45,7 +45,7 @@ static void pass_sample_separated_get_weights(struct gl_shader_cache *sc,
int N = scaler->kernel->size;
if (N == 2) {
- GLSL(vec2 c1 = texture(lut, vec2(0.5, fcoord_lut)).RG;)
+ GLSL(vec2 c1 = texture(lut, vec2(0.5, fcoord_lut)).rg;)
GLSL(float weights[2] = float[](c1.r, c1.g);)
} else if (N == 6) {
GLSL(vec4 c1 = texture(lut, vec2(0.25, fcoord_lut));)
@@ -187,8 +187,8 @@ void pass_sample_bicubic_fast(struct gl_shader_cache *sc)
bicubic_calcweights(sc, "parmx", "fcoord.x");
bicubic_calcweights(sc, "parmy", "fcoord.y");
GLSL(vec4 cdelta;)
- GLSL(cdelta.xz = parmx.RG * vec2(-pt.x, pt.x);)
- GLSL(cdelta.yw = parmy.RG * vec2(-pt.y, pt.y);)
+ GLSL(cdelta.xz = parmx.rg * vec2(-pt.x, pt.x);)
+ GLSL(cdelta.yw = parmy.rg * vec2(-pt.y, pt.y);)
// first y-interpolation
GLSL(vec4 ar = texture(tex, pos + cdelta.xy);)
GLSL(vec4 ag = texture(tex, pos + cdelta.xw);)