svga: fix unnormalized->normalized texture coordinate conversion
authorNeha Bhende <bhenden@vmware.com>
Thu, 20 Jul 2017 20:59:36 +0000 (13:59 -0700)
committerBrian Paul <brianp@vmware.com>
Sat, 22 Jul 2017 19:18:56 +0000 (13:18 -0600)
commitacfb1583a560339b500a94bc13bf73675e7ed422
tree3e7cd84f3b0162a54efcd2e2fb03845474943fb0
parentdc62ddfb39e2287f1376df94e15bf108a73f12b0
svga: fix unnormalized->normalized texture coordinate conversion

Sometimes, converting unnormalized coordinates to normalized
coordinates requires an epsilon value to produce the right texels with
nearest filtering.  Adding 0.0001 to the coordinates when the min/mag
filter is nearest fixes the issue.
Fixes piglit test fbo-blit-scaled-linear

Tested with mtt-piglit, mtt-glretrace

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/drivers/svga/svga_shader.c
src/gallium/drivers/svga/svga_shader.h
src/gallium/drivers/svga/svga_tgsi_vgpu10.c