diff options
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_accum.c | 6 | ||||
-rw-r--r-- | src/mesa/swrast/s_alphabuf.c | 18 | ||||
-rw-r--r-- | src/mesa/swrast/s_depth.c | 7 | ||||
-rw-r--r-- | src/mesa/swrast/s_stencil.c | 8 |
4 files changed, 20 insertions, 19 deletions
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c index faf8313d4d..be5c4b4a13 100644 --- a/src/mesa/swrast/s_accum.c +++ b/src/mesa/swrast/s_accum.c @@ -1,4 +1,4 @@ -/* $Id: s_accum.c,v 1.15 2002/03/16 00:53:15 brianp Exp $ */ +/* $Id: s_accum.c,v 1.16 2002/03/19 16:47:05 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -74,13 +74,13 @@ _mesa_alloc_accum_buffer( GLframebuffer *buffer ) GLint n; if (buffer->Accum) { - FREE( buffer->Accum ); + MESA_PBUFFER_FREE( buffer->Accum ); buffer->Accum = NULL; } /* allocate accumulation buffer if not already present */ n = buffer->Width * buffer->Height * 4 * sizeof(GLaccum); - buffer->Accum = (GLaccum *) MALLOC( n ); + buffer->Accum = (GLaccum *) MESA_PBUFFER_ALLOC( n ); if (!buffer->Accum) { /* unable to setup accumulation buffer */ _mesa_error( NULL, GL_OUT_OF_MEMORY, "glAccum" ); diff --git a/src/mesa/swrast/s_alphabuf.c b/src/mesa/swrast/s_alphabuf.c index 2b7c4f7de2..56c4d552da 100644 --- a/src/mesa/swrast/s_alphabuf.c +++ b/src/mesa/swrast/s_alphabuf.c @@ -1,4 +1,4 @@ -/* $Id: s_alphabuf.c,v 1.9 2002/03/16 00:53:15 brianp Exp $ */ +/* $Id: s_alphabuf.c,v 1.10 2002/03/19 16:47:05 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -57,9 +57,9 @@ _mesa_alloc_alpha_buffers( GLframebuffer *buffer ) ASSERT(buffer->UseSoftwareAlphaBuffers); if (buffer->FrontLeftAlpha) { - FREE( buffer->FrontLeftAlpha ); + MESA_PBUFFER_FREE( buffer->FrontLeftAlpha ); } - buffer->FrontLeftAlpha = (GLchan *) MALLOC( bytes ); + buffer->FrontLeftAlpha = (GLchan *) MESA_PBUFFER_ALLOC( bytes ); if (!buffer->FrontLeftAlpha) { /* out of memory */ _mesa_error( NULL, GL_OUT_OF_MEMORY, @@ -68,9 +68,9 @@ _mesa_alloc_alpha_buffers( GLframebuffer *buffer ) if (buffer->Visual.doubleBufferMode) { if (buffer->BackLeftAlpha) { - FREE( buffer->BackLeftAlpha ); + MESA_PBUFFER_FREE( buffer->BackLeftAlpha ); } - buffer->BackLeftAlpha = (GLchan *) MALLOC( bytes ); + buffer->BackLeftAlpha = (GLchan *) MESA_PBUFFER_ALLOC( bytes ); if (!buffer->BackLeftAlpha) { /* out of memory */ _mesa_error( NULL, GL_OUT_OF_MEMORY, @@ -80,9 +80,9 @@ _mesa_alloc_alpha_buffers( GLframebuffer *buffer ) if (buffer->Visual.stereoMode) { if (buffer->FrontRightAlpha) { - FREE( buffer->FrontRightAlpha ); + MESA_PBUFFER_FREE( buffer->FrontRightAlpha ); } - buffer->FrontRightAlpha = (GLchan *) MALLOC( bytes ); + buffer->FrontRightAlpha = (GLchan *) MESA_PBUFFER_ALLOC( bytes ); if (!buffer->FrontRightAlpha) { /* out of memory */ _mesa_error( NULL, GL_OUT_OF_MEMORY, @@ -91,9 +91,9 @@ _mesa_alloc_alpha_buffers( GLframebuffer *buffer ) if (buffer->Visual.doubleBufferMode) { if (buffer->BackRightAlpha) { - FREE( buffer->BackRightAlpha ); + MESA_PBUFFER_FREE( buffer->BackRightAlpha ); } - buffer->BackRightAlpha = (GLchan *) MALLOC( bytes ); + buffer->BackRightAlpha = (GLchan *) MESA_PBUFFER_ALLOC( bytes ); if (!buffer->BackRightAlpha) { /* out of memory */ _mesa_error( NULL, GL_OUT_OF_MEMORY, diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c index cadb0ecd10..81647f9fc9 100644 --- a/src/mesa/swrast/s_depth.c +++ b/src/mesa/swrast/s_depth.c @@ -1,4 +1,4 @@ -/* $Id: s_depth.c,v 1.18 2002/03/16 00:53:15 brianp Exp $ */ +/* $Id: s_depth.c,v 1.19 2002/03/19 16:47:05 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1521,7 +1521,7 @@ _mesa_alloc_depth_buffer( GLframebuffer *buffer ) /* deallocate current depth buffer if present */ if (buffer->DepthBuffer) { - FREE(buffer->DepthBuffer); + MESA_PBUFFER_FREE(buffer->DepthBuffer); buffer->DepthBuffer = NULL; } @@ -1531,7 +1531,8 @@ _mesa_alloc_depth_buffer( GLframebuffer *buffer ) else bytesPerValue = sizeof(GLuint); - buffer->DepthBuffer =MALLOC(buffer->Width * buffer->Height * bytesPerValue); + buffer->DepthBuffer = MESA_PBUFFER_ALLOC(buffer->Width * buffer->Height + * bytesPerValue); if (!buffer->DepthBuffer) { /* out of memory */ diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index 6d62b65fd5..04e0997177 100644 --- a/src/mesa/swrast/s_stencil.c +++ b/src/mesa/swrast/s_stencil.c @@ -1,4 +1,4 @@ -/* $Id: s_stencil.c,v 1.21 2002/03/16 00:53:15 brianp Exp $ */ +/* $Id: s_stencil.c,v 1.22 2002/03/19 16:47:05 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1116,13 +1116,13 @@ _mesa_alloc_stencil_buffer( GLframebuffer *buffer ) { /* deallocate current stencil buffer if present */ if (buffer->Stencil) { - FREE(buffer->Stencil); + MESA_PBUFFER_FREE(buffer->Stencil); buffer->Stencil = NULL; } /* allocate new stencil buffer */ - buffer->Stencil = (GLstencil *) MALLOC(buffer->Width * buffer->Height - * sizeof(GLstencil)); + buffer->Stencil = (GLstencil *) + MESA_PBUFFER_ALLOC(buffer->Width * buffer->Height * sizeof(GLstencil)); if (!buffer->Stencil) { /* out of memory */ _mesa_error( NULL, GL_OUT_OF_MEMORY, "_mesa_alloc_stencil_buffer" ); |