#define FFB_MAX_TRIFUNC 0x08
static struct {
- triangle_func triangle;
- quad_func quad;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[FFB_MAX_TRIFUNC];
#define DO_OFFSET (IND & FFB_OFFSET_BIT)
render_tab_flat_alpha_tricull_elt;
for (i = 0; i < MAX_FFB_RENDER_FUNCS; i++) {
- render_func *rf = render_tabs[i];
- render_func *rfe = render_tabs_elt[i];
+ tnl_render_func *rf = render_tabs[i];
+ tnl_render_func *rfe = render_tabs_elt[i];
if (i & FFB_TRI_CULL_BIT) {
int from_idx = (i & ~FFB_TRI_CULL_BIT);
- render_func *rf_from = render_tabs[from_idx];
- render_func *rfe_from = render_tabs_elt[from_idx];
+ tnl_render_func *rf_from = render_tabs[from_idx];
+ tnl_render_func *rfe_from = render_tabs_elt[from_idx];
int j;
for (j = GL_POINTS; j < GL_TRIANGLES; j++) {
static struct {
ffb_emit_func emit;
- interp_func interp;
+ tnl_interp_func interp;
} setup_tab[FFB_VB_MAX];
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
GLuint i;
- render_func *tab;
+ tnl_render_func *tab;
/* GH: THIS IS A HACK!!! */
if (VB->ClipOrMask || gmesa->RenderIndex != 0)
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[GAMMA_MAX_TRIFUNC];
static struct {
void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint );
- interp_func interp;
- copy_pv_func copy_pv;
+ tnl_interp_func interp;
+ tnl_copy_pv_func copy_pv;
GLboolean (*check_tex_sizes)( GLcontext *ctx );
GLuint vertex_size;
GLuint vertex_format;
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[I810_MAX_TRIFUNC];
static struct {
void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint );
- interp_func interp;
- copy_pv_func copy_pv;
+ tnl_interp_func interp;
+ tnl_copy_pv_func copy_pv;
GLboolean (*check_tex_sizes)( GLcontext *ctx );
GLuint vertex_size;
GLuint vertex_format;
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[I830_MAX_TRIFUNC];
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[INTEL_MAX_TRIFUNC];
#define MACH64_MAX_TRIFUNC 0x10
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[MACH64_MAX_TRIFUNC];
static struct {
void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint );
- interp_func interp;
- copy_pv_func copy_pv;
+ tnl_interp_func interp;
+ tnl_copy_pv_func copy_pv;
GLboolean (*check_tex_sizes)( GLcontext *ctx );
GLuint vertex_size;
GLuint vertex_format;
#define MGA_MAX_TRIFUNC 0x20
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[MGA_MAX_TRIFUNC];
#define DO_FALLBACK (IND & MGA_FALLBACK_BIT)
static struct {
void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint );
- interp_func interp;
- copy_pv_func copy_pv;
+ tnl_interp_func interp;
+ tnl_copy_pv_func copy_pv;
GLboolean (*check_tex_sizes)( GLcontext *ctx );
GLuint vertex_size;
GLuint vertex_format;
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[R128_MAX_TRIFUNC];
static struct {
void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint );
- interp_func interp;
- copy_pv_func copy_pv;
+ tnl_interp_func interp;
+ tnl_copy_pv_func copy_pv;
GLboolean (*check_tex_sizes)( GLcontext *ctx );
GLuint vertex_size;
GLuint vertex_format;
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[R200_MAX_TRIFUNC];
static struct {
void (*emit)( GLcontext *, GLuint, GLuint, void *, GLuint );
- interp_func interp;
- copy_pv_func copy_pv;
+ tnl_interp_func interp;
+ tnl_copy_pv_func copy_pv;
GLboolean (*check_tex_sizes)( GLcontext *ctx );
GLuint vertex_size;
GLuint vertex_format;
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
- render_func *tab = TAG(render_tab_verts);
+ tnl_render_func *tab = TAG(render_tab_verts);
GLuint i;
if (rmesa->swtcl.indexed_verts.buf && (!VB->Elts || stage->changed_inputs))
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[RADEON_MAX_TRIFUNC];
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[SAVAGE_MAX_TRIFUNC];
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[SIS_MAX_TRIFUNC];
#define TDFX_MAX_TRIFUNC 0x20
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[TDFX_MAX_TRIFUNC];
#define DO_FALLBACK (IND & TDFX_FALLBACK_BIT)
static struct {
tdfx_emit_func emit;
- interp_func interp;
- copy_pv_func copy_pv;
+ tnl_interp_func interp;
+ tnl_copy_pv_func copy_pv;
GLboolean (*check_tex_sizes)( GLcontext *ctx );
GLuint vertex_size;
GLuint vertex_stride_shift;
}
-static render_func TAG(render_tab_verts)[GL_POLYGON + 2] =
+static tnl_render_func TAG(render_tab_verts)[GL_POLYGON + 2] =
{
TAG(render_points_verts),
TAG(render_lines_verts),
const GLuint * const elt = VB->Elts; \
const GLubyte *mask = VB->ClipMask; \
const GLuint sz = VB->ClipPtr->size; \
- const line_func LineFunc = tnl->Driver.Render.Line; \
- const triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
- const quad_func QuadFunc = tnl->Driver.Render.Quad; \
+ const tnl_line_func LineFunc = tnl->Driver.Render.Line; \
+ const tnl_triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
+ const tnl_quad_func QuadFunc = tnl->Driver.Render.Quad; \
const GLboolean stipple = ctx->Line.StippleFlag; \
(void) (LineFunc && TriangleFunc && QuadFunc); \
(void) elt; (void) mask; (void) sz; (void) stipple;
GLuint flags)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
- render_func render_tris = tnl->Driver.Render.PrimTabElts[GL_TRIANGLES];
+ tnl_render_func render_tris = tnl->Driver.Render.PrimTabElts[GL_TRIANGLES];
struct vertex_buffer *VB = &tnl->vb;
const GLuint * const elt = VB->Elts;
GLubyte *mask = VB->ClipMask;
GLuint newInputs = stage->changed_inputs;
/*GLuint newInputs = stage->inputs;*/
- render_func *tab;
+ tnl_render_func *tab;
GLuint pass = 0;
#ifdef DEBUG
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[VIA_MAX_TRIFUNC];
TNLcontext *tnl = TNL_CONTEXT(ctx); \
struct vertex_buffer *VB = &tnl->vb; \
const GLuint * const elt = VB->Elts; \
- const line_func LineFunc = tnl->Driver.Render.Line; \
- const triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
- const quad_func QuadFunc = tnl->Driver.Render.Quad; \
+ const tnl_line_func LineFunc = tnl->Driver.Render.Line; \
+ const tnl_triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
+ const tnl_quad_func QuadFunc = tnl->Driver.Render.Quad; \
const GLboolean stipple = ctx->Line.StippleFlag; \
(void) (LineFunc && TriangleFunc && QuadFunc); \
(void) elt; (void) stipple;
static struct {
void (*emit)(GLcontext *, GLuint, GLuint, void *, GLuint);
- interp_func interp;
- copy_pv_func copyPv;
+ tnl_interp_func interp;
+ tnl_copy_pv_func copyPv;
GLboolean (*check_tex_sizes)(GLcontext *ctx);
GLuint vertexSize;
GLuint vertexStrideShift;
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
- interp_func interp = tnl->Driver.Render.Interp;
+ tnl_interp_func interp = tnl->Driver.Render.Interp;
GLfloat (*coord)[4] = VB->ClipPtr->data;
GLuint ii = i, jj = j, p;
#ifdef DEBUG
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
- interp_func interp = tnl->Driver.Render.Interp;
+ tnl_interp_func interp = tnl->Driver.Render.Interp;
GLfloat (*coord)[4] = VB->ClipPtr->data;
GLuint pv = v2;
GLuint vlist[2][MAX_CLIPPED_VERTICES];
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
- interp_func interp = tnl->Driver.Render.Interp;
+ tnl_interp_func interp = tnl->Driver.Render.Interp;
GLfloat (*coord)[4] = VB->ClipPtr->data;
GLuint pv = v3;
GLuint vlist[2][MAX_CLIPPED_VERTICES];
#define FX_MAX_TRIFUNC 0x20
static struct {
- points_func points;
- line_func line;
- triangle_func triangle;
- quad_func quad;
+ tnl_points_func points;
+ tnl_line_func line;
+ tnl_triangle_func triangle;
+ tnl_quad_func quad;
} rast_tab[FX_MAX_TRIFUNC];
#define DO_FALLBACK (IND & FX_FALLBACK_BIT)
static struct {
emit_func emit;
- copy_pv_func copy_pv;
- interp_func interp;
+ tnl_copy_pv_func copy_pv;
+ tnl_interp_func interp;
GLboolean (*check_tex_sizes)( GLcontext *ctx );
GLuint vertex_format;
} setup_tab[MAX_SETUP];
}
/* Return pointer to accelerated points function */
-extern points_func choose_points_function( GLcontext* ctx )
+extern tnl_points_func choose_points_function( GLcontext* ctx )
{
return NULL;
}
{
}
-static line_func choose_line_function( GLcontext* ctx )
+static tnl_line_func choose_line_function( GLcontext* ctx )
{
}
#endif
/************** END DEAD TRIANGLE CODE ***********************/
-static triangle_func choose_triangle_function( GLcontext *ctx )
+static tnl_triangle_func choose_triangle_function( GLcontext *ctx )
{
#if 0
WMesaContext wmesa = (WMesaContext) ctx->DriverCtx;
TNLcontext *tnl;
struct vertex_buffer *VB;
GLuint new_inputs;
- render_func *tab;
+ tnl_render_func *tab;
GLint pass;
GLD_pb_dx7 *gldPB = &gld->PB3d;
DWORD dwFlags;
-/* $Id: gld_vb_mesa_render_dx7.c,v 1.1 2004/04/20 11:13:11 alanh Exp $ */
+/* $Id: gld_vb_mesa_render_dx7.c,v 1.2 2004/07/01 13:14:06 keithw Exp $ */
/*
* Mesa 3-D graphics library
const GLuint * const elt = VB->Elts; \
const GLubyte *mask = VB->ClipMask; \
const GLuint sz = VB->ClipPtr->size; \
- const line_func LineFunc = tnl->Driver.Render.Line; \
- const triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
- const quad_func QuadFunc = tnl->Driver.Render.Quad; \
+ const tnl_line_func LineFunc = tnl->Driver.Render.Line; \
+ const tnl_triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
+ const tnl_quad_func QuadFunc = tnl->Driver.Render.Quad; \
const GLboolean stipple = ctx->Line.StippleFlag; \
(void) (LineFunc && TriangleFunc && QuadFunc); \
(void) elt; (void) mask; (void) sz; (void) stipple;
GLuint flags )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
- render_func render_tris = tnl->Driver.Render.PrimTabElts[GL_TRIANGLES];
+ tnl_render_func render_tris = tnl->Driver.Render.PrimTabElts[GL_TRIANGLES];
struct vertex_buffer *VB = &tnl->vb;
const GLuint * const elt = VB->Elts;
GLubyte *mask = VB->ClipMask;
TNLcontext *tnl = TNL_CONTEXT(ctx); \
struct vertex_buffer *VB = &tnl->vb; \
const GLuint * const elt = VB->Elts; \
- const line_func LineFunc = tnl->Driver.Render.Line; \
- const triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
- const quad_func QuadFunc = tnl->Driver.Render.Quad; \
+ const tnl_line_func LineFunc = tnl->Driver.Render.Line; \
+ const tnl_triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
+ const tnl_quad_func QuadFunc = tnl->Driver.Render.Quad; \
(void) (LineFunc && TriangleFunc && QuadFunc); \
(void) elt;
/* Clip and render whole vertex buffers */
/**********************************************************************/
-points_func _gldSetupPoints[4] = {
+tnl_points_func _gldSetupPoints[4] = {
gld_Points2D_DX7,
gld_Points2D_DX7,
gld_Points2D_DX7,
gld_Points2D_DX7
};
-line_func _gldSetupLine[4] = {
+tnl_line_func _gldSetupLine[4] = {
gld_Line2DFlat_DX7,
gld_Line2DSmooth_DX7,
gld_Line2DFlat_DX7,
gld_Line2DSmooth_DX7,
};
-triangle_func _gldSetupTriangle[4] = {
+tnl_triangle_func _gldSetupTriangle[4] = {
gld_Triangle2DFlat_DX7,
gld_Triangle2DSmooth_DX7,
gld_Triangle2DFlatExtras_DX7,
gld_Triangle2DSmoothExtras_DX7
};
-quad_func _gldSetupQuad[4] = {
+tnl_quad_func _gldSetupQuad[4] = {
gld_Quad2DFlat_DX7,
gld_Quad2DSmooth_DX7,
gld_Quad2DFlatExtras_DX7,
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
GLuint new_inputs = stage->changed_inputs;
- render_func *tab;
+ tnl_render_func *tab;
GLint pass = 0;
GLD_pb_dx7 *gldPB;
DWORD dwFlags;
TNLcontext *tnl;
struct vertex_buffer *VB;
GLuint new_inputs;
- render_func *tab;
+ tnl_render_func *tab;
GLint pass;
GLD_pb_dx8 *gldPB = &gld->PB3d;
/*
-/* $Id: gld_vb_mesa_render_dx8.c,v 1.1 2004/04/20 11:13:11 alanh Exp $ */
+/* $Id: gld_vb_mesa_render_dx8.c,v 1.2 2004/07/01 13:14:07 keithw Exp $ */
/*
* Mesa 3-D graphics library
const GLuint * const elt = VB->Elts; \
const GLubyte *mask = VB->ClipMask; \
const GLuint sz = VB->ClipPtr->size; \
- const line_func LineFunc = tnl->Driver.Render.Line; \
- const triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
- const quad_func QuadFunc = tnl->Driver.Render.Quad; \
+ const tnl_line_func LineFunc = tnl->Driver.Render.Line; \
+ const tnl_triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
+ const tnl_quad_func QuadFunc = tnl->Driver.Render.Quad; \
const GLboolean stipple = ctx->Line.StippleFlag; \
(void) (LineFunc && TriangleFunc && QuadFunc); \
(void) elt; (void) mask; (void) sz; (void) stipple;
GLuint flags )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
- render_func render_tris = tnl->Driver.Render.PrimTabElts[GL_TRIANGLES];
+ tnl_render_func render_tris = tnl->Driver.Render.PrimTabElts[GL_TRIANGLES];
struct vertex_buffer *VB = &tnl->vb;
const GLuint * const elt = VB->Elts;
GLubyte *mask = VB->ClipMask;
TNLcontext *tnl = TNL_CONTEXT(ctx); \
struct vertex_buffer *VB = &tnl->vb; \
const GLuint * const elt = VB->Elts; \
- const line_func LineFunc = tnl->Driver.Render.Line; \
- const triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
- const quad_func QuadFunc = tnl->Driver.Render.Quad; \
+ const tnl_line_func LineFunc = tnl->Driver.Render.Line; \
+ const tnl_triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
+ const tnl_quad_func QuadFunc = tnl->Driver.Render.Quad; \
(void) (LineFunc && TriangleFunc && QuadFunc); \
(void) elt;
/* Clip and render whole vertex buffers */
/**********************************************************************/
-points_func _gldSetupPoints[4] = {
+tnl_points_func _gldSetupPoints[4] = {
gld_Points2D_DX8,
gld_Points2D_DX8,
gld_Points2D_DX8,
gld_Points2D_DX8
};
-line_func _gldSetupLine[4] = {
+tnl_line_func _gldSetupLine[4] = {
gld_Line2DFlat_DX8,
gld_Line2DSmooth_DX8,
gld_Line2DFlat_DX8,
gld_Line2DSmooth_DX8,
};
-triangle_func _gldSetupTriangle[4] = {
+tnl_triangle_func _gldSetupTriangle[4] = {
gld_Triangle2DFlat_DX8,
gld_Triangle2DSmooth_DX8,
gld_Triangle2DFlatExtras_DX8,
gld_Triangle2DSmoothExtras_DX8
};
-quad_func _gldSetupQuad[4] = {
+tnl_quad_func _gldSetupQuad[4] = {
gld_Quad2DFlat_DX8,
gld_Quad2DSmooth_DX8,
gld_Quad2DFlatExtras_DX8,
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
GLuint new_inputs = stage->changed_inputs;
- render_func *tab;
+ tnl_render_func *tab;
GLint pass = 0;
GLD_pb_dx8 *gldPB;
TNLcontext *tnl;
struct vertex_buffer *VB;
GLuint new_inputs;
- render_func *tab;
+ tnl_render_func *tab;
GLint pass;
GLD_pb_dx9 *gldPB = &gld->PB3d;
/*
-/* $Id: gld_vb_mesa_render_dx9.c,v 1.1 2004/04/20 11:13:11 alanh Exp $ */
+/* $Id: gld_vb_mesa_render_dx9.c,v 1.2 2004/07/01 13:14:07 keithw Exp $ */
/*
* Mesa 3-D graphics library
const GLuint * const elt = VB->Elts; \
const GLubyte *mask = VB->ClipMask; \
const GLuint sz = VB->ClipPtr->size; \
- const line_func LineFunc = tnl->Driver.Render.Line; \
- const triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
- const quad_func QuadFunc = tnl->Driver.Render.Quad; \
+ const tnl_line_func LineFunc = tnl->Driver.Render.Line; \
+ const tnl_triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
+ const tnl_quad_func QuadFunc = tnl->Driver.Render.Quad; \
const GLboolean stipple = ctx->Line.StippleFlag; \
(void) (LineFunc && TriangleFunc && QuadFunc); \
(void) elt; (void) mask; (void) sz; (void) stipple;
GLuint flags )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
- render_func render_tris = tnl->Driver.Render.PrimTabElts[GL_TRIANGLES];
+ tnl_render_func render_tris = tnl->Driver.Render.PrimTabElts[GL_TRIANGLES];
struct vertex_buffer *VB = &tnl->vb;
const GLuint * const elt = VB->Elts;
GLubyte *mask = VB->ClipMask;
TNLcontext *tnl = TNL_CONTEXT(ctx); \
struct vertex_buffer *VB = &tnl->vb; \
const GLuint * const elt = VB->Elts; \
- const line_func LineFunc = tnl->Driver.Render.Line; \
- const triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
- const quad_func QuadFunc = tnl->Driver.Render.Quad; \
+ const tnl_line_func LineFunc = tnl->Driver.Render.Line; \
+ const tnl_triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
+ const tnl_quad_func QuadFunc = tnl->Driver.Render.Quad; \
(void) (LineFunc && TriangleFunc && QuadFunc); \
(void) elt;
/* Clip and render whole vertex buffers */
/**********************************************************************/
-points_func _gldSetupPoints[4] = {
+tnl_points_func _gldSetupPoints[4] = {
gld_Points2D_DX9,
gld_Points2D_DX9,
gld_Points2D_DX9,
gld_Points2D_DX9
};
-line_func _gldSetupLine[4] = {
+tnl_line_func _gldSetupLine[4] = {
gld_Line2DFlat_DX9,
gld_Line2DSmooth_DX9,
gld_Line2DFlat_DX9,
gld_Line2DSmooth_DX9,
};
-triangle_func _gldSetupTriangle[4] = {
+tnl_triangle_func _gldSetupTriangle[4] = {
gld_Triangle2DFlat_DX9,
gld_Triangle2DSmooth_DX9,
gld_Triangle2DFlatExtras_DX9,
gld_Triangle2DSmoothExtras_DX9
};
-quad_func _gldSetupQuad[4] = {
+tnl_quad_func _gldSetupQuad[4] = {
gld_Quad2DFlat_DX9,
gld_Quad2DSmooth_DX9,
gld_Quad2DFlatExtras_DX9,
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
GLuint new_inputs = stage->changed_inputs;
- render_func *tab;
+ tnl_render_func *tab;
GLint pass = 0;
GLD_pb_dx9 *gldPB;
//---------------------------------------------------------------------------
/* Return pointer to accelerated points function */
-extern points_func choose_points_function( GLcontext* ctx )
+extern tnl_points_func choose_points_function( GLcontext* ctx )
{
return NULL;
}
//---------------------------------------------------------------------------
-static line_func choose_line_function( GLcontext* ctx )
+static tnl_line_func choose_line_function( GLcontext* ctx )
{
}
#define SS_UNFILLED_BIT 0x8
#define SS_MAX_TRIFUNC 0x10
-static triangle_func tri_tab[SS_MAX_TRIFUNC];
-static quad_func quad_tab[SS_MAX_TRIFUNC];
+static tnl_triangle_func tri_tab[SS_MAX_TRIFUNC];
+static tnl_quad_func quad_tab[SS_MAX_TRIFUNC];
static void _swsetup_render_line_tri( GLcontext *ctx,
#define VERT_BUFFER_SIZE 2048 /* 8kbytes */
-typedef void (*attrfv_func)( const GLfloat * );
+typedef void (*tnl_attrfv_func)( const GLfloat * );
struct _tnl_dynfn {
struct _tnl_dynfn *next, *prev;
GLuint counter, initial_counter;
struct tnl_copied_vtx copied;
- attrfv_func tabfv[_TNL_MAX_ATTR_CODEGEN+1][4]; /* plus 1 for ERROR_ATTRIB */
+ tnl_attrfv_func tabfv[_TNL_MAX_ATTR_CODEGEN+1][4]; /* plus 1 for ERROR_ATTRIB */
struct _tnl_dynfn_lists cache;
struct _tnl_dynfn_generators gen;
struct tnl_clipspace;
struct tnl_clipspace_attr;
-typedef void (*extract_func)( const struct tnl_clipspace_attr *a, GLfloat *out,
- const GLubyte *v );
+typedef void (*tnl_extract_func)( const struct tnl_clipspace_attr *a,
+ GLfloat *out,
+ const GLubyte *v );
-typedef void (*insert_func)( const struct tnl_clipspace_attr *a, GLubyte *v,
- const GLfloat *in );
+typedef void (*tnl_insert_func)( const struct tnl_clipspace_attr *a,
+ GLubyte *v,
+ const GLfloat *in );
-typedef void (*emit_func)( GLcontext *ctx, GLuint start,
- GLuint end, void *dest );
+typedef void (*tnl_emit_func)( GLcontext *ctx,
+ GLuint start,
+ GLuint end, void *dest );
/**
GLuint vertattrsize; /* size of the attribute in bytes */
GLubyte *inputptr;
GLuint inputstride;
- insert_func *insert;
- insert_func emit;
- extract_func extract;
+ tnl_insert_func *insert;
+ tnl_insert_func emit;
+ tnl_extract_func extract;
const GLfloat *vp; /* NDC->Viewport mapping matrix */
};
GLint, GLint );
GLboolean (*emit_const_ubyte)( struct tnl_clipspace_codegen *,
GLint, GLubyte );
- emit_func (*emit_store_func)( struct tnl_clipspace_codegen * );
+ tnl_emit_func (*emit_store_func)( struct tnl_clipspace_codegen * );
struct _tnl_dynfn codegen_list;
-typedef void (*points_func)( GLcontext *ctx, GLuint first, GLuint last );
-typedef void (*line_func)( GLcontext *ctx, GLuint v1, GLuint v2 );
-typedef void (*triangle_func)( GLcontext *ctx,
- GLuint v1, GLuint v2, GLuint v3 );
-typedef void (*quad_func)( GLcontext *ctx, GLuint v1, GLuint v2,
- GLuint v3, GLuint v4 );
-typedef void (*render_func)( GLcontext *ctx, GLuint start, GLuint count,
- GLuint flags );
-typedef void (*interp_func)( GLcontext *ctx,
- GLfloat t, GLuint dst, GLuint out, GLuint in,
- GLboolean force_boundary );
-typedef void (*copy_pv_func)( GLcontext *ctx, GLuint dst, GLuint src );
-typedef void (*setup_func)( GLcontext *ctx,
- GLuint start, GLuint end,
- GLuint new_inputs);
+typedef void (*tnl_points_func)( GLcontext *ctx, GLuint first, GLuint last );
+typedef void (*tnl_line_func)( GLcontext *ctx, GLuint v1, GLuint v2 );
+typedef void (*tnl_triangle_func)( GLcontext *ctx,
+ GLuint v1, GLuint v2, GLuint v3 );
+typedef void (*tnl_quad_func)( GLcontext *ctx, GLuint v1, GLuint v2,
+ GLuint v3, GLuint v4 );
+typedef void (*tnl_render_func)( GLcontext *ctx, GLuint start, GLuint count,
+ GLuint flags );
+typedef void (*tnl_interp_func)( GLcontext *ctx,
+ GLfloat t, GLuint dst, GLuint out, GLuint in,
+ GLboolean force_boundary );
+typedef void (*tnl_copy_pv_func)( GLcontext *ctx, GLuint dst, GLuint src );
+typedef void (*tnl_setup_func)( GLcontext *ctx,
+ GLuint start, GLuint end,
+ GLuint new_inputs);
/**
struct tnl_clipspace_attr attr[_TNL_ATTRIB_MAX];
GLuint attr_count;
- emit_func emit;
- interp_func interp;
- copy_pv_func copy_pv;
+ tnl_emit_func emit;
+ tnl_interp_func interp;
+ tnl_copy_pv_func copy_pv;
struct tnl_clipspace_codegen codegen;
};
* modes accepted by glBegin().
*/
- interp_func Interp;
+ tnl_interp_func Interp;
/* The interp function is called by the clipping routines when we need
* to generate an interpolated vertex. All pertinant vertex ancilliary
* data should be computed by interpolating between the 'in' and 'out'
* vertices.
*/
- copy_pv_func CopyPV;
+ tnl_copy_pv_func CopyPV;
/* The copy function is used to make a copy of a vertex. All pertinant
* vertex attributes should be copied.
*/
void (*ClippedLine)( GLcontext *ctx, GLuint v0, GLuint v1 );
/* Render a line between the two vertices given by indexes v0 and v1. */
- points_func Points; /* must now respect vb->elts */
- line_func Line;
- triangle_func Triangle;
- quad_func Quad;
+ tnl_points_func Points; /* must now respect vb->elts */
+ tnl_line_func Line;
+ tnl_triangle_func Triangle;
+ tnl_quad_func Quad;
/* These functions are called in order to render points, lines,
* triangles and quads. These are only called via the T&L module.
*/
- render_func *PrimTabVerts;
- render_func *PrimTabElts;
+ tnl_render_func *PrimTabVerts;
+ tnl_render_func *PrimTabElts;
/* Render whole unclipped primitives (points, lines, linestrips,
* lineloops, etc). The tables are indexed by the GL enum of the
* primitive to be rendered. RenderTabVerts is used for non-indexed
/* Reset the hardware's line stipple counter.
*/
- setup_func BuildVertices;
+ tnl_setup_func BuildVertices;
/* This function is called whenever new vertices are required for
* rendering. The vertices in question are those n such that start
* <= n < end. The new_inputs parameter indicates those fields of
/* Convenience routines provided by t_vb_render.c:
*/
-extern render_func _tnl_render_tab_elts[];
-extern render_func _tnl_render_tab_verts[];
+extern tnl_render_func _tnl_render_tab_elts[];
+extern tnl_render_func _tnl_render_tab_verts[];
extern void _tnl_RenderClippedPolygon( GLcontext *ctx,
const GLuint *elts, GLuint n );
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
- interp_func interp = tnl->Driver.Render.Interp;
+ tnl_interp_func interp = tnl->Driver.Render.Interp;
GLfloat (*coord)[4] = VB->ClipPtr->data;
GLuint ii = i, jj = j, p;
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
- interp_func interp = tnl->Driver.Render.Interp;
+ tnl_interp_func interp = tnl->Driver.Render.Interp;
GLfloat (*coord)[4] = VB->ClipPtr->data;
GLuint pv = v2;
GLuint vlist[2][MAX_CLIPPED_VERTICES];
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
- interp_func interp = tnl->Driver.Render.Interp;
+ tnl_interp_func interp = tnl->Driver.Render.Interp;
GLfloat (*coord)[4] = VB->ClipPtr->data;
GLuint pv = v3;
GLuint vlist[2][MAX_CLIPPED_VERTICES];
const GLuint * const elt = VB->Elts; \
const GLubyte *mask = VB->ClipMask; \
const GLuint sz = VB->ClipPtr->size; \
- const line_func LineFunc = tnl->Driver.Render.Line; \
- const triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
- const quad_func QuadFunc = tnl->Driver.Render.Quad; \
+ const tnl_line_func LineFunc = tnl->Driver.Render.Line; \
+ const tnl_triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
+ const tnl_quad_func QuadFunc = tnl->Driver.Render.Quad; \
const GLboolean stipple = ctx->Line.StippleFlag; \
(void) (LineFunc && TriangleFunc && QuadFunc); \
(void) elt; (void) mask; (void) sz; (void) stipple;
GLuint flags )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
- render_func render_tris = tnl->Driver.Render.PrimTabElts[GL_TRIANGLES];
+ tnl_render_func render_tris = tnl->Driver.Render.PrimTabElts[GL_TRIANGLES];
struct vertex_buffer *VB = &tnl->vb;
const GLuint * const elt = VB->Elts;
GLubyte *mask = VB->ClipMask;
TNLcontext *tnl = TNL_CONTEXT(ctx); \
struct vertex_buffer *VB = &tnl->vb; \
const GLuint * const elt = VB->Elts; \
- const line_func LineFunc = tnl->Driver.Render.Line; \
- const triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
- const quad_func QuadFunc = tnl->Driver.Render.Quad; \
+ const tnl_line_func LineFunc = tnl->Driver.Render.Line; \
+ const tnl_triangle_func TriangleFunc = tnl->Driver.Render.Triangle; \
+ const tnl_quad_func QuadFunc = tnl->Driver.Render.Quad; \
const GLboolean stipple = ctx->Line.StippleFlag; \
(void) (LineFunc && TriangleFunc && QuadFunc); \
(void) elt; (void) stipple
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
GLuint new_inputs = stage->changed_inputs;
- render_func *tab;
+ tnl_render_func *tab;
GLint pass = 0;
/* Allow the drivers to lock before projected verts are built so
static struct {
const char *name;
- extract_func extract;
- insert_func insert[4];
+ tnl_extract_func extract;
+ tnl_insert_func insert[4];
const GLuint attrsize;
} format_info[EMIT_MAX] = {
extern void _tnl_invalidate_vertex_state( GLcontext *ctx, GLuint new_state );
-extern emit_func _tnl_codegen_emit( GLcontext *ctx );
+extern tnl_emit_func _tnl_codegen_emit( GLcontext *ctx );
#define REG_IN (0<<16)
#define REG_OUT (1<<16)
emit(p, " }\n");
}
-static emit_func print_store_func( struct tnl_clipspace_codegen *p )
+static tnl_emit_func print_store_func( struct tnl_clipspace_codegen *p )
{
fprintf(stderr, "%s: emitted:\n%s\n", __FUNCTION__, p->buf);
* the pipeline has been run.
*/
-emit_func _tnl_codegen_emit( GLcontext *ctx )
+tnl_emit_func _tnl_codegen_emit( GLcontext *ctx )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
static void reset_attrfv( TNLcontext *tnl );
-static attrfv_func choose[_TNL_MAX_ATTR_CODEGEN+1][4]; /* +1 for ERROR_ATTRIB */
-static attrfv_func generic_attr_func[_TNL_MAX_ATTR_CODEGEN][4];
+static tnl_attrfv_func choose[_TNL_MAX_ATTR_CODEGEN+1][4]; /* +1 for ERROR_ATTRIB */
+static tnl_attrfv_func generic_attr_func[_TNL_MAX_ATTR_CODEGEN][4];
/* Close off the last primitive, execute the buffer, restart the
}
-static attrfv_func do_codegen( GLcontext *ctx, GLuint attr, GLuint sz )
+static tnl_attrfv_func do_codegen( GLcontext *ctx, GLuint attr, GLuint sz )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct _tnl_dynfn *dfn = 0;
}
if (dfn)
- return (attrfv_func) dfn->code;
+ return (tnl_attrfv_func) dfn->code;
else
return 0;
}
* entrypoint is called for the first time.
*/
-static attrfv_func do_choose( GLuint attr, GLuint sz )
+static tnl_attrfv_func do_choose( GLuint attr, GLuint sz )
{
GET_CURRENT_CONTEXT( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
#define CHOOSE( ATTR, N ) \
static void choose_##ATTR##_##N( const GLfloat *v ) \
{ \
- attrfv_func f = do_choose(ATTR, N); \
+ tnl_attrfv_func f = do_choose(ATTR, N); \
f( v ); \
}
*/
extern void _tnl_generic_exec_vtxfmt_init( GLcontext *ctx );
-extern void _tnl_generic_attr_table_init( attrfv_func (*tab)[4] );
+extern void _tnl_generic_attr_table_init( tnl_attrfv_func (*tab)[4] );
/* t_vtx_x86.c:
*/
extern void _tnl_x86_exec_vtxfmt_init( GLcontext *ctx );
-extern void _tnl_x86choosers( attrfv_func (*choose)[4],
- attrfv_func (*do_choose)( GLuint attr,
+extern void _tnl_x86choosers( tnl_attrfv_func (*choose)[4],
+ tnl_attrfv_func (*do_choose)( GLuint attr,
GLuint sz ));
ATTRS( 14 )
ATTRS( 15 )
-void _tnl_generic_attr_table_init( attrfv_func (*tab)[4] )
+void _tnl_generic_attr_table_init( tnl_attrfv_func (*tab)[4] )
{
INIT( tab, 0 );
INIT( tab, 1 );
/* Install the codegen'ed choosers.
* We should keep a list and free them in the end...
*/
-void _tnl_x86choosers( attrfv_func (*choose)[4],
- attrfv_func (*do_choose)( GLuint attr,
+void _tnl_x86choosers( tnl_attrfv_func (*choose)[4],
+ tnl_attrfv_func (*do_choose)( GLuint attr,
GLuint sz ))
{
int attr, size;
FIXUP(code, 0, 0, attr);
FIXUP(code, 0, 1, size + 1);
FIXUPREL(code, 0, 2, do_choose);
- choose[attr][size] = (attrfv_func)code;
+ choose[attr][size] = (tnl_attrfv_func)code;
}
}
}
}
-void _tnl_x86choosers( attrfv_func (*choose)[4],
- attrfv_func (*do_choose)( GLuint attr,
+void _tnl_x86choosers( tnl_attrfv_func (*choose)[4],
+ tnl_attrfv_func (*do_choose)( GLuint attr,
GLuint sz ))
{
(void) choose;
-static render_func TAG(render_tab_verts)[GL_POLYGON+2] =
+static tnl_render_func TAG(render_tab_verts)[GL_POLYGON+2] =
{
TAG(render_points_verts),
TAG(render_lines_verts),
-static render_func TAG(render_tab_elts)[GL_POLYGON+2] =
+static tnl_render_func TAG(render_tab_elts)[GL_POLYGON+2] =
{
TAG(render_points_elts),
TAG(render_lines_elts),
-static render_func TAG(render_tab_verts)[GL_POLYGON+2] =
+static tnl_render_func TAG(render_tab_verts)[GL_POLYGON+2] =
{
TAG(render_points_verts),
TAG(render_lines_verts),
-static render_func TAG(render_tab_elts)[GL_POLYGON+2] =
+static tnl_render_func TAG(render_tab_elts)[GL_POLYGON+2] =
{
TAG(render_points_elts),
TAG(render_lines_elts),