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 17c577d..41ea9b4 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 792d861..713df86 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);