summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl/t_context.h')
-rw-r--r--src/mesa/tnl/t_context.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h
index 1293db3bf3f..ec5675faf91 100644
--- a/src/mesa/tnl/t_context.h
+++ b/src/mesa/tnl/t_context.h
@@ -248,10 +248,28 @@ struct tnl_copied_vtx {
#define VERT_BUFFER_SIZE 2048 /* 8kbytes */
-#define ERROR_ATTRIB _TNL_ATTRIB_MAX /* error path for t_vtx_api.c */
typedef void (*attrfv_func)( const GLfloat * );
+struct dynfn {
+ struct dynfn *next, *prev;
+ int key;
+ char *code;
+};
+
+struct dynfn_lists {
+ struct dynfn Vertex[4];
+ struct dynfn Attribute[4];
+};
+
+struct dynfn_generators {
+ struct dynfn *(*Vertex[4])( GLcontext *ctx, int key );
+ struct dynfn *(*Attribute[4])( GLcontext *ctx, int key );
+};
+
+#define _TNL_MAX_ATTR_CODEGEN 16
+
+
/* The assembly of vertices in immediate mode is separated from
* display list compilation. This allows a simpler immediate mode
* treatment and a display list compiler better suited to
@@ -269,7 +287,12 @@ struct tnl_vtx {
GLfloat *current[_TNL_ATTRIB_MAX]; /* points into ctx->Current, etc */
GLuint counter, initial_counter;
struct tnl_copied_vtx copied;
- attrfv_func tabfv[_TNL_ATTRIB_MAX+1][4]; /* +1 for ERROR_ATTRIB */
+
+ attrfv_func tabfv[_TNL_MAX_ATTR_CODEGEN+1][4]; /* plus 1 for ERROR_ATTRIB */
+
+ struct dynfn_lists cache;
+ struct dynfn_generators gen;
+
struct tnl_eval eval;
GLboolean *edgeflag_tmp;
GLboolean have_materials;
@@ -714,6 +737,7 @@ typedef struct
GLboolean IsolateMaterials;
GLboolean AllowVertexFog;
GLboolean AllowPixelFog;
+ GLboolean AllowCodegen;
GLboolean _DoVertexFog; /* eval fog function at each vertex? */