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 <nayan26deshmukh@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
Nayan Deshmukh 2016-07-05 23:47:56 +05:30 committed by Christian König
parent a0bf1768c7
commit af18a04755
1 changed files with 2 additions and 0 deletions

View File

@ -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..*]