Replace the flags Mesa was using for ctx->NewState with a new set
based on the GL attribute groups.

Introduced constants describing the circumstances under which some
key derived values can change:
	_SWRAST_NEW_RASTERMASK -- ctx->RasterMask
	_SWRAST_NEW_TRIANGLE   -- The software rasterizer's triangle
	                          function
	_DD_NEW_FEEDBACK -- the 'DD_FEEDBACK' bit in ctx->TriangleCaps

These are helpful in deciding whether you need to recalculate state if your
recalculation involves reference to a derived value.
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 6f46041..3268f55 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1,4 +1,4 @@
-/* $Id: context.c,v 1.98 2000/10/29 19:02:23 brianp Exp $ */
+/* $Id: context.c,v 1.99 2000/10/30 13:32:00 keithw Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -825,8 +825,6 @@
    gl_matrix_alloc_inv( &ctx->ProjectionMatrix );
 
    gl_matrix_ctr( &ctx->ModelProjectMatrix );
-   gl_matrix_ctr( &ctx->ModelProjectWinMatrix );
-   ctx->ModelProjectWinMatrixUptodate = GL_FALSE;
 
    ctx->ProjectionStackDepth = 0;
    ctx->NearFarStack[0][0] = 1.0; /* These values seem weird by make */
@@ -1338,7 +1336,7 @@
    _mesa_init_colortable(&ctx->ProxyPostColorMatrixColorTable);
 
    /* Miscellaneous */
-   ctx->NewState = NEW_ALL;
+   ctx->NewState = _NEW_ALL;
    ctx->RenderMode = GL_RENDER;
    ctx->StippleCounter = 0;
    ctx->NeedNormals = GL_FALSE;
@@ -1836,6 +1834,9 @@
    if (mask & GL_VIEWPORT_BIT) {
       MEMCPY( &dst->Viewport, &src->Viewport, sizeof(struct gl_viewport_attrib) );
    }
+   /* XXX FIXME:  Call callbacks?
+    */
+   dst->NewState = _NEW_ALL;
 }
 
 
@@ -1896,7 +1897,7 @@
       /* TODO: check if newCtx and buffer's visual match??? */
       newCtx->DrawBuffer = drawBuffer;
       newCtx->ReadBuffer = readBuffer;
-      newCtx->NewState = NEW_ALL;   /* just to be safe */
+      newCtx->NewState |= _NEW_BUFFERS;
       gl_update_state( newCtx );
    }