updated assertions (see bug 4590)
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 28 Sep 2005 14:20:06 +0000 (14:20 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 28 Sep 2005 14:20:06 +0000 (14:20 +0000)
src/mesa/drivers/dri/savage/savage_xmesa.c

index bf8ec304f7979aefd2c9339a4a104491c4300432..53415d535b52e4c9154db0188b8ebd27c6d2a531 100644 (file)
@@ -631,6 +631,7 @@ savageCreateBuffer( __DRIscreenPrivate *driScrnPriv,
                                  screen->frontOffset, screen->aperturePitch,
                                  driDrawPriv);
          savageSetSpanFunctions(frontRb, mesaVis, float_depth);
+         assert(frontRb->Base.Data);
          _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &frontRb->Base);
       }
 
@@ -643,6 +644,7 @@ savageCreateBuffer( __DRIscreenPrivate *driScrnPriv,
                                  screen->backOffset, screen->aperturePitch,
                                  driDrawPriv);
          savageSetSpanFunctions(backRb, mesaVis, float_depth);
+         assert(backRb->Base.Data);
          _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &backRb->Base);
       }
 
@@ -831,7 +833,9 @@ savageMakeCurrent(__DRIcontextPrivate *driContextPriv,
          drawBuffer->Attachment[BUFFER_BACK_LEFT].Renderbuffer;
 
       assert(frontRb->Base.Data);
-      assert(backRb->Base.Data);
+      if (imesa->glCtx->Visual.doubleBufferMode) {
+         assert(backRb->Base.Data);
+      }
 
       imesa->driReadable = driReadPriv;
       imesa->driDrawable = driDrawPriv;