summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_context.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2004-01-05 09:43:42 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2004-01-05 09:43:42 +0000
commit790734045b69c47b1525fbf9106a7ca5a8eb7416 (patch)
tree6d071a1bfea29d14bc132414cc62a18e0b5fb51f /src/mesa/tnl/t_context.c
parenteffc73931f86c7961b4eb296d2d4c5d91624a9e3 (diff)
Re-commit t_vertex.[ch] changes to fd.o server.
Diffstat (limited to 'src/mesa/tnl/t_context.c')
-rw-r--r--src/mesa/tnl/t_context.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c
index a78d880d01..8b83372fa7 100644
--- a/src/mesa/tnl/t_context.c
+++ b/src/mesa/tnl/t_context.c
@@ -29,11 +29,13 @@
#include "api_arrayelt.h"
#include "glheader.h"
#include "imports.h"
+#include "context.h"
#include "macros.h"
#include "mtypes.h"
#include "dlist.h"
#include "light.h"
#include "vtxfmt.h"
+#include "nvfragprog.h"
#include "t_context.h"
#include "t_array_api.h"
@@ -153,6 +155,30 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state )
tnl->pipeline.build_state_trigger);
tnl->vtx.eval.new_state |= new_state;
+
+ /* Calculate tnl->render_inputs:
+ */
+ if (ctx->Visual.rgbMode) {
+ tnl->render_inputs = (_TNL_BIT_POS|
+ _TNL_BIT_COLOR0|
+ (ctx->Texture._EnabledUnits << _TNL_ATTRIB_TEX0));
+
+ if (NEED_SECONDARY_COLOR(ctx))
+ tnl->render_inputs |= _TNL_BIT_COLOR1;
+ }
+ else {
+ tnl->render_inputs |= (_TNL_BIT_POS|_TNL_BIT_INDEX);
+ }
+
+ if (ctx->Fog.Enabled)
+ tnl->render_inputs |= _TNL_BIT_FOG;
+
+ if (ctx->Polygon.FrontMode != GL_FILL ||
+ ctx->Polygon.BackMode != GL_FILL)
+ tnl->render_inputs |= _TNL_BIT_EDGEFLAG;
+
+ if (ctx->RenderMode == GL_FEEDBACK)
+ tnl->render_inputs |= _TNL_BIT_TEX0;
}