new comments and assertions

This commit is contained in:
Brian Paul 2004-11-27 22:44:35 +00:00
parent 29926a11b1
commit 118a8bad73
4 changed files with 7 additions and 2 deletions

View File

@ -70,6 +70,8 @@ _swrast_alloc_accum_buffer( GLframebuffer *buffer )
GET_CURRENT_CONTEXT(ctx);
GLint n;
ASSERT(buffer->UseSoftwareAccumBuffer);
if (buffer->Accum) {
MESA_PBUFFER_FREE( buffer->Accum );
buffer->Accum = NULL;

View File

@ -41,6 +41,8 @@ _swrast_alloc_aux_buffers( GLframebuffer *buffer )
{
GLint i;
ASSERT(buffer->UseSoftwareAuxBuffers);
for (i = 0; i < buffer->Visual.numAuxBuffers; i++) {
if (buffer->AuxBuffers[i]) {
_mesa_free(buffer->AuxBuffers[i]);

View File

@ -1620,8 +1620,7 @@ _swrast_read_depth_span_float( GLcontext *ctx,
/**
* Allocate a new depth buffer. If there's already a depth buffer allocated
* it will be free()'d. The new depth buffer will be uniniitalized.
* This function is only called through Driver.alloc_depth_buffer.
* it will be free()'d. The new depth buffer will be uninitialized.
*/
void
_swrast_alloc_depth_buffer( GLframebuffer *buffer )

View File

@ -1127,6 +1127,8 @@ _swrast_write_stencil_span( GLcontext *ctx, GLint n, GLint x, GLint y,
void
_swrast_alloc_stencil_buffer( GLframebuffer *buffer )
{
ASSERT(buffer->UseSoftwareStencilBuffer);
/* deallocate current stencil buffer if present */
if (buffer->Stencil) {
MESA_PBUFFER_FREE(buffer->Stencil);