From: Brian Paul Date: Wed, 18 Mar 2009 21:39:11 +0000 (-0600) Subject: mesa: use the IROUND() macro in pixel packing code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a577471c546732419908893b481948feac5b7241;p=mesa.git 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. --- diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 804e840820d..fa3149d56da 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