summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_array_api.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2005-04-22 12:51:19 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2005-04-22 12:51:19 +0000
commit6f973f33679e034b7cb63806f1ddfabdbdd70123 (patch)
tree31580bc32d1b87a3dddd8f7c8bc5f404b407c637 /src/mesa/tnl/t_array_api.c
parent6a13c7da4c79f7e811fbddc68f59441070ff0cc8 (diff)
Simplify the pipeline_stage structure
- remove input/output fields, input tracking removed. - remove state fields, the validate function now called on every statechange. - add an explicit 'create' function. Add in code to build vertex program to implement current t&l state. Still disabled, but turn on with a #define in t_vp_build.h.
Diffstat (limited to 'src/mesa/tnl/t_array_api.c')
-rw-r--r--src/mesa/tnl/t_array_api.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/src/mesa/tnl/t_array_api.c b/src/mesa/tnl/t_array_api.c
index 3aa91f9d90..c8cd22f0c6 100644
--- a/src/mesa/tnl/t_array_api.c
+++ b/src/mesa/tnl/t_array_api.c
@@ -91,9 +91,6 @@ static void _tnl_draw_range_elements( GLcontext *ctx, GLenum mode,
struct tnl_prim prim;
FLUSH_CURRENT( ctx, 0 );
- if (tnl->pipeline.build_state_changes)
- _tnl_validate_pipeline( ctx );
-
_tnl_vb_bind_arrays( ctx, 0, max_index );
tnl->vb.Primitive = &prim;
@@ -104,20 +101,7 @@ static void _tnl_draw_range_elements( GLcontext *ctx, GLenum mode,
tnl->vb.Elts = (GLuint *)indices;
- if (ctx->Array.LockCount)
- tnl->Driver.RunPipeline( ctx );
- else {
- /* The lower 16 bits represent the conventional arrays while the
- * upper 16 bits represent the generic arrays. OR those bits
- * together to indicate which vertex attribs are in effect.
- */
- GLuint enabledArrays = ctx->Array._Enabled | (ctx->Array._Enabled >> 16);
- /* Note that arrays may have changed before/after execution.
- */
- tnl->pipeline.run_input_changes |= enabledArrays & 0xffff;
- tnl->Driver.RunPipeline( ctx );
- tnl->pipeline.run_input_changes |= enabledArrays & 0xffff;
- }
+ tnl->Driver.RunPipeline( ctx );
}
@@ -131,7 +115,6 @@ _tnl_DrawArrays(GLenum mode, GLint start, GLsizei count)
GET_CURRENT_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint thresh = (ctx->Driver.NeedFlush & FLUSH_STORED_VERTICES) ? 30 : 10;
- GLuint enabledArrays;
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(NULL, "_tnl_DrawArrays %d %d\n", start, count);
@@ -141,9 +124,6 @@ _tnl_DrawArrays(GLenum mode, GLint start, GLsizei count)
if (!_mesa_validate_DrawArrays( ctx, mode, start, count ))
return;
- if (tnl->pipeline.build_state_changes)
- _tnl_validate_pipeline( ctx );
-
assert(!ctx->CompileFlag);
if (!ctx->Array.LockCount && (GLuint) count < thresh) {
@@ -266,16 +246,7 @@ _tnl_DrawArrays(GLenum mode, GLint start, GLsizei count)
tnl->vb.Primitive[0].count = nr + minimum;
tnl->vb.PrimitiveCount = 1;
- /* The lower 16 bits represent the conventional arrays while the
- * upper 16 bits represent the generic arrays. OR those bits
- * together to indicate which vertex attribs are in effect.
- */
- enabledArrays = ctx->Array._Enabled | (ctx->Array._Enabled >> 16);
- /* Note that arrays may have changed before/after execution.
- */
- tnl->pipeline.run_input_changes |= enabledArrays;
tnl->Driver.RunPipeline( ctx );
- tnl->pipeline.run_input_changes |= enabledArrays;
}
}
}