summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-09-08 22:07:29 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-09-08 22:07:29 +0000
commit399ae35ac64bd02a294d5db894b70def4eed0aa8 (patch)
tree0498950aa0c62caf988123fe78326343ab8aad98
parent9d3e5db9fc17643e8dfe0f85d38bf5718aca9b97 (diff)
removed unused NEW_DRVSTATE flags
-rw-r--r--src/mesa/drivers/glide/fxdd.c1
-rw-r--r--src/mesa/main/state.c78
2 files changed, 34 insertions, 45 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index 1295d6011a..a560fefa69 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -831,7 +831,6 @@ int fxDDInitFxMesaContext( fxMesaContext fxMesa )
fxMesa->glCtx->Const.MaxTextureLevels=9;
fxMesa->glCtx->Const.MaxTextureSize=256;
fxMesa->glCtx->Const.MaxTextureUnits=fxMesa->emulateTwoTMUs ? 2 : 1;
- fxMesa->glCtx->NewState|=NEW_DRVSTATE1;
fxMesa->new_state = NEW_ALL;
fxDDSetupInit();
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 9d95264cbe..dcc3bd1b6e 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -1,4 +1,4 @@
-/* $Id: state.c,v 1.26 2000/09/08 21:44:55 brianp Exp $ */
+/* $Id: state.c,v 1.27 2000/09/08 22:07:29 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -762,17 +762,13 @@ static void update_rasterflags( GLcontext *ctx )
void gl_print_state( const char *msg, GLuint state )
{
fprintf(stderr,
- "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
+ "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
msg,
state,
(state & NEW_LIGHTING) ? "lighting, " : "",
(state & NEW_RASTER_OPS) ? "raster-ops, " : "",
(state & NEW_TEXTURING) ? "texturing, " : "",
(state & NEW_POLYGON) ? "polygon, " : "",
- (state & NEW_DRVSTATE0) ? "driver-0, " : "",
- (state & NEW_DRVSTATE1) ? "driver-1, " : "",
- (state & NEW_DRVSTATE2) ? "driver-2, " : "",
- (state & NEW_DRVSTATE3) ? "driver-3, " : "",
(state & NEW_MODELVIEW) ? "modelview, " : "",
(state & NEW_PROJECTION) ? "projection, " : "",
(state & NEW_TEXTURE_MATRIX) ? "texture-matrix, " : "",
@@ -880,40 +876,40 @@ void gl_update_state( GLcontext *ctx )
ctx->NeedNormals = (ctx->Light.Enabled || ctx->Texture.NeedNormals);
}
- if (ctx->NewState & (NEW_RASTER_OPS | NEW_LIGHTING | NEW_FOG | NEW_TEXTURE_ENABLE)) {
-
- if (ctx->NewState & (NEW_RASTER_OPS | NEW_TEXTURE_ENABLE)) {
- update_fog_mode(ctx);
- update_rasterflags(ctx);
+ if (ctx->NewState & NEW_FOG) {
+ update_fog_mode(ctx);
+ }
- /* update scissor region */
- ctx->DrawBuffer->Xmin = 0;
- ctx->DrawBuffer->Ymin = 0;
- ctx->DrawBuffer->Xmax = ctx->DrawBuffer->Width;
- ctx->DrawBuffer->Ymax = ctx->DrawBuffer->Height;
- if (ctx->Scissor.Enabled) {
- if (ctx->Scissor.X > ctx->DrawBuffer->Xmin) {
- ctx->DrawBuffer->Xmin = ctx->Scissor.X;
- }
- if (ctx->Scissor.Y > ctx->DrawBuffer->Ymin) {
- ctx->DrawBuffer->Ymin = ctx->Scissor.Y;
- }
- if (ctx->Scissor.X + ctx->Scissor.Width < ctx->DrawBuffer->Xmax) {
- ctx->DrawBuffer->Xmax = ctx->Scissor.X + ctx->Scissor.Width;
- }
- if (ctx->Scissor.Y + ctx->Scissor.Height < ctx->DrawBuffer->Ymax) {
- ctx->DrawBuffer->Ymax = ctx->Scissor.Y + ctx->Scissor.Height;
- }
- }
+ if (ctx->NewState & NEW_RASTER_OPS) {
+ update_rasterflags(ctx);
+
+ /* update scissor region */
+ ctx->DrawBuffer->Xmin = 0;
+ ctx->DrawBuffer->Ymin = 0;
+ ctx->DrawBuffer->Xmax = ctx->DrawBuffer->Width;
+ ctx->DrawBuffer->Ymax = ctx->DrawBuffer->Height;
+ if (ctx->Scissor.Enabled) {
+ if (ctx->Scissor.X > ctx->DrawBuffer->Xmin) {
+ ctx->DrawBuffer->Xmin = ctx->Scissor.X;
+ }
+ if (ctx->Scissor.Y > ctx->DrawBuffer->Ymin) {
+ ctx->DrawBuffer->Ymin = ctx->Scissor.Y;
+ }
+ if (ctx->Scissor.X + ctx->Scissor.Width < ctx->DrawBuffer->Xmax) {
+ ctx->DrawBuffer->Xmax = ctx->Scissor.X + ctx->Scissor.Width;
+ }
+ if (ctx->Scissor.Y + ctx->Scissor.Height < ctx->DrawBuffer->Ymax) {
+ ctx->DrawBuffer->Ymax = ctx->Scissor.Y + ctx->Scissor.Height;
+ }
}
+ }
- if (ctx->NewState & NEW_LIGHTING) {
- ctx->TriangleCaps &= ~(DD_TRI_LIGHT_TWOSIDE|DD_LIGHTING_CULL);
- if (ctx->Light.Enabled) {
- if (ctx->Light.Model.TwoSide)
- ctx->TriangleCaps |= (DD_TRI_LIGHT_TWOSIDE|DD_LIGHTING_CULL);
- gl_update_lighting(ctx);
- }
+ if (ctx->NewState & NEW_LIGHTING) {
+ ctx->TriangleCaps &= ~(DD_TRI_LIGHT_TWOSIDE|DD_LIGHTING_CULL);
+ if (ctx->Light.Enabled) {
+ if (ctx->Light.Model.TwoSide)
+ ctx->TriangleCaps |= (DD_TRI_LIGHT_TWOSIDE|DD_LIGHTING_CULL);
+ gl_update_lighting(ctx);
}
}
@@ -959,9 +955,7 @@ void gl_update_state( GLcontext *ctx )
}
}
- if (ctx->NewState & ~(NEW_CLIENT_STATE|
- NEW_DRIVER_STATE|NEW_USER_CLIP|
- NEW_POLYGON))
+ if (ctx->NewState & ~(NEW_CLIENT_STATE | NEW_USER_CLIP | NEW_POLYGON))
gl_update_clipmask(ctx);
if (ctx->NewState & (NEW_LIGHTING|
@@ -970,10 +964,6 @@ void gl_update_state( GLcontext *ctx )
NEW_TEXTURE_ENABLE|
NEW_TEXTURE_ENV|
NEW_POLYGON|
- NEW_DRVSTATE0|
- NEW_DRVSTATE1|
- NEW_DRVSTATE2|
- NEW_DRVSTATE3|
NEW_USER_CLIP))
{
ctx->IndirectTriangles = ctx->TriangleCaps & ~ctx->Driver.TriangleCaps;