summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/tnl/t_imm_dlist.c12
-rw-r--r--src/mesa/tnl/t_imm_exec.c14
-rw-r--r--src/mesa/tnl/t_imm_exec.h3
-rw-r--r--src/mesa/tnl/t_vb_cliptmp.h14
-rw-r--r--src/mesa/tnl/t_vb_render.c5
5 files changed, 21 insertions, 27 deletions
diff --git a/src/mesa/tnl/t_imm_dlist.c b/src/mesa/tnl/t_imm_dlist.c
index 9acd6ea1d79..a11217e4374 100644
--- a/src/mesa/tnl/t_imm_dlist.c
+++ b/src/mesa/tnl/t_imm_dlist.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_dlist.c,v 1.2 2000/12/26 07:41:32 keithw Exp $ */
+/* $Id: t_imm_dlist.c,v 1.3 2000/12/27 21:49:40 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -187,8 +187,6 @@ execute_compiled_cassette( GLcontext *ctx, void *data )
TNLvertexcassette *node = (TNLvertexcassette *)data;
struct immediate *IM = node->IM;
-/* FLUSH_VERTICES( ctx, 0 ); */
-
if (ctx->NewState)
gl_update_state(ctx);
@@ -214,7 +212,12 @@ execute_compiled_cassette( GLcontext *ctx, void *data )
fprintf(stderr, "Run cassette %d, rows %d..%d, beginstate %x ",
IM->id,
IM->Start, IM->Count, IM->BeginState);
-/* _tnl_print_vert_flags("orflag", IM->OrFlag); */
+ _tnl_print_vert_flags("orflag", IM->OrFlag);
+ }
+
+ if (IM->Count == IM->Start) {
+ _tnl_run_empty_cassette( ctx, IM );
+ return;
}
if (IM->SavedBeginState) {
@@ -227,7 +230,6 @@ execute_compiled_cassette( GLcontext *ctx, void *data )
}
-
/* Lazy optimization of the cassette.
*/
/* if (ctx->Transform.Normalize && !node->have_normal_lengths) { */
diff --git a/src/mesa/tnl/t_imm_exec.c b/src/mesa/tnl/t_imm_exec.c
index 97f23d86e64..80adbb4d312 100644
--- a/src/mesa/tnl/t_imm_exec.c
+++ b/src/mesa/tnl/t_imm_exec.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_exec.c,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
+/* $Id: t_imm_exec.c,v 1.2 2000/12/27 21:49:40 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -358,14 +358,10 @@ static void exec_elt_cassette( GLcontext *ctx, struct immediate *IM )
/* Called for cassettes where CopyStart == Count -- no need to run the
* pipeline.
*/
-static void exec_empty_cassette( GLcontext *ctx, struct immediate *IM )
+void _tnl_run_empty_cassette( GLcontext *ctx, struct immediate *IM )
{
GLuint start = IM->CopyStart;
- if (IM->OrFlag & VERT_ELT)
- _tnl_translate_array_elts( ctx, IM, start, start );
-
- _tnl_fixup_input( ctx, IM ); /* shouldn't be needed? (demos/fire) */
copy_to_current( ctx, IM, IM->OrFlag );
if (IM->OrFlag & VERT_MATERIAL)
@@ -428,7 +424,11 @@ void _tnl_execute_cassette( GLcontext *ctx, struct immediate *IM )
_tnl_get_exec_copy_verts( ctx, IM );
if (IM->CopyStart == IM->Count) {
- exec_empty_cassette( ctx, IM );
+ if (IM->OrFlag & VERT_ELT)
+ _tnl_translate_array_elts( ctx, IM, IM->CopyStart, IM->CopyStart );
+
+ _tnl_fixup_input( ctx, IM ); /* shouldn't be needed? (demos/fire) */
+ _tnl_run_empty_cassette( ctx, IM );
}
else if ((IM->OrFlag & VERT_DATA) == VERT_ELT &&
ctx->Array.LockCount &&
diff --git a/src/mesa/tnl/t_imm_exec.h b/src/mesa/tnl/t_imm_exec.h
index 3a7284ccfd8..84cf1f0f8af 100644
--- a/src/mesa/tnl/t_imm_exec.h
+++ b/src/mesa/tnl/t_imm_exec.h
@@ -1,4 +1,4 @@
-/* $Id: t_imm_exec.h,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
+/* $Id: t_imm_exec.h,v 1.2 2000/12/27 21:49:40 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -43,6 +43,7 @@ extern void _tnl_flush_immediate( struct immediate *IM );
/* Called from imm_dlist.c and _tnl_flush_immediate:
*/
extern void _tnl_run_cassette( GLcontext *ctx, struct immediate *IM );
+extern void _tnl_run_empty_cassette( GLcontext *ctx, struct immediate *IM );
/* Initialize some stuff:
*/
diff --git a/src/mesa/tnl/t_vb_cliptmp.h b/src/mesa/tnl/t_vb_cliptmp.h
index 34f0a4f1e1b..34acfcfe554 100644
--- a/src/mesa/tnl/t_vb_cliptmp.h
+++ b/src/mesa/tnl/t_vb_cliptmp.h
@@ -1,4 +1,4 @@
-/* $Id: t_vb_cliptmp.h,v 1.2 2000/12/27 19:57:37 keithw Exp $ */
+/* $Id: t_vb_cliptmp.h,v 1.3 2000/12/27 21:49:40 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -132,19 +132,11 @@ static GLuint TAG(userclip_polygon)( GLcontext *ctx,
*/
GLfloat t = dp / (dp - dpPrev);
newvert = interp( ctx, t, idx, idxPrev, GL_TRUE );
-/* fprintf(stderr,"Goint out: in: %d/%d out: %d/%d new: %d/%d\n", */
-/* idxPrev, VB->EdgeFlagPtr->data[idxPrev], */
-/* idx, VB->EdgeFlagPtr->data[idx], */
-/* newvert, VB->EdgeFlagPtr->data[newvert]); */
} else {
/* Coming back in.
*/
GLfloat t = dpPrev / (dpPrev - dp);
newvert = interp( ctx, t, idxPrev, idx, GL_FALSE );
-/* fprintf(stderr,"coming in: in: %d/%d out: %d/%d new: %d/%d\n", */
-/* idx, VB->EdgeFlagPtr->data[idx], */
-/* idxPrev, VB->EdgeFlagPtr->data[idxPrev], */
-/* newvert, VB->EdgeFlagPtr->data[newvert]); */
}
clipmask[newvert] = 0;
outlist[outcount++] = newvert;
@@ -173,10 +165,6 @@ static GLuint TAG(userclip_polygon)( GLcontext *ctx,
vlist[i] = inlist[i];
}
-/* fprintf(stderr, "%s: finally:\n", __FUNCTION__); */
-/* for (i = 0 ; i < n ; i++) */
-/* fprintf(stderr, "%d: %d\n", vlist[i], VB->EdgeFlagPtr->data[vlist[i]]); */
-
return n;
}
diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c
index 15afe6118db..1311d5721fc 100644
--- a/src/mesa/tnl/t_vb_render.c
+++ b/src/mesa/tnl/t_vb_render.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_render.c,v 1.2 2000/12/27 19:57:37 keithw Exp $ */
+/* $Id: t_vb_render.c,v 1.3 2000/12/27 21:49:40 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -562,6 +562,9 @@ static GLboolean run_render( GLcontext *ctx,
length= VB->PrimitiveLength[i];
ASSERT(length || (flags & PRIM_LAST));
ASSERT((flags & PRIM_MODE_MASK) <= GL_POLYGON+1);
+/* fprintf(stderr, "render %s %d..%d\n", */
+/* _mesa_prim_name[flags & PRIM_MODE_MASK], */
+/* i, i+length); */
if (length)
tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags );
}