From 3783689f334ef4bcf15d17c8df526859f9f33632 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 16 Oct 2014 22:07:29 +0200 Subject: [PATCH] Fix some typos that would cause the sampler number not to be incremented. 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 | 2 +- resample_effect.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dither_effect.cpp b/dither_effect.cpp index 17c577d..41ea9b4 100644 --- a/dither_effect.cpp +++ b/dither_effect.cpp @@ -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, diff --git a/resample_effect.cpp b/resample_effect.cpp index 792d861..713df86 100644 --- a/resample_effect.cpp +++ b/resample_effect.cpp @@ -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); -- 2.39.2