summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_array_import.c36
-rw-r--r--src/mesa/tnl/t_imm_alloc.c14
-rw-r--r--src/mesa/tnl/t_imm_dlist.c53
-rw-r--r--src/mesa/tnl/t_imm_exec.c6
-rw-r--r--src/mesa/tnl/t_imm_fixup.c12
-rw-r--r--src/mesa/tnl/t_vb_cliptmp.h4
-rw-r--r--src/mesa/tnl/t_vb_render.c6
-rw-r--r--src/mesa/tnl/t_vb_rendertmp.h22
8 files changed, 114 insertions, 39 deletions
diff --git a/src/mesa/tnl/t_array_import.c b/src/mesa/tnl/t_array_import.c
index 1cfed067647..fc2c3d19447 100644
--- a/src/mesa/tnl/t_array_import.c
+++ b/src/mesa/tnl/t_array_import.c
@@ -1,4 +1,4 @@
-/* $Id: t_array_import.c,v 1.2 2000/12/27 19:57:37 keithw Exp $ */
+/* $Id: t_array_import.c,v 1.3 2000/12/28 22:11:05 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -62,7 +62,7 @@ static void _tnl_import_vertex( GLcontext *ctx,
inputs->Obj.stride = tmp->StrideB;
inputs->Obj.size = tmp->Size;
inputs->Obj.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE);
- if (stride != 4*sizeof(GLfloat))
+ if (inputs->Obj.stride != 4*sizeof(GLfloat))
inputs->Obj.flags |= VEC_BAD_STRIDE;
if (!is_writeable)
inputs->Obj.flags |= VEC_NOT_WRITEABLE;
@@ -84,7 +84,7 @@ static void _tnl_import_normal( GLcontext *ctx,
inputs->Normal.start = (GLfloat *)tmp->Ptr;
inputs->Normal.stride = tmp->StrideB;
inputs->Normal.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE);
- if (stride != 3*sizeof(GLfloat))
+ if (inputs->Normal.stride != 3*sizeof(GLfloat))
inputs->Normal.flags |= VEC_BAD_STRIDE;
if (!is_writeable)
inputs->Normal.flags |= VEC_NOT_WRITEABLE;
@@ -110,7 +110,7 @@ static void _tnl_import_color( GLcontext *ctx,
inputs->Color.start = (GLubyte *)tmp->Ptr;
inputs->Color.stride = tmp->StrideB;
inputs->Color.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE);
- if (stride != 4*sizeof(GLubyte))
+ if (inputs->Color.stride != 4*sizeof(GLubyte))
inputs->Color.flags |= VEC_BAD_STRIDE;
if (!is_writeable)
inputs->Color.flags |= VEC_NOT_WRITEABLE;
@@ -135,7 +135,7 @@ static void _tnl_import_secondarycolor( GLcontext *ctx,
inputs->SecondaryColor.start = (GLubyte *)tmp->Ptr;
inputs->SecondaryColor.stride = tmp->StrideB;
inputs->SecondaryColor.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE);
- if (stride != 4*sizeof(GLubyte))
+ if (inputs->SecondaryColor.stride != 4*sizeof(GLubyte))
inputs->SecondaryColor.flags |= VEC_BAD_STRIDE;
if (!is_writeable)
inputs->SecondaryColor.flags |= VEC_NOT_WRITEABLE;
@@ -157,7 +157,7 @@ static void _tnl_import_fogcoord( GLcontext *ctx,
inputs->FogCoord.start = (GLfloat *)tmp->Ptr;
inputs->FogCoord.stride = tmp->StrideB;
inputs->FogCoord.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE);
- if (stride != sizeof(GLfloat))
+ if (inputs->FogCoord.stride != sizeof(GLfloat))
inputs->FogCoord.flags |= VEC_BAD_STRIDE;
if (!is_writeable)
inputs->FogCoord.flags |= VEC_NOT_WRITEABLE;
@@ -179,7 +179,7 @@ static void _tnl_import_index( GLcontext *ctx,
inputs->Index.start = (GLuint *)tmp->Ptr;
inputs->Index.stride = tmp->StrideB;
inputs->Index.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE);
- if (stride != sizeof(GLuint))
+ if (inputs->Index.stride != sizeof(GLuint))
inputs->Index.flags |= VEC_BAD_STRIDE;
if (!is_writeable)
inputs->Index.flags |= VEC_NOT_WRITEABLE;
@@ -195,6 +195,9 @@ static void _tnl_import_texcoord( GLcontext *ctx,
struct gl_client_array *tmp;
GLboolean is_writeable = 0;
+/* fprintf(stderr, "%s %d before wr %d ptr %p\n", __FUNCTION__, i, writeable, */
+/* inputs->TexCoord[i].data); */
+
tmp = _ac_import_texcoord(ctx, i, GL_FLOAT,
stride ? 4*sizeof(GLfloat) : 0,
0,
@@ -206,10 +209,13 @@ static void _tnl_import_texcoord( GLcontext *ctx,
inputs->TexCoord[i].stride = tmp->StrideB;
inputs->TexCoord[i].size = tmp->Size;
inputs->TexCoord[i].flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE);
- if (stride != 4*sizeof(GLfloat))
+ if (inputs->TexCoord[i].stride != 4*sizeof(GLfloat))
inputs->TexCoord[i].flags |= VEC_BAD_STRIDE;
if (!is_writeable)
inputs->TexCoord[i].flags |= VEC_NOT_WRITEABLE;
+
+/* fprintf(stderr, "%s %d before wr %d ptr %p\n", __FUNCTION__, i, is_writeable, */
+/* inputs->TexCoord[i].data); */
}
@@ -230,7 +236,7 @@ static void _tnl_import_edgeflag( GLcontext *ctx,
inputs->EdgeFlag.start = (GLubyte *)tmp->Ptr;
inputs->EdgeFlag.stride = tmp->StrideB;
inputs->EdgeFlag.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE);
- if (stride != sizeof(GLubyte))
+ if (inputs->EdgeFlag.stride != sizeof(GLubyte))
inputs->EdgeFlag.flags |= VEC_BAD_STRIDE;
if (!is_writeable)
inputs->EdgeFlag.flags |= VEC_NOT_WRITEABLE;
@@ -256,6 +262,8 @@ static void _tnl_upgrade_client_data( GLcontext *ctx,
if ((required & VERT_CLIP) && VB->ClipPtr == VB->ObjPtr)
required |= VERT_OBJ;
+/* _tnl_print_vert_flags("_tnl_upgrade_client_data", required); */
+
if ((required & VERT_OBJ) && (VB->ObjPtr->flags & flags)) {
ASSERT(VB->ObjPtr == &inputs->Obj);
_tnl_import_vertex( ctx, writeable, stride );
@@ -330,9 +338,9 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLsizei count )
VB->Material = 0;
VB->Flag = 0;
-/* _tnl_print_vert_flags("_tnl_print_vert_flags: inputs", inputs); */
-/* _tnl_print_vert_flags("_tnl_print_vert_flags: imports", imports); */
-/* _tnl_print_vert_flags("_tnl_print_vert_flags: _Enabled", ctx->Array._Enabled); */
+/* _tnl_print_vert_flags("_tnl_vb_bind_arrays: inputs", inputs); */
+/* _tnl_print_vert_flags("_tnl_vb_bind_arrays: imports", imports); */
+/* _tnl_print_vert_flags("_tnl_vb_bind_arrays: _Enabled", ctx->Array._Enabled); */
if (inputs & VERT_OBJ) {
if (imports & VERT_OBJ) {
@@ -409,7 +417,9 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLsizei count )
VB->Primitive = tnl->tmp_primitive;
VB->PrimitiveLength = tnl->tmp_primitive_length;
VB->import_data = _tnl_upgrade_client_data;
- VB->importable_data = imports;
+ VB->importable_data = imports & VERT_FIXUP;
+/* _tnl_print_vert_flags("_tnl_vb_bind_arrays: importable", VB->importable_data); */
+
}
diff --git a/src/mesa/tnl/t_imm_alloc.c b/src/mesa/tnl/t_imm_alloc.c
index 44e3a598ecb..e6a37f81015 100644
--- a/src/mesa/tnl/t_imm_alloc.c
+++ b/src/mesa/tnl/t_imm_alloc.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_alloc.c,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
+/* $Id: t_imm_alloc.c,v 1.2 2000/12/28 22:11:05 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -34,10 +34,10 @@
#include "t_imm_alloc.h"
+ static int id = 0;
struct immediate *_tnl_alloc_immediate( GLcontext *ctx )
{
- static int id = 0;
struct immediate *IM = ALIGN_MALLOC_STRUCT( immediate, 32 );
GLuint j;
@@ -80,6 +80,7 @@ struct immediate *_tnl_alloc_immediate( GLcontext *ctx )
void _tnl_free_immediate( struct immediate *IM )
{
+ static int freed = 0;
GLuint j;
if (IM->NormalLengths) {
@@ -92,12 +93,15 @@ void _tnl_free_immediate( struct immediate *IM )
FREE( IM->MaterialMask );
IM->Material = 0;
IM->MaterialMask = 0;
-
- for (j = 1; j < IM->MaxTextureUnits; j++)
- ALIGN_FREE( IM->TexCoord[j] );
}
+ for (j = 1; j < IM->MaxTextureUnits; j++)
+ ALIGN_FREE( IM->TexCoord[j] );
+
+
ALIGN_FREE( IM );
+ freed++;
+/* printf("outstanding %d\n", id - freed); */
}
diff --git a/src/mesa/tnl/t_imm_dlist.c b/src/mesa/tnl/t_imm_dlist.c
index a11217e4374..e22661e7ea9 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.3 2000/12/27 21:49:40 keithw Exp $ */
+/* $Id: t_imm_dlist.c,v 1.4 2000/12/28 22:11:05 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -112,6 +112,8 @@ _tnl_compile_cassette( GLcontext *ctx, struct immediate *IM )
return;
node->IM = im; im->ref_count++;
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* im->id, im->ref_count); */
node->Start = im->Start;
node->Count = im->Count;
node->BeginState = im->BeginState;
@@ -142,6 +144,10 @@ _tnl_compile_cassette( GLcontext *ctx, struct immediate *IM )
if (!new_im) return;
new_im->ref_count++;
im->ref_count--; /* remove CURRENT_IM reference */
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* im->id, im->ref_count); */
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* new_im->id, new_im->ref_count); */
ASSERT(im->ref_count > 0);
SET_IMMEDIATE( ctx, new_im );
_tnl_reset_input( ctx, IMM_MAX_COPIED_VERTS,
@@ -230,20 +236,23 @@ execute_compiled_cassette( GLcontext *ctx, void *data )
}
- /* Lazy optimization of the cassette.
+ /* Lazy optimization of the cassette. Need to make these switchable
+ * or otherwise more useful for t&l cards.
*/
-/* if (ctx->Transform.Normalize && !node->have_normal_lengths) { */
+#if 0
+ if (ctx->Transform.Normalize && !node->have_normal_lengths) {
-/* if (!IM->NormalLengths) */
-/* IM->NormalLengths = (GLfloat *)MALLOC(sizeof(GLfloat) * IMM_SIZE); */
+ if (!IM->NormalLengths)
+ IM->NormalLengths = (GLfloat *)MALLOC(sizeof(GLfloat) * IMM_SIZE);
-/* calc_normal_lengths( IM->NormalLengths + IM->Start, */
-/* (const GLfloat (*)[3])(IM->Normal + IM->Start), */
-/* IM->Flag + IM->Start, */
-/* IM->Count - IM->Start); */
+ calc_normal_lengths( IM->NormalLengths + IM->Start,
+ (const GLfloat (*)[3])(IM->Normal + IM->Start),
+ IM->Flag + IM->Start,
+ IM->Count - IM->Start);
-/* node->have_normal_lengths = GL_TRUE; */
-/* } */
+ node->have_normal_lengths = GL_TRUE;
+ }
+#endif
#if 0
@@ -268,6 +277,10 @@ destroy_compiled_cassette( GLcontext *ctx, void *data )
{
TNLvertexcassette *node = (TNLvertexcassette *)data;
+/* fprintf(stderr, "destroy_compiled_cassette node->IM id %d ref_count: %d\n", */
+/* node->IM->id, */
+/* node->IM->ref_count-1); */
+
if ( --node->IM->ref_count == 0 )
_tnl_free_immediate( node->IM );
}
@@ -328,9 +341,20 @@ _tnl_EndList( GLcontext *ctx )
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct immediate *IM = TNL_CURRENT_IM(ctx);
+ ctx->swtnl_im = 0;
IM->ref_count--;
- if (IM == tnl->ExecCopySource)
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* IM->id, IM->ref_count); */
+ if (IM == tnl->ExecCopySource) {
IM->ref_count--;
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* IM->id, IM->ref_count); */
+ } else {
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* tnl->ExecCopySource->id, tnl->ExecCopySource->ref_count-1); */
+ if ( --tnl->ExecCopySource->ref_count == 0 )
+ _tnl_free_immediate( tnl->ExecCopySource );
+ }
/* If this one isn't free, get a clean one. (Otherwise we'll be
* using one that's already half full).
@@ -342,9 +366,14 @@ _tnl_EndList( GLcontext *ctx )
tnl->ExecCopySource = IM;
IM->ref_count++;
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* IM->id, IM->ref_count); */
+
SET_IMMEDIATE( ctx, IM );
IM->ref_count++;
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* IM->id, IM->ref_count); */
_tnl_reset_input( ctx, IMM_MAX_COPIED_VERTS, 0, 0 );
diff --git a/src/mesa/tnl/t_imm_exec.c b/src/mesa/tnl/t_imm_exec.c
index f9b12126a83..1549fa53af4 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.3 2000/12/27 22:52:45 keithw Exp $ */
+/* $Id: t_imm_exec.c,v 1.4 2000/12/28 22:11:05 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -474,11 +474,15 @@ void _tnl_imm_init( GLcontext *ctx )
ctx->swtnl_im = _tnl_alloc_immediate( ctx );
TNL_CURRENT_IM(ctx)->ref_count++;
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* TNL_CURRENT_IM(ctx)->id, TNL_CURRENT_IM(ctx)->ref_count); */
tnl->ExecCopyTexSize = 0;
tnl->ExecCopyCount = 0;
tnl->ExecCopySource = TNL_CURRENT_IM(ctx);
TNL_CURRENT_IM(ctx)->ref_count++;
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* TNL_CURRENT_IM(ctx)->id, TNL_CURRENT_IM(ctx)->ref_count); */
TNL_CURRENT_IM(ctx)->CopyStart = IMM_MAX_COPIED_VERTS;
gl_vector4f_init( &tmp->Obj, 0, 0 );
diff --git a/src/mesa/tnl/t_imm_fixup.c b/src/mesa/tnl/t_imm_fixup.c
index d55ab48c56d..5da75db53bf 100644
--- a/src/mesa/tnl/t_imm_fixup.c
+++ b/src/mesa/tnl/t_imm_fixup.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_fixup.c,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
+/* $Id: t_imm_fixup.c,v 1.2 2000/12/28 22:11:05 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -432,11 +432,17 @@ static void copy_vertices( GLcontext *ctx,
}
ASSERT(prev == tnl->ExecCopySource);
+
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* tnl->ExecCopySource->id, tnl->ExecCopySource->ref_count-1); */
+
if (--tnl->ExecCopySource->ref_count == 0)
_tnl_free_immediate( tnl->ExecCopySource );
next->ref_count++;
tnl->ExecCopySource = next;
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* next->id, next->ref_count); */
tnl->ExecCopyElts[0] = next->Start-3;
tnl->ExecCopyElts[1] = next->Start-2;
tnl->ExecCopyElts[2] = next->Start-1;
@@ -726,10 +732,14 @@ _tnl_get_exec_copy_verts( GLcontext *ctx, struct immediate *IM )
if (tnl->ExecCopySource != IM) {
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* tnl->ExecCopySource->id, tnl->ExecCopySource->ref_count-1); */
if (--tnl->ExecCopySource->ref_count == 0)
_tnl_free_immediate( tnl->ExecCopySource );
IM->ref_count++;
tnl->ExecCopySource = IM;
+/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
+/* tnl->ExecCopySource->id, tnl->ExecCopySource->ref_count); */
}
if (prim == GL_POLYGON+1) {
diff --git a/src/mesa/tnl/t_vb_cliptmp.h b/src/mesa/tnl/t_vb_cliptmp.h
index 34acfcfe554..1aeb014e159 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.3 2000/12/27 21:49:40 keithw Exp $ */
+/* $Id: t_vb_cliptmp.h,v 1.4 2000/12/28 22:11:05 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -361,7 +361,7 @@ static void TAG(viewclip_polygon)( GLcontext *ctx,
newvert = interp( ctx, t, idxPrev, idx, GL_FALSE ); \
} \
clipmask[newvert] = mask; \
- outlist[outcount++] = newvert; \
+ outlist[outcount++] = newvert; \
} \
\
idxPrev = idx; \
diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c
index 1311d5721fc..1d0a1aaf152 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.3 2000/12/27 21:49:40 keithw Exp $ */
+/* $Id: t_vb_render.c,v 1.4 2000/12/28 22:11:06 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -520,6 +520,8 @@ static GLboolean run_render( GLcontext *ctx,
render_func *tab;
GLint pass = 0;
+/* return GL_FALSE; */
+
VB->interpfunc = (void *)RENDER_STAGE_DATA(stage)->interp;
if (new_inputs) {
@@ -615,7 +617,7 @@ static void check_render( GLcontext *ctx, struct gl_pipeline_stage *stage )
}
}
}
- else if (ctx->Light.ShadeModel==GL_SMOOTH)
+ else
{
interp |= INTERP_INDEX;
inputs |= VERT_INDEX;
diff --git a/src/mesa/tnl/t_vb_rendertmp.h b/src/mesa/tnl/t_vb_rendertmp.h
index bd77b9668a0..5712d342d27 100644
--- a/src/mesa/tnl/t_vb_rendertmp.h
+++ b/src/mesa/tnl/t_vb_rendertmp.h
@@ -1,4 +1,4 @@
-/* $Id: t_vb_rendertmp.h,v 1.2 2000/12/27 19:57:37 keithw Exp $ */
+/* $Id: t_vb_rendertmp.h,v 1.3 2000/12/28 22:11:06 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -39,7 +39,7 @@
#ifndef NEED_EDGEFLAG_SETUP
#define NEED_EDGEFLAG_SETUP 0
#define EDGEFLAG_GET(a) 0
-#define EDGEFLAG_SET(a,b)
+#define EDGEFLAG_SET(a,b) (void)b
#endif
#ifndef RESET_STIPPLE
@@ -68,6 +68,7 @@ static void TAG(render_points)( GLcontext *ctx,
LOCAL_VARS;
(void) flags;
+/* fprintf(stderr, "%s %d..%d\n", __FUNCTION__, start, count); */
RESET_OCCLUSION;
INIT(GL_POINTS);
RENDER_POINTS( start, count );
@@ -83,6 +84,7 @@ static void TAG(render_lines)( GLcontext *ctx,
LOCAL_VARS;
(void) flags;
+/* fprintf(stderr, "%s %d..%d\n", __FUNCTION__, start, count); */
RESET_OCCLUSION;
INIT(GL_LINES);
for (j=start+1; j<count; j+=2 ) {
@@ -102,6 +104,7 @@ static void TAG(render_line_strip)( GLcontext *ctx,
LOCAL_VARS;
(void) flags;
+/* fprintf(stderr, "%s %d..%d\n", __FUNCTION__, start, count); */
RESET_OCCLUSION;
INIT(GL_LINES);
@@ -125,6 +128,7 @@ static void TAG(render_line_loop)( GLcontext *ctx,
(void) flags;
+/* fprintf(stderr, "%s %d..%d\n", __FUNCTION__, start, count); */
RESET_OCCLUSION;
INIT(GL_LINES);
@@ -156,6 +160,7 @@ static void TAG(render_triangles)( GLcontext *ctx,
LOCAL_VARS;
(void) flags;
+/* fprintf(stderr, "%s %d..%d\n", __FUNCTION__, start, count); */
INIT(GL_POLYGON);
if (NEED_EDGEFLAG_SETUP) {
for (j=start+2; j<count; j+=3) {
@@ -186,6 +191,7 @@ static void TAG(render_tri_strip)( GLcontext *ctx,
if (TEST_PRIM_PARITY(flags))
parity = 1;
+/* fprintf(stderr, "%s %d..%d\n", __FUNCTION__, start, count); */
INIT(GL_POLYGON);
if (NEED_EDGEFLAG_SETUP) {
for (j=start+2;j<count;j++,parity^=1) {
@@ -225,6 +231,7 @@ static void TAG(render_tri_fan)( GLcontext *ctx,
LOCAL_VARS;
(void) flags;
+/* fprintf(stderr, "%s %d..%d\n", __FUNCTION__, start, count); */
INIT(GL_POLYGON);
if (NEED_EDGEFLAG_SETUP) {
for (j=start+2;j<count;j++) {
@@ -270,6 +277,7 @@ static void TAG(render_poly_pv)( GLcontext *ctx,
LOCAL_VARS;
(void) flags;
+/* fprintf(stderr, "%s %d..%d\n", __FUNCTION__, start, count); */
INIT(GL_POLYGON);
if (NEED_EDGEFLAG_SETUP) {
GLboolean efstart = EDGEFLAG_GET( ELT(start) );
@@ -335,6 +343,7 @@ static void TAG(render_poly)( GLcontext *ctx,
GLuint count,
GLuint flags )
{
+/* fprintf(stderr, "%s %d..%d\n", __FUNCTION__, start, count); */
TAG(render_poly_pv)( ctx, start, count, flags, start );
}
@@ -347,6 +356,7 @@ static void TAG(render_quads)( GLcontext *ctx,
LOCAL_VARS;
(void) flags;
+/* fprintf(stderr, "%s %d..%d\n", __FUNCTION__, start, count); */
INIT(GL_POLYGON);
if (NEED_EDGEFLAG_SETUP) {
for (j=start+3; j<count; j+=4) {
@@ -372,6 +382,7 @@ static void TAG(render_quad_strip)( GLcontext *ctx,
LOCAL_VARS;
(void) flags;
+/* fprintf(stderr, "%s %d..%d\n", __FUNCTION__, start, count); */
INIT(GL_POLYGON);
if (NEED_EDGEFLAG_SETUP) {
for (j=start+3;j<count;j+=2) {
@@ -406,10 +417,15 @@ static void TAG(render_noop)( GLcontext *ctx,
GLuint count,
GLuint flags )
{
+/* fprintf(stderr, "%s %d..%d\n", __FUNCTION__, start, count); */
(void)(ctx && start && count && flags);
}
-static render_func TAG(render_tab)[GL_POLYGON+2] = {
+static void (*TAG(render_tab)[GL_POLYGON+2])(GLcontext *,
+ GLuint,
+ GLuint,
+ GLuint) =
+{
TAG(render_points),
TAG(render_lines),
TAG(render_line_loop),