diff options
author | Nayan Deshmukh <[email protected]> | 2016-07-05 23:47:56 +0530 |
---|---|---|
committer | Christian König <[email protected]> | 2016-07-08 20:51:12 +0200 |
commit | af18a047557944abb91dc409c5a32e6b2911d132 (patch) | |
tree | c57d0a35c96f4f3c7cfd1ed0aa450303ab1c5dad /src/gallium/auxiliary/vl | |
parent | a0bf1768c7131a5d9a23c5177e7b9d7a0267ef6c (diff) |
vl: add half pixel to v_tex before adding offsets
Since pixel center lies at 0.5, add half_pixel to vtex
before adding offsets to it.
Signed-off-by: Nayan Deshmukh <[email protected]>
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_bicubic_filter.c | 2 |
1 files changed, 2 insertions, 0 deletions
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..*] |