summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-11-27 22:44:35 +0000
committerBrian Paul <[email protected]>2004-11-27 22:44:35 +0000
commit118a8bad73bda88fc54f802b2beeb687c8ddb45a (patch)
tree7878fb4d61acdd86618d39d2e0cdb03cb51a5534 /src/mesa/swrast
parent29926a11b16ec7a235947d95e9a46777605dd30e (diff)
new comments and assertions
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_accum.c2
-rw-r--r--src/mesa/swrast/s_auxbuffer.c2
-rw-r--r--src/mesa/swrast/s_depth.c3
-rw-r--r--src/mesa/swrast/s_stencil.c2
4 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c
index d20622e671a..55ba8310590 100644
--- a/src/mesa/swrast/s_accum.c
+++ b/src/mesa/swrast/s_accum.c
@@ -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;
diff --git a/src/mesa/swrast/s_auxbuffer.c b/src/mesa/swrast/s_auxbuffer.c
index 5d58c106852..b2224c8884b 100644
--- a/src/mesa/swrast/s_auxbuffer.c
+++ b/src/mesa/swrast/s_auxbuffer.c
@@ -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]);
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 34897ba931b..0142fe15520 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -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 )
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index 4c7ddb86cd9..38182ad613b 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -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);