summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_vertex.h
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2004-06-30 11:48:21 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2004-06-30 11:48:21 +0000
commit009aa3ef5ea6bc13c903d6f902b7039adef8fc74 (patch)
tree5a5cf488e21fc1445732af4d86a0f8622c343023 /src/mesa/tnl/t_vertex.h
parent8e77da1cd7d63af5e7ffcf7ea220cdaf1bdc8162 (diff)
Add infrastructure for t_vertex.c codegen. Add an example driver
for this which spits out C code for the generated functions.
Diffstat (limited to 'src/mesa/tnl/t_vertex.h')
-rw-r--r--src/mesa/tnl/t_vertex.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_vertex.h b/src/mesa/tnl/t_vertex.h
index 8c93907c6f..9f4847f692 100644
--- a/src/mesa/tnl/t_vertex.h
+++ b/src/mesa/tnl/t_vertex.h
@@ -124,5 +124,24 @@ extern void _tnl_invalidate_vertices( GLcontext *ctx, GLuint newinputs );
extern void _tnl_invalidate_vertex_state( GLcontext *ctx, GLuint new_state );
+extern emit_func _tnl_codegen_emit( GLcontext *ctx );
+
+#define REG_IN (0<<16)
+#define REG_OUT (1<<16)
+#define REG_VP (2<<16)
+#define REG_TMP (3<<16)
+#define REG_MASK (3<<16)
+
+#define REG_OFFSET_MASK 0xffff
+
+#define in( offset ) (REG_IN | (offset))
+#define out( offset ) (REG_OUT | (offset))
+#define vp( offset ) (REG_VP | (offset))
+#define tmp( offset ) (REG_TMP | (offset))
+
+
+extern void _tnl_init_c_codegen( struct tnl_clipspace_codegen *p );
+
+#define GET_VERTEX_STATE(ctx) &(TNL_CONTEXT(ctx)->clipspace)
#endif