From acfb1583a560339b500a94bc13bf73675e7ed422 Mon Sep 17 00:00:00 2001 From: Neha Bhende Date: Thu, 20 Jul 2017 13:59:36 -0700 Subject: 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 Reviewed-by: Charmaine Lee --- src/gallium/drivers/svga/svga_shader.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gallium/drivers/svga/svga_shader.h') diff --git a/src/gallium/drivers/svga/svga_shader.h b/src/gallium/drivers/svga/svga_shader.h index ec116c031d5..a594d120f84 100644 --- a/src/gallium/drivers/svga/svga_shader.h +++ b/src/gallium/drivers/svga/svga_shader.h @@ -97,6 +97,7 @@ struct svga_compile_key unsigned compare_mode:1; unsigned compare_func:3; unsigned unnormalized:1; + unsigned texel_bias:1; unsigned width_height_idx:5; /**< texture unit */ unsigned is_array:1; unsigned sprite_texgen:1; -- cgit v1.2.3