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/swrast/s_context.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/swrast/s_context.c')
-rw-r--r-- | mesalib/src/mesa/swrast/s_context.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c index 53497bc9c..31a12dade 100644 --- a/mesalib/src/mesa/swrast/s_context.c +++ b/mesalib/src/mesa/swrast/s_context.c @@ -720,7 +720,7 @@ GLboolean _swrast_CreateContext( struct gl_context *ctx ) { GLuint i; - SWcontext *swrast = (SWcontext *) calloc(1, sizeof(SWcontext)); + SWcontext *swrast = calloc(1, sizeof(SWcontext)); #ifdef _OPENMP const GLuint maxThreads = omp_get_max_threads(); #else @@ -775,7 +775,7 @@ _swrast_CreateContext( struct gl_context *ctx ) * using multiple threads, it is necessary to have one SpanArrays instance * per thread. */ - swrast->SpanArrays = (SWspanarrays *) malloc(maxThreads * sizeof(SWspanarrays)); + swrast->SpanArrays = malloc(maxThreads * sizeof(SWspanarrays)); if (!swrast->SpanArrays) { free(swrast); return GL_FALSE; @@ -803,10 +803,10 @@ _swrast_CreateContext( struct gl_context *ctx ) ctx->swrast_context = swrast; - swrast->stencil_temp.buf1 = (GLubyte *) malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); - swrast->stencil_temp.buf2 = (GLubyte *) malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); - swrast->stencil_temp.buf3 = (GLubyte *) malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); - swrast->stencil_temp.buf4 = (GLubyte *) malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); + swrast->stencil_temp.buf1 = malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); + swrast->stencil_temp.buf2 = malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); + swrast->stencil_temp.buf3 = malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); + swrast->stencil_temp.buf4 = malloc(SWRAST_MAX_WIDTH * sizeof(GLubyte)); if (!swrast->stencil_temp.buf1 || !swrast->stencil_temp.buf2 || @@ -829,8 +829,7 @@ _swrast_DestroyContext( struct gl_context *ctx ) } free( swrast->SpanArrays ); - if (swrast->ZoomedArrays) - free( swrast->ZoomedArrays ); + free( swrast->ZoomedArrays ); free( swrast->TexelBuffer ); free(swrast->stencil_temp.buf1); |