X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Ftnl%2Ft_context.h;h=bc01646247cebd777b7961a4192fafcf87f8cfc3;hb=f9995b30756140724f41daf963fa06167912be7f;hp=d2b13f1b02086d5e6a5d6e0723d0a53f9b367212;hpb=df582ca767a38f185f9b4c449e7ed4266c414ae2;p=mesa.git diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index d2b13f1b020..bc01646247c 100644 --- a/src/mesa/tnl/t_context.h +++ b/src/mesa/tnl/t_context.h @@ -53,9 +53,7 @@ #include "main/bitset.h" #include "main/mtypes.h" -#include "math/m_matrix.h" #include "math/m_vector.h" -#include "math/m_xform.h" #include "vbo/vbo.h" @@ -198,12 +196,12 @@ struct vertex_buffer */ GLuint Count; /**< Number of vertices currently in buffer */ - /* Pointers to current data. - * XXX some of these fields alias AttribPtr below and should be removed - * such as FogCoordPtr, etc. + /* Pointers to current data. Most of the data is in AttribPtr -- all of + * it that is one of VERT_ATTRIB_X. For things only produced by TNL, + * such as backface color or eye-space coordinates, they are stored + * here. */ GLuint *Elts; - GLvector4f *ObjPtr; /* _TNL_BIT_POS */ GLvector4f *EyePtr; /* _TNL_BIT_POS */ GLvector4f *ClipPtr; /* _TNL_BIT_POS */ GLvector4f *NdcPtr; /* _TNL_BIT_POS */ @@ -212,10 +210,9 @@ struct vertex_buffer GLubyte *ClipMask; /* _TNL_BIT_POS */ GLfloat *NormalLengthPtr; /* _TNL_BIT_NORMAL */ GLboolean *EdgeFlag; /* _TNL_BIT_EDGEFLAG */ - GLvector4f *IndexPtr[2]; /* _TNL_BIT_INDEX */ - GLvector4f *ColorPtr[2]; /* _TNL_BIT_COLOR0 */ - GLvector4f *SecondaryColorPtr[2]; /* _TNL_BIT_COLOR1 */ - GLvector4f *FogCoordPtr; /* _TNL_BIT_FOG */ + GLvector4f *BackfaceIndexPtr; + GLvector4f *BackfaceColorPtr; + GLvector4f *BackfaceSecondaryColorPtr; const struct _mesa_prim *Primitive; GLuint PrimitiveCount; @@ -238,7 +235,7 @@ struct tnl_pipeline_stage /* Allocate private data */ - GLboolean (*create)( GLcontext *ctx, struct tnl_pipeline_stage * ); + GLboolean (*create)( struct gl_context *ctx, struct tnl_pipeline_stage * ); /* Free private data. */ @@ -247,7 +244,7 @@ struct tnl_pipeline_stage /* Called on any statechange or input array size change or * input array change to/from zero stride. */ - void (*validate)( GLcontext *ctx, struct tnl_pipeline_stage * ); + void (*validate)( struct gl_context *ctx, struct tnl_pipeline_stage * ); /* Called from _tnl_run_pipeline(). The stage.changed_inputs value * encodes all inputs to thee struct which have changed. If @@ -257,7 +254,7 @@ struct tnl_pipeline_stage * Return value: GL_TRUE - keep going * GL_FALSE - finished pipeline */ - GLboolean (*run)( GLcontext *ctx, struct tnl_pipeline_stage * ); + GLboolean (*run)( struct gl_context *ctx, struct tnl_pipeline_stage * ); }; @@ -287,7 +284,7 @@ typedef void (*tnl_insert_func)( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in ); -typedef void (*tnl_emit_func)( GLcontext *ctx, +typedef void (*tnl_emit_func)( struct gl_context *ctx, GLuint count, GLubyte *dest ); @@ -314,19 +311,19 @@ struct tnl_clipspace_attr -typedef void (*tnl_points_func)( GLcontext *ctx, GLuint first, GLuint last ); -typedef void (*tnl_line_func)( GLcontext *ctx, GLuint v1, GLuint v2 ); -typedef void (*tnl_triangle_func)( GLcontext *ctx, +typedef void (*tnl_points_func)( struct gl_context *ctx, GLuint first, GLuint last ); +typedef void (*tnl_line_func)( struct gl_context *ctx, GLuint v1, GLuint v2 ); +typedef void (*tnl_triangle_func)( struct gl_context *ctx, GLuint v1, GLuint v2, GLuint v3 ); -typedef void (*tnl_quad_func)( GLcontext *ctx, GLuint v1, GLuint v2, +typedef void (*tnl_quad_func)( struct gl_context *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint v4 ); -typedef void (*tnl_render_func)( GLcontext *ctx, GLuint start, GLuint count, +typedef void (*tnl_render_func)( struct gl_context *ctx, GLuint start, GLuint count, GLuint flags ); -typedef void (*tnl_interp_func)( GLcontext *ctx, +typedef void (*tnl_interp_func)( struct gl_context *ctx, GLfloat t, GLuint dst, GLuint out, GLuint in, GLboolean force_boundary ); -typedef void (*tnl_copy_pv_func)( GLcontext *ctx, GLuint dst, GLuint src ); -typedef void (*tnl_setup_func)( GLcontext *ctx, +typedef void (*tnl_copy_pv_func)( struct gl_context *ctx, GLuint dst, GLuint src ); +typedef void (*tnl_setup_func)( struct gl_context *ctx, GLuint start, GLuint end, GLuint new_inputs); @@ -380,7 +377,7 @@ struct tnl_clipspace struct tnl_clipspace_fastpath *fastpath; - void (*codegen_emit)( GLcontext *ctx ); + void (*codegen_emit)( struct gl_context *ctx ); }; @@ -390,13 +387,13 @@ struct tnl_device_driver *** TNL Pipeline ***/ - void (*RunPipeline)(GLcontext *ctx); + void (*RunPipeline)(struct gl_context *ctx); /* Replaces PipelineStart/PipelineFinish -- intended to allow * drivers to wrap _tnl_run_pipeline() with code to validate state * and grab/release hardware locks. */ - void (*NotifyMaterialChange)(GLcontext *ctx); + void (*NotifyMaterialChange)(struct gl_context *ctx); /* Alert tnl-aware drivers of changes to material. */ @@ -405,14 +402,14 @@ struct tnl_device_driver ***/ struct { - void (*Start)(GLcontext *ctx); - void (*Finish)(GLcontext *ctx); + void (*Start)(struct gl_context *ctx); + void (*Finish)(struct gl_context *ctx); /* Called before and after all rendering operations, including DrawPixels, * ReadPixels, Bitmap, span functions, and CopyTexImage, etc commands. * These are a suitable place for grabbing/releasing hardware locks. */ - void (*PrimitiveNotify)(GLcontext *ctx, GLenum mode); + void (*PrimitiveNotify)(struct gl_context *ctx, GLenum mode); /* Called between RenderStart() and RenderFinish() to indicate the * type of primitive we're about to draw. Mode will be one of the * modes accepted by glBegin(). @@ -430,12 +427,12 @@ struct tnl_device_driver * vertex attributes should be copied. */ - void (*ClippedPolygon)( GLcontext *ctx, const GLuint *elts, GLuint n ); + void (*ClippedPolygon)( struct gl_context *ctx, const GLuint *elts, GLuint n ); /* Render a polygon with vertices whose indexes are in the * array. */ - void (*ClippedLine)( GLcontext *ctx, GLuint v0, GLuint v1 ); + void (*ClippedLine)( struct gl_context *ctx, GLuint v0, GLuint v1 ); /* Render a line between the two vertices given by indexes v0 and v1. */ tnl_points_func Points; /* must now respect vb->elts */ @@ -455,7 +452,7 @@ struct tnl_device_driver * vertices. */ - void (*ResetLineStipple)( GLcontext *ctx ); + void (*ResetLineStipple)( struct gl_context *ctx ); /* Reset the hardware's line stipple counter. */ @@ -470,7 +467,7 @@ struct tnl_device_driver */ - GLboolean (*Multipass)( GLcontext *ctx, GLuint passno ); + GLboolean (*Multipass)( struct gl_context *ctx, GLuint passno ); /* Driver may request additional render passes by returning GL_TRUE * when this function is called. This function will be called * after the first pass, and passes will be made until the function @@ -542,7 +539,7 @@ typedef struct extern void -tnl_clip_prepare(GLcontext *ctx); +tnl_clip_prepare(struct gl_context *ctx); #endif