From: Brian Paul Date: Wed, 13 Jan 2010 16:29:43 +0000 (-0700) Subject: llvmpipe: tweak subpixel_snap() arithmetic X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=212f3a6cb3cb49127a6e5588553fe2d327f46563;p=mesa.git llvmpipe: tweak subpixel_snap() arithmetic This adjustment fixes some rasterization differences between llvmpipe and softpipe (and other renderers). --- 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)); }