summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_context.h
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2005-05-18 15:26:48 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2005-05-18 15:26:48 +0000
commit2b2bd08589099cb480b983835b01cc76a766a3c4 (patch)
treef60f4e5dda9060ceeb6cd9bace28d73250db1921 /src/mesa/tnl/t_context.h
parentdc7fc173966e314f89502473044933a099c838ae (diff)
downloadexternal_mesa3d-2b2bd08589099cb480b983835b01cc76a766a3c4.zip
external_mesa3d-2b2bd08589099cb480b983835b01cc76a766a3c4.tar.gz
external_mesa3d-2b2bd08589099cb480b983835b01cc76a766a3c4.tar.bz2
Remove old t_vertex.c codegen infrastructure, tie in new code.
Currently disabled, can enable with MESA_EXPERIMENTAL=t.
Diffstat (limited to 'src/mesa/tnl/t_context.h')
-rw-r--r--src/mesa/tnl/t_context.h60
1 files changed, 26 insertions, 34 deletions
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h
index e8a3c25..1d94174 100644
--- a/src/mesa/tnl/t_context.h
+++ b/src/mesa/tnl/t_context.h
@@ -536,6 +536,7 @@ struct tnl_clipspace_attr
GLuint vertattrsize; /* size of the attribute in bytes */
GLubyte *inputptr;
GLuint inputstride;
+ GLuint inputsize;
const tnl_insert_func *insert;
tnl_insert_func emit;
tnl_extract_func extract;
@@ -543,39 +544,6 @@ struct tnl_clipspace_attr
};
-struct tnl_clipspace_codegen {
- GLboolean (*emit_header)( struct tnl_clipspace_codegen *,
- struct tnl_clipspace *);
- GLboolean (*emit_footer)( struct tnl_clipspace_codegen * );
- GLboolean (*emit_attr_header)( struct tnl_clipspace_codegen *,
- struct tnl_clipspace_attr *,
- GLint j, GLenum out_type,
- GLboolean need_vp );
- GLboolean (*emit_attr_footer)( struct tnl_clipspace_codegen * );
- GLboolean (*emit_mov)( struct tnl_clipspace_codegen *,
- GLint, GLint );
- GLboolean (*emit_const)( struct tnl_clipspace_codegen *,
- GLint, GLfloat );
- GLboolean (*emit_mad)( struct tnl_clipspace_codegen *,
- GLint, GLint, GLint, GLint );
- GLboolean (*emit_float_to_chan)( struct tnl_clipspace_codegen *,
- GLint, GLint );
- GLboolean (*emit_const_chan)( struct tnl_clipspace_codegen *,
- GLint, GLchan );
- GLboolean (*emit_float_to_ubyte)( struct tnl_clipspace_codegen *,
- GLint, GLint );
- GLboolean (*emit_const_ubyte)( struct tnl_clipspace_codegen *,
- GLint, GLubyte );
- tnl_emit_func (*emit_store_func)( struct tnl_clipspace_codegen * );
-
- struct _tnl_dynfn codegen_list;
-
- char *buf;
- int buf_size;
- int buf_used;
- int out_offset;
-};
-
typedef void (*tnl_points_func)( GLcontext *ctx, GLuint first, GLuint last );
@@ -595,6 +563,20 @@ typedef void (*tnl_setup_func)( GLcontext *ctx,
GLuint new_inputs);
+struct tnl_clipspace_fastpath {
+ GLuint vertex_size;
+ GLuint attr_count;
+ GLboolean match_strides;
+
+ struct {
+ GLuint format;
+ GLuint stride;
+ } *attr;
+
+ tnl_emit_func func;
+ struct tnl_clipspace_fastpath *next;
+};
+
/**
* Used to describe conversion of vertex arrays to vertex structures.
* I.e. Structure of arrays to arrays of structs.
@@ -616,7 +598,17 @@ struct tnl_clipspace
tnl_interp_func interp;
tnl_copy_pv_func copy_pv;
- struct tnl_clipspace_codegen codegen;
+ /* Parameters and constants for codegen:
+ */
+ GLboolean need_viewport;
+ GLfloat vp_scale[4];
+ GLfloat vp_xlate[4];
+ GLfloat chan_scale[4];
+ GLfloat identity[4];
+
+ struct tnl_clipspace_fastpath *fastpath;
+
+ void (*codegen_emit)( GLcontext *ctx );
};