new comments and assertions
authorBrian Paul <brian.paul@tungstengraphics.com>
Sat, 27 Nov 2004 22:44:35 +0000 (22:44 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sat, 27 Nov 2004 22:44:35 +0000 (22:44 +0000)
src/mesa/swrast/s_accum.c
src/mesa/swrast/s_auxbuffer.c
src/mesa/swrast/s_depth.c
src/mesa/swrast/s_stencil.c

index d20622e671a715ad7812b417007c5e9434260976..55ba831059058f7da03aeab693b5fc61b95244fb 100644 (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;
index 5d58c106852c2b10751a307f84a91a3c2050b167..b2224c8884bfd603647f442fb20e7eacd67d9eca 100644 (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]);
index 34897ba931b17bf6c7b048e44ec8f9b2dcbb46ea..0142fe15520375ff227677cba962916f80397a72 100644 (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 )
index 4c7ddb86cd9023c871fba382c6b04877bc810bad..38182ad613bd1da5da03934033e2b8b3ed5d77f4 100644 (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);