]> git.sesse.net Git - movit/commitdiff
Fix some typos that would cause the sampler number not to be incremented.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 16 Oct 2014 20:07:29 +0000 (22:07 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 16 Oct 2014 20:07:29 +0000 (22:07 +0200)
Found by Christophe Thommeret, who also noticed these are most likely
harmless since both effects with the bug are typically last in their
chain.

dither_effect.cpp
resample_effect.cpp

index 17c577d4cdacc3ae44a4c79015d46c6e888389d6..41ea9b432b80d3c94bf093a184f2632721dcbbcd 100644 (file)
@@ -111,7 +111,7 @@ void DitherEffect::set_gl_state(GLuint glsl_program_num, const string &prefix, u
        check_error();
 
        set_uniform_int(glsl_program_num, prefix, "dither_tex", *sampler_num);
-       ++sampler_num;
+       ++*sampler_num;
 
        // In theory, we should adjust for the texel centers that have moved here as well,
        // but since we use GL_NEAREST and we don't really care a lot what texel we sample,
index 792d86134ac54f875e5724bd63f715b7434d916c..713df86d7e7dc864377c409c67709c99c32d6e61 100644 (file)
@@ -484,7 +484,7 @@ void SingleResamplePassEffect::set_gl_state(GLuint glsl_program_num, const strin
        check_error();
 
        set_uniform_int(glsl_program_num, prefix, "sample_tex", *sampler_num);
-       ++sampler_num;
+       ++*sampler_num;
        set_uniform_int(glsl_program_num, prefix, "num_samples", src_bilinear_samples);
        set_uniform_float(glsl_program_num, prefix, "num_loops", num_loops);
        set_uniform_float(glsl_program_num, prefix, "slice_height", slice_height);