From 449b948ee8b53f17a2dd6469f6a14c8dd4c04ccd Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 14 May 2016 12:02:02 +0200 Subject: 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. --- video/out/opengl/utils.c | 1 - video/out/opengl/video_shaders.c | 6 +++--- 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);) -- cgit v1.2.3