diff options
Diffstat (limited to 'src/mesa/main/pixeltransfer.c')
-rw-r--r-- | src/mesa/main/pixeltransfer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/main/pixeltransfer.c b/src/mesa/main/pixeltransfer.c index c6172b9fd40..fa355eb4a93 100644 --- a/src/mesa/main/pixeltransfer.c +++ b/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]); } } } |