From a577471c546732419908893b481948feac5b7241 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 18 Mar 2009 15:39:11 -0600 Subject: mesa: use the IROUND() macro in pixel packing code It turns out some tests are sensitive to rounding vs. truncating when converting float color values to integers in glReadPixels(). In particular, this matters when the destination format is 5/6/5 or 4/4/4/4, etc. --- src/mesa/main/image.c | 216 +++++++++++++++++++++++++------------------------- 1 file changed, 108 insertions(+), 108 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 804e840820..fa3149d56d 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -2378,9 +2378,9 @@ _mesa_pack_rgba_span_float(GLcontext *ctx, GLuint n, GLfloat rgba[][4], if (dstFormat == GL_RGB) { GLubyte *dst = (GLubyte *) dstAddr; for (i=0;i