aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/debug.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-09-06 08:48:23 +0200
committermarha <marha@users.sourceforge.net>2012-09-06 08:48:23 +0200
commitaa10a08696cae93799fcddae3f0245ceee905e01 (patch)
tree950730c362229584b5e60fc1fe309325b7ba66b1 /mesalib/src/mesa/main/debug.c
parentaf1e359cc622a0c53d5632fb03ef9bd4c17de897 (diff)
downloadvcxsrv-aa10a08696cae93799fcddae3f0245ceee905e01.tar.gz
vcxsrv-aa10a08696cae93799fcddae3f0245ceee905e01.tar.bz2
vcxsrv-aa10a08696cae93799fcddae3f0245ceee905e01.zip
xserver mesa git update 6 sep 2012
Diffstat (limited to 'mesalib/src/mesa/main/debug.c')
-rw-r--r--mesalib/src/mesa/main/debug.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/mesalib/src/mesa/main/debug.c b/mesalib/src/mesa/main/debug.c
index 62b8e00c1..aee8ae2dc 100644
--- a/mesalib/src/mesa/main/debug.c
+++ b/mesalib/src/mesa/main/debug.c
@@ -283,7 +283,7 @@ write_texture_image(struct gl_texture_object *texObj,
GLubyte *buffer;
char s[100];
- buffer = (GLubyte *) malloc(img->Width * img->Height
+ buffer = malloc(img->Width * img->Height
* img->Depth * 4);
store = ctx->Pack; /* save */
@@ -332,7 +332,7 @@ _mesa_write_renderbuffer_image(const struct gl_renderbuffer *rb)
return;
}
- buffer = (GLubyte *) malloc(rb->Width * rb->Height * 4);
+ buffer = malloc(rb->Width * rb->Height * 4);
ctx->Driver.ReadPixels(ctx, 0, 0, rb->Width, rb->Height,
format, type, &ctx->DefaultPacking, buffer);
@@ -466,7 +466,7 @@ _mesa_dump_color_buffer(const char *filename)
const GLuint h = ctx->DrawBuffer->Height;
GLubyte *buf;
- buf = (GLubyte *) malloc(w * h * 4);
+ buf = malloc(w * h * 4);
_mesa_PushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
_mesa_PixelStorei(GL_PACK_ALIGNMENT, 1);
@@ -498,8 +498,8 @@ _mesa_dump_depth_buffer(const char *filename)
GLubyte *buf2;
GLuint i;
- buf = (GLuint *) malloc(w * h * 4); /* 4 bpp */
- buf2 = (GLubyte *) malloc(w * h * 3); /* 3 bpp */
+ buf = malloc(w * h * 4); /* 4 bpp */
+ buf2 = malloc(w * h * 3); /* 3 bpp */
_mesa_PushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
_mesa_PixelStorei(GL_PACK_ALIGNMENT, 1);
@@ -534,8 +534,8 @@ _mesa_dump_stencil_buffer(const char *filename)
GLubyte *buf2;
GLuint i;
- buf = (GLubyte *) malloc(w * h); /* 1 bpp */
- buf2 = (GLubyte *) malloc(w * h * 3); /* 3 bpp */
+ buf = malloc(w * h); /* 1 bpp */
+ buf2 = malloc(w * h * 3); /* 3 bpp */
_mesa_PushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
_mesa_PixelStorei(GL_PACK_ALIGNMENT, 1);
@@ -579,7 +579,7 @@ _mesa_dump_image(const char *filename, const void *image, GLuint w, GLuint h,
}
else if (format == GL_RGBA && type == GL_FLOAT) {
/* convert floats to ubyte */
- GLubyte *buf = (GLubyte *) malloc(w * h * 4 * sizeof(GLubyte));
+ GLubyte *buf = malloc(w * h * 4 * sizeof(GLubyte));
const GLfloat *f = (const GLfloat *) image;
GLuint i;
for (i = 0; i < w * h * 4; i++) {
@@ -590,7 +590,7 @@ _mesa_dump_image(const char *filename, const void *image, GLuint w, GLuint h,
}
else if (format == GL_RED && type == GL_FLOAT) {
/* convert floats to ubyte */
- GLubyte *buf = (GLubyte *) malloc(w * h * sizeof(GLubyte));
+ GLubyte *buf = malloc(w * h * sizeof(GLubyte));
const GLfloat *f = (const GLfloat *) image;
GLuint i;
for (i = 0; i < w * h; i++) {