From aa10a08696cae93799fcddae3f0245ceee905e01 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 6 Sep 2012 08:48:23 +0200 Subject: xserver mesa git update 6 sep 2012 --- mesalib/src/mesa/tnl/t_context.c | 2 +- mesalib/src/mesa/tnl/t_vb_program.c | 2 +- mesalib/src/mesa/tnl/t_vb_texgen.c | 8 ++++---- mesalib/src/mesa/tnl/t_vb_vertex.c | 2 +- mesalib/src/mesa/tnl/t_vertex.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'mesalib/src/mesa/tnl') diff --git a/mesalib/src/mesa/tnl/t_context.c b/mesalib/src/mesa/tnl/t_context.c index aa6783932..df3a11666 100644 --- a/mesalib/src/mesa/tnl/t_context.c +++ b/mesalib/src/mesa/tnl/t_context.c @@ -50,7 +50,7 @@ _tnl_CreateContext( struct gl_context *ctx ) /* Create the TNLcontext structure */ - ctx->swtnl_context = tnl = (TNLcontext *) calloc(1, sizeof(TNLcontext)); + ctx->swtnl_context = tnl = calloc(1, sizeof(TNLcontext)); if (!tnl) { return GL_FALSE; diff --git a/mesalib/src/mesa/tnl/t_vb_program.c b/mesalib/src/mesa/tnl/t_vb_program.c index 271137f87..f2e76115e 100644 --- a/mesalib/src/mesa/tnl/t_vb_program.c +++ b/mesalib/src/mesa/tnl/t_vb_program.c @@ -521,7 +521,7 @@ init_vp(struct gl_context *ctx, struct tnl_pipeline_stage *stage) /* a few other misc allocations */ _mesa_vector4f_alloc( &store->ndcCoords, 0, size, 32 ); - store->clipmask = (GLubyte *) _mesa_align_malloc(sizeof(GLubyte)*size, 32 ); + store->clipmask = _mesa_align_malloc(sizeof(GLubyte)*size, 32 ); return GL_TRUE; } diff --git a/mesalib/src/mesa/tnl/t_vb_texgen.c b/mesalib/src/mesa/tnl/t_vb_texgen.c index c757ac522..8ba67f3c0 100644 --- a/mesalib/src/mesa/tnl/t_vb_texgen.c +++ b/mesalib/src/mesa/tnl/t_vb_texgen.c @@ -570,8 +570,8 @@ static GLboolean alloc_texgen_data( struct gl_context *ctx, for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++) _mesa_vector4f_alloc( &store->texcoord[i], 0, VB->Size, 32 ); - store->tmp_f = (GLfloat (*)[3]) malloc(VB->Size * sizeof(GLfloat) * 3); - store->tmp_m = (GLfloat *) malloc(VB->Size * sizeof(GLfloat)); + store->tmp_f = malloc(VB->Size * sizeof(GLfloat) * 3); + store->tmp_m = malloc(VB->Size * sizeof(GLfloat)); return GL_TRUE; } @@ -589,8 +589,8 @@ static void free_texgen_data( struct tnl_pipeline_stage *stage ) _mesa_vector4f_free( &store->texcoord[i] ); - if (store->tmp_f) free( store->tmp_f ); - if (store->tmp_m) free( store->tmp_m ); + free( store->tmp_f ); + free( store->tmp_m ); free( store ); stage->privatePtr = NULL; } diff --git a/mesalib/src/mesa/tnl/t_vb_vertex.c b/mesalib/src/mesa/tnl/t_vb_vertex.c index 64795a57e..8f296f54b 100644 --- a/mesalib/src/mesa/tnl/t_vb_vertex.c +++ b/mesalib/src/mesa/tnl/t_vb_vertex.c @@ -245,7 +245,7 @@ static GLboolean init_vertex_stage( struct gl_context *ctx, _mesa_vector4f_alloc( &store->clip, 0, size, 32 ); _mesa_vector4f_alloc( &store->proj, 0, size, 32 ); - store->clipmask = (GLubyte *) _mesa_align_malloc(sizeof(GLubyte)*size, 32 ); + store->clipmask = _mesa_align_malloc(sizeof(GLubyte)*size, 32 ); if (!store->clipmask || !store->eye.data || diff --git a/mesalib/src/mesa/tnl/t_vertex.c b/mesalib/src/mesa/tnl/t_vertex.c index 7e83d454d..ce3e32165 100644 --- a/mesalib/src/mesa/tnl/t_vertex.c +++ b/mesalib/src/mesa/tnl/t_vertex.c @@ -87,7 +87,7 @@ void _tnl_register_fastpath( struct tnl_clipspace *vtx, fastpath->attr_count = vtx->attr_count; fastpath->match_strides = match_strides; fastpath->func = vtx->emit; - fastpath->attr = (struct tnl_attr_type *) + fastpath->attr = malloc(vtx->attr_count * sizeof(fastpath->attr[0])); for (i = 0; i < vtx->attr_count; i++) { @@ -495,7 +495,7 @@ void _tnl_init_vertices( struct gl_context *ctx, if (max_vertex_size > vtx->max_vertex_size) { _tnl_free_vertices( ctx ); vtx->max_vertex_size = max_vertex_size; - vtx->vertex_buf = (GLubyte *)_mesa_align_calloc(vb_size * max_vertex_size, 32 ); + vtx->vertex_buf = _mesa_align_calloc(vb_size * max_vertex_size, 32 ); invalidate_funcs(vtx); } -- cgit v1.2.3