diff options
Diffstat (limited to 'src/mesa/tnl/t_context.h')
-rw-r--r-- | src/mesa/tnl/t_context.h | 60 |
1 files changed, 26 insertions, 34 deletions
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index e8a3c259822..1d94174b7d9 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 ); }; |