aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_drawpixels.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawpixels.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
index 9f1b427a9..b2c6327a0 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -875,8 +875,8 @@ draw_stencil_pixels(struct gl_context *ctx, GLint x, GLint y,
pixels = _mesa_map_pbo_source(ctx, &clippedUnpack, pixels);
assert(pixels);
- sValues = (GLubyte *) malloc(width * sizeof(GLubyte));
- zValues = (GLuint *) malloc(width * sizeof(GLuint));
+ sValues = malloc(width * sizeof(GLubyte));
+ zValues = malloc(width * sizeof(GLuint));
if (sValues && zValues) {
GLint row;
@@ -1598,7 +1598,7 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
/* copy image from ptRead surface to ptTex surface */
if (type == GL_COLOR) {
/* alternate path using get/put_tile() */
- GLfloat *buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
+ GLfloat *buf = malloc(width * height * 4 * sizeof(GLfloat));
enum pipe_format readFormat, drawFormat;
readFormat = util_format_linear(rbRead->texture->format);
drawFormat = util_format_linear(pt->format);
@@ -1610,7 +1610,7 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
}
else {
/* GL_DEPTH */
- GLuint *buf = (GLuint *) malloc(width * height * sizeof(GLuint));
+ GLuint *buf = malloc(width * height * sizeof(GLuint));
pipe_get_tile_z(pipe, ptRead, 0, 0, readW, readH, buf);
pipe_put_tile_z(pipe, ptTex, pack.SkipPixels, pack.SkipRows,
readW, readH, buf);