diff options
author | marha <marha@users.sourceforge.net> | 2012-09-06 08:48:23 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-09-06 08:48:23 +0200 |
commit | aa10a08696cae93799fcddae3f0245ceee905e01 (patch) | |
tree | 950730c362229584b5e60fc1fe309325b7ba66b1 /mesalib/src/mesa/main/texstore.c | |
parent | af1e359cc622a0c53d5632fb03ef9bd4c17de897 (diff) | |
download | vcxsrv-aa10a08696cae93799fcddae3f0245ceee905e01.tar.gz vcxsrv-aa10a08696cae93799fcddae3f0245ceee905e01.tar.bz2 vcxsrv-aa10a08696cae93799fcddae3f0245ceee905e01.zip |
xserver mesa git update 6 sep 2012
Diffstat (limited to 'mesalib/src/mesa/main/texstore.c')
-rw-r--r-- | mesalib/src/mesa/main/texstore.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c index 18429f581..2d055808e 100644 --- a/mesalib/src/mesa/main/texstore.c +++ b/mesalib/src/mesa/main/texstore.c @@ -354,7 +354,7 @@ _mesa_make_temp_float_image(struct gl_context *ctx, GLuint dims, textureBaseFormat == GL_INTENSITY || textureBaseFormat == GL_DEPTH_COMPONENT); - tempImage = (GLfloat *) malloc(srcWidth * srcHeight * srcDepth + tempImage = malloc(srcWidth * srcHeight * srcDepth * components * sizeof(GLfloat)); if (!tempImage) return NULL; @@ -392,7 +392,7 @@ _mesa_make_temp_float_image(struct gl_context *ctx, GLuint dims, */ ASSERT(texComponents >= logComponents); - newImage = (GLfloat *) malloc(srcWidth * srcHeight * srcDepth + newImage = malloc(srcWidth * srcHeight * srcDepth * texComponents * sizeof(GLfloat)); if (!newImage) { free(tempImage); @@ -463,7 +463,7 @@ make_temp_uint_image(struct gl_context *ctx, GLuint dims, textureBaseFormat == GL_INTENSITY || textureBaseFormat == GL_ALPHA); - tempImage = (GLuint *) malloc(srcWidth * srcHeight * srcDepth + tempImage = malloc(srcWidth * srcHeight * srcDepth * components * sizeof(GLuint)); if (!tempImage) return NULL; @@ -501,7 +501,7 @@ make_temp_uint_image(struct gl_context *ctx, GLuint dims, */ ASSERT(texComponents >= logComponents); - newImage = (GLuint *) malloc(srcWidth * srcHeight * srcDepth + newImage = malloc(srcWidth * srcHeight * srcDepth * texComponents * sizeof(GLuint)); if (!newImage) { free(tempImage); @@ -591,7 +591,7 @@ _mesa_make_temp_ubyte_image(struct gl_context *ctx, GLuint dims, textureBaseFormat == GL_INTENSITY); /* unpack and transfer the source image */ - tempImage = (GLubyte *) malloc(srcWidth * srcHeight * srcDepth + tempImage = malloc(srcWidth * srcHeight * srcDepth * components * sizeof(GLubyte)); if (!tempImage) { return NULL; @@ -632,7 +632,7 @@ _mesa_make_temp_ubyte_image(struct gl_context *ctx, GLuint dims, */ ASSERT(texComponents >= logComponents); - newImage = (GLubyte *) malloc(srcWidth * srcHeight * srcDepth + newImage = malloc(srcWidth * srcHeight * srcDepth * texComponents * sizeof(GLubyte)); if (!newImage) { free(tempImage); @@ -2393,7 +2393,7 @@ _mesa_texstore_dudv8(TEXSTORE_PARAMS) GLbyte *tempImage, *dst, *src; GLint row; - tempImage = (GLbyte *) malloc(srcWidth * srcHeight * srcDepth + tempImage = malloc(srcWidth * srcHeight * srcDepth * components * sizeof(GLbyte)); if (!tempImage) return GL_FALSE; @@ -2797,8 +2797,8 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS) } else if (srcFormat == GL_DEPTH_COMPONENT || srcFormat == GL_STENCIL_INDEX) { - GLuint *depth = (GLuint *) malloc(srcWidth * sizeof(GLuint)); - GLubyte *stencil = (GLubyte *) malloc(srcWidth * sizeof(GLubyte)); + GLuint *depth = malloc(srcWidth * sizeof(GLuint)); + GLubyte *stencil = malloc(srcWidth * sizeof(GLubyte)); if (!depth || !stencil) { free(depth); @@ -2880,8 +2880,8 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS) ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || srcType == GL_UNSIGNED_INT_24_8_EXT); - depth = (GLuint *) malloc(srcWidth * sizeof(GLuint)); - stencil = (GLubyte *) malloc(srcWidth * sizeof(GLubyte)); + depth = malloc(srcWidth * sizeof(GLuint)); + stencil = malloc(srcWidth * sizeof(GLubyte)); if (!depth || !stencil) { free(depth); @@ -2967,7 +2967,7 @@ _mesa_texstore_s8(TEXSTORE_PARAMS) const GLint srcRowStride = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType); GLint img, row; - GLubyte *stencil = (GLubyte *) malloc(srcWidth * sizeof(GLubyte)); + GLubyte *stencil = malloc(srcWidth * sizeof(GLubyte)); if (!stencil) return GL_FALSE; |