From af18a047557944abb91dc409c5a32e6b2911d132 Mon Sep 17 00:00:00 2001 From: Nayan Deshmukh Date: Tue, 5 Jul 2016 23:47:56 +0530 Subject: [PATCH] vl: add half pixel to v_tex before adding offsets MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Since pixel center lies at 0.5, add half_pixel to vtex before adding offsets to it. Signed-off-by: Nayan Deshmukh Reviewed-by: Christian König --- src/gallium/auxiliary/vl/vl_bicubic_filter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/auxiliary/vl/vl_bicubic_filter.c b/src/gallium/auxiliary/vl/vl_bicubic_filter.c index ca9f8820e3b..25bc58c3806 100644 --- a/src/gallium/auxiliary/vl/vl_bicubic_filter.c +++ b/src/gallium/auxiliary/vl/vl_bicubic_filter.c @@ -197,6 +197,8 @@ create_frag_shader(struct vl_bicubic_filter *filter, unsigned video_width, ureg_src(t_array[22])); ureg_DIV(shader, ureg_writemask(t_array[22], TGSI_WRITEMASK_XY), ureg_src(t_array[22]), ureg_imm2f(shader, video_width, video_height)); + ureg_ADD(shader, ureg_writemask(t_array[22], TGSI_WRITEMASK_XY), + ureg_src(t_array[22]), half_pixel); /* * t_array[0..*] = vtex + offset[0..*] -- 2.30.2