From 212f3a6cb3cb49127a6e5588553fe2d327f46563 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 13 Jan 2010 09:29:43 -0700 Subject: llvmpipe: tweak subpixel_snap() arithmetic This adjustment fixes some rasterization differences between llvmpipe and softpipe (and other renderers). --- src/gallium/drivers/llvmpipe/lp_setup_tri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/drivers/llvmpipe') diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index 9248125de8b..575265b0f50 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -237,7 +237,7 @@ static void setup_tri_coefficients( struct setup_context *setup, static inline int subpixel_snap( float a ) { - return util_iround(FIXED_ONE * a); + return util_iround(FIXED_ONE * a - (FIXED_ONE / 2)); } -- cgit v1.2.3