From 009aa3ef5ea6bc13c903d6f902b7039adef8fc74 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 30 Jun 2004 11:48:21 +0000 Subject: Add infrastructure for t_vertex.c codegen. Add an example driver for this which spits out C code for the generated functions. --- src/mesa/tnl/t_vertex.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/mesa/tnl/t_vertex.h') diff --git a/src/mesa/tnl/t_vertex.h b/src/mesa/tnl/t_vertex.h index 8c93907c6f2..9f4847f6922 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 -- cgit v1.2.3