aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/pixeltransfer.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-05-21 09:10:35 +0200
committermarha <marha@users.sourceforge.net>2012-05-21 09:10:35 +0200
commitf543ceaca6820260f15a4eff86938214cf43c7d2 (patch)
treed66901c0385bd008ba46600be695c500daa78c8f /mesalib/src/mesa/main/pixeltransfer.c
parent062c45ff0df6a52080dcd74433710d47127cbe29 (diff)
downloadvcxsrv-f543ceaca6820260f15a4eff86938214cf43c7d2.tar.gz
vcxsrv-f543ceaca6820260f15a4eff86938214cf43c7d2.tar.bz2
vcxsrv-f543ceaca6820260f15a4eff86938214cf43c7d2.zip
fontconfig mesa xkeyboard-config xserver pixman git update 21 Mar 2012
Diffstat (limited to 'mesalib/src/mesa/main/pixeltransfer.c')
-rw-r--r--mesalib/src/mesa/main/pixeltransfer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mesalib/src/mesa/main/pixeltransfer.c b/mesalib/src/mesa/main/pixeltransfer.c
index c6172b9fd..fa355eb4a 100644
--- a/mesalib/src/mesa/main/pixeltransfer.c
+++ b/mesalib/src/mesa/main/pixeltransfer.c
@@ -93,10 +93,10 @@ _mesa_map_rgba( const struct gl_context *ctx, GLuint n, GLfloat rgba[][4] )
GLfloat g = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F);
GLfloat b = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F);
GLfloat a = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F);
- rgba[i][RCOMP] = rMap[IROUND(r * rscale)];
- rgba[i][GCOMP] = gMap[IROUND(g * gscale)];
- rgba[i][BCOMP] = bMap[IROUND(b * bscale)];
- rgba[i][ACOMP] = aMap[IROUND(a * ascale)];
+ rgba[i][RCOMP] = rMap[F_TO_I(r * rscale)];
+ rgba[i][GCOMP] = gMap[F_TO_I(g * gscale)];
+ rgba[i][BCOMP] = bMap[F_TO_I(b * bscale)];
+ rgba[i][ACOMP] = aMap[F_TO_I(a * ascale)];
}
}
@@ -235,7 +235,7 @@ _mesa_apply_ci_transfer_ops(const struct gl_context *ctx,
GLuint i;
for (i = 0; i < n; i++) {
const GLuint j = indexes[i] & mask;
- indexes[i] = IROUND(ctx->PixelMaps.ItoI.Map[j]);
+ indexes[i] = F_TO_I(ctx->PixelMaps.ItoI.Map[j]);
}
}
}