diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c index 149dd9597aa..57e3720123f 100644 --- a/src/gallium/drivers/softpipe/sp_tex_sample.c +++ b/src/gallium/drivers/softpipe/sp_tex_sample.c @@ -2444,8 +2444,8 @@ img_filter_2d_ewa(const struct sp_sampler_view *sp_sview, const float weight = weightLut[qClamped]; weight_buffer[buffer_next] = weight; - s_buffer[buffer_next] = u / ((float) width); - t_buffer[buffer_next] = v / ((float) height); + s_buffer[buffer_next] = (u + 0.5f) / width; + t_buffer[buffer_next] = (v + 0.5f) / height; buffer_next++; if (buffer_next == TGSI_QUAD_SIZE) {