Mesa (master): mesa: fix incorrect float vs. int values in a few places
Brian Paul
brianp at kemper.freedesktop.org
Thu Jan 12 20:07:03 UTC 2012
Module: Mesa
Branch: master
Commit: a240c998ac649d79f423bb0c445993132cd56f97
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a240c998ac649d79f423bb0c445993132cd56f97
Author: Brian Paul <brianp at vmware.com>
Date: Thu Jan 12 09:51:21 2012 -0700
mesa: fix incorrect float vs. int values in a few places
In the first case, the newImage[] array contains GLuint values.
In the second case, the parameter type is GLuint, but the maxDepth
value is never used in this case (GL_FLOAT_32_UNSIGNED_INT_24_8_REV).
Pass ~OU just to be safe.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <jfonseca at vmware.com>
---
src/mesa/main/texstore.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 512965f..a9c64ce 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -515,9 +515,9 @@ make_temp_uint_image(struct gl_context *ctx, GLuint dims,
for (k = 0; k < texComponents; k++) {
GLint j = map[k];
if (j == ZERO)
- newImage[i * texComponents + k] = 0.0F;
+ newImage[i * texComponents + k] = 0;
else if (j == ONE)
- newImage[i * texComponents + k] = 1.0F;
+ newImage[i * texComponents + k] = 1;
else
newImage[i * texComponents + k] = tempImage[i * logComponents + j];
}
@@ -4094,7 +4094,7 @@ _mesa_texstore_z32f_x24s8(TEXSTORE_PARAMS)
_mesa_unpack_depth_span(ctx, srcWidth,
GL_FLOAT_32_UNSIGNED_INT_24_8_REV, /* dst type */
dstRow, /* dst addr */
- 1.0f, srcType, src, srcPacking);
+ ~0U, srcType, src, srcPacking);
if (srcFormat != GL_DEPTH_COMPONENT)
_mesa_unpack_stencil_span(ctx, srcWidth,
More information about the mesa-commit
mailing list