aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/pixeltransfer.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-05-21 09:28:15 +0200
committermarha <marha@users.sourceforge.net>2012-05-21 09:28:15 +0200
commitd4b066581bc9a4bf7b0a5ffa11ff0adb47d2075c (patch)
treedb56fe01d61a824e4bd975cbf8603b11e9c5ecdf /mesalib/src/mesa/main/pixeltransfer.c
parentd2dacc6bc44f7dc245dee6e66723013afb49cfb5 (diff)
parentf543ceaca6820260f15a4eff86938214cf43c7d2 (diff)
downloadvcxsrv-d4b066581bc9a4bf7b0a5ffa11ff0adb47d2075c.tar.gz
vcxsrv-d4b066581bc9a4bf7b0a5ffa11ff0adb47d2075c.tar.bz2
vcxsrv-d4b066581bc9a4bf7b0a5ffa11ff0adb47d2075c.zip
Merge remote-tracking branch 'origin/released'
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]);
}
}
}