aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/swrast')
-rw-r--r--mesalib/src/mesa/swrast/s_context.c14
-rw-r--r--mesalib/src/mesa/swrast/s_renderbuffer.c2
-rw-r--r--mesalib/src/mesa/swrast/s_texcombine.c2
-rw-r--r--mesalib/src/mesa/swrast/s_zoom.c2
4 files changed, 10 insertions, 10 deletions
diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c
index 4ed7b94c7..53497bc9c 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(sizeof(SWcontext));
+ SWcontext *swrast = (SWcontext *) calloc(1, sizeof(SWcontext));
#ifdef _OPENMP
const GLuint maxThreads = omp_get_max_threads();
#else
@@ -775,9 +775,9 @@ _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 = (SWspanarrays *) malloc(maxThreads * sizeof(SWspanarrays));
if (!swrast->SpanArrays) {
- FREE(swrast);
+ free(swrast);
return GL_FALSE;
}
for(i = 0; i < maxThreads; i++) {
@@ -828,17 +828,17 @@ _swrast_DestroyContext( struct gl_context *ctx )
_mesa_debug(ctx, "_swrast_DestroyContext\n");
}
- FREE( swrast->SpanArrays );
+ free( swrast->SpanArrays );
if (swrast->ZoomedArrays)
- FREE( swrast->ZoomedArrays );
- FREE( swrast->TexelBuffer );
+ free( swrast->ZoomedArrays );
+ free( swrast->TexelBuffer );
free(swrast->stencil_temp.buf1);
free(swrast->stencil_temp.buf2);
free(swrast->stencil_temp.buf3);
free(swrast->stencil_temp.buf4);
- FREE( swrast );
+ free( swrast );
ctx->swrast_context = 0;
}
diff --git a/mesalib/src/mesa/swrast/s_renderbuffer.c b/mesalib/src/mesa/swrast/s_renderbuffer.c
index d8a7467b0..e468bdb16 100644
--- a/mesalib/src/mesa/swrast/s_renderbuffer.c
+++ b/mesalib/src/mesa/swrast/s_renderbuffer.c
@@ -174,7 +174,7 @@ soft_renderbuffer_delete(struct gl_renderbuffer *rb)
free(srb->Buffer);
srb->Buffer = NULL;
}
- free(srb);
+ _mesa_delete_renderbuffer(rb);
}
diff --git a/mesalib/src/mesa/swrast/s_texcombine.c b/mesalib/src/mesa/swrast/s_texcombine.c
index 2a323613e..9c745d118 100644
--- a/mesalib/src/mesa/swrast/s_texcombine.c
+++ b/mesalib/src/mesa/swrast/s_texcombine.c
@@ -611,7 +611,7 @@ _swrast_texture_span( struct gl_context *ctx, SWspan *span )
* thread.
*/
swrast->TexelBuffer =
- (GLfloat *) MALLOC(ctx->Const.MaxTextureImageUnits * maxThreads *
+ (GLfloat *) malloc(ctx->Const.MaxTextureImageUnits * maxThreads *
SWRAST_MAX_WIDTH * 4 * sizeof(GLfloat));
if (!swrast->TexelBuffer) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "texture_combine");
diff --git a/mesalib/src/mesa/swrast/s_zoom.c b/mesalib/src/mesa/swrast/s_zoom.c
index 768bbbafd..9304002d2 100644
--- a/mesalib/src/mesa/swrast/s_zoom.c
+++ b/mesalib/src/mesa/swrast/s_zoom.c
@@ -143,7 +143,7 @@ zoom_span( struct gl_context *ctx, GLint imgX, GLint imgY, const SWspan *span,
if (!swrast->ZoomedArrays) {
/* allocate on demand */
- swrast->ZoomedArrays = (SWspanarrays *) CALLOC(sizeof(SWspanarrays));
+ swrast->ZoomedArrays = (SWspanarrays *) calloc(1, sizeof(SWspanarrays));
if (!swrast->ZoomedArrays)
return;
}