diff options
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r-- | src/mesa/tnl/NOTES | 18 | ||||
-rw-r--r-- | src/mesa/tnl/t_context.c | 14 | ||||
-rw-r--r-- | src/mesa/tnl/t_context.h | 46 | ||||
-rw-r--r-- | src/mesa/tnl/t_draw.c | 20 | ||||
-rw-r--r-- | src/mesa/tnl/t_pipeline.c | 10 | ||||
-rw-r--r-- | src/mesa/tnl/t_pipeline.h | 10 | ||||
-rw-r--r-- | src/mesa/tnl/t_rasterpos.c | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_cliptmp.h | 6 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_fog.c | 6 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_light.c | 12 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_lighttmp.h | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_normals.c | 6 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_points.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_program.c | 20 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_render.c | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_rendertmp.h | 24 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_texgen.c | 16 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_texmat.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_vertex.c | 10 | ||||
-rw-r--r-- | src/mesa/tnl/t_vertex.c | 40 | ||||
-rw-r--r-- | src/mesa/tnl/t_vertex.h | 42 | ||||
-rw-r--r-- | src/mesa/tnl/t_vertex_generic.c | 14 | ||||
-rw-r--r-- | src/mesa/tnl/t_vertex_sse.c | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_vp_build.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vp_build.h | 2 | ||||
-rw-r--r-- | src/mesa/tnl/tnl.h | 24 |
26 files changed, 191 insertions, 191 deletions
diff --git a/src/mesa/tnl/NOTES b/src/mesa/tnl/NOTES index c39b43485eb..aac5884da87 100644 --- a/src/mesa/tnl/NOTES +++ b/src/mesa/tnl/NOTES @@ -17,16 +17,16 @@ STATE To create and destroy the module: - GLboolean _tnl_CreateContext( GLcontext *ctx ); - void _tnl_DestroyContext( GLcontext *ctx ); + GLboolean _tnl_CreateContext( struct gl_context *ctx ); + void _tnl_DestroyContext( struct gl_context *ctx ); The module is not active by default, and must be installed by calling _tnl_Wakeup(). This function installs internal tnl functions into all the vtxfmt dispatch hooks, thus taking over the task of transformation and lighting entirely: - void _tnl_wakeup_exec( GLcontext *ctx ); - void _tnl_wakeup_save_exec( GLcontext *ctx ); + void _tnl_wakeup_exec( struct gl_context *ctx ); + void _tnl_wakeup_save_exec( struct gl_context *ctx ); This module tracks state changes internally and maintains derived @@ -34,7 +34,7 @@ values based on the current state. For this to work, the driver ensure the following funciton is called whenever the state changes and the swsetup module is 'awake': - void _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ); + void _tnl_InvalidateState( struct gl_context *ctx, GLuint new_state ); There is no explicit call to put the tnl module to sleep. Simply install other function pointers into all the vtxfmt dispatch slots, @@ -58,13 +58,13 @@ higher-level primitives (for example the radeon driver). In addition, the following functions provide further tweaks: extern void -_tnl_need_projected_coords( GLcontext *ctx, GLboolean flag ); +_tnl_need_projected_coords( struct gl_context *ctx, GLboolean flag ); - Direct the default vertex transformation stage to produce/not produce projected clip coordinates. extern void -_tnl_need_dlist_loopback( GLcontext *ctx, GLboolean flag ); +_tnl_need_dlist_loopback( struct gl_context *ctx, GLboolean flag ); - Direct the display list component of the tnl module to replay display lists as 'glVertex' type calls, rather than @@ -76,7 +76,7 @@ _tnl_need_dlist_loopback( GLcontext *ctx, GLboolean flag ); extern void -_tnl_need_dlist_norm_lengths( GLcontext *ctx, GLboolean flag ); +_tnl_need_dlist_norm_lengths( struct gl_context *ctx, GLboolean flag ); - Direct the display list component to enable/disable caching 1/length values for display list normals. Doing so is @@ -88,7 +88,7 @@ DRIVER INTERFACE The module itself offers a minimal driver interface: - void (*RunPipeline)( GLcontext *ctx ); + void (*RunPipeline)( struct gl_context *ctx ); Normally this is set to _tnl_RunPipeline(), however the driver can use this hook to wrap checks or other code around this call. diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index f27c8ad9d6b..47aeeb88594 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -42,7 +42,7 @@ #include "vbo/vbo.h" GLboolean -_tnl_CreateContext( GLcontext *ctx ) +_tnl_CreateContext( struct gl_context *ctx ) { TNLcontext *tnl; @@ -90,7 +90,7 @@ _tnl_CreateContext( GLcontext *ctx ) void -_tnl_DestroyContext( GLcontext *ctx ) +_tnl_DestroyContext( struct gl_context *ctx ) { TNLcontext *tnl = TNL_CONTEXT(ctx); @@ -102,7 +102,7 @@ _tnl_DestroyContext( GLcontext *ctx ) void -_tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) +_tnl_InvalidateState( struct gl_context *ctx, GLuint new_state ) { TNLcontext *tnl = TNL_CONTEXT(ctx); const struct gl_vertex_program *vp = ctx->VertexProgram._Current; @@ -173,7 +173,7 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) void -_tnl_wakeup( GLcontext *ctx ) +_tnl_wakeup( struct gl_context *ctx ) { /* Assume we haven't been getting state updates either: */ @@ -196,14 +196,14 @@ _tnl_wakeup( GLcontext *ctx ) * we should "Divide-by-W". Software renders will want that. */ void -_tnl_need_projected_coords( GLcontext *ctx, GLboolean mode ) +_tnl_need_projected_coords( struct gl_context *ctx, GLboolean mode ) { TNLcontext *tnl = TNL_CONTEXT(ctx); tnl->NeedNdcCoords = mode; } void -_tnl_allow_vertex_fog( GLcontext *ctx, GLboolean value ) +_tnl_allow_vertex_fog( struct gl_context *ctx, GLboolean value ) { TNLcontext *tnl = TNL_CONTEXT(ctx); tnl->AllowVertexFog = value; @@ -213,7 +213,7 @@ _tnl_allow_vertex_fog( GLcontext *ctx, GLboolean value ) } void -_tnl_allow_pixel_fog( GLcontext *ctx, GLboolean value ) +_tnl_allow_pixel_fog( struct gl_context *ctx, GLboolean value ) { TNLcontext *tnl = TNL_CONTEXT(ctx); tnl->AllowPixelFog = value; diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index 258906f7956..bc01646247c 100644 --- a/src/mesa/tnl/t_context.h +++ b/src/mesa/tnl/t_context.h @@ -235,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. */ @@ -244,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 @@ -254,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 * ); }; @@ -284,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 ); @@ -311,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); @@ -377,7 +377,7 @@ struct tnl_clipspace struct tnl_clipspace_fastpath *fastpath; - void (*codegen_emit)( GLcontext *ctx ); + void (*codegen_emit)( struct gl_context *ctx ); }; @@ -387,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. */ @@ -402,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(). @@ -427,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 <n> vertices whose indexes are in the <elts> * 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 */ @@ -452,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. */ @@ -467,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 @@ -539,7 +539,7 @@ typedef struct extern void -tnl_clip_prepare(GLcontext *ctx); +tnl_clip_prepare(struct gl_context *ctx); #endif diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c index fdde294257e..30f1bf323cb 100644 --- a/src/mesa/tnl/t_draw.c +++ b/src/mesa/tnl/t_draw.c @@ -38,7 +38,7 @@ -static GLubyte *get_space(GLcontext *ctx, GLuint bytes) +static GLubyte *get_space(struct gl_context *ctx, GLuint bytes) { TNLcontext *tnl = TNL_CONTEXT(ctx); GLubyte *space = malloc(bytes); @@ -48,7 +48,7 @@ static GLubyte *get_space(GLcontext *ctx, GLuint bytes) } -static void free_space(GLcontext *ctx) +static void free_space(struct gl_context *ctx) { TNLcontext *tnl = TNL_CONTEXT(ctx); GLuint i; @@ -128,7 +128,7 @@ convert_half_to_float(const struct gl_client_array *input, /* Adjust pointer to point at first requested element, convert to * floating point, populate VB->AttribPtr[]. */ -static void _tnl_import_array( GLcontext *ctx, +static void _tnl_import_array( struct gl_context *ctx, GLuint attrib, GLuint count, const struct gl_client_array *input, @@ -202,7 +202,7 @@ static void _tnl_import_array( GLcontext *ctx, #define CLIPVERTS ((6 + MAX_CLIP_PLANES) * 2) -static GLboolean *_tnl_import_edgeflag( GLcontext *ctx, +static GLboolean *_tnl_import_edgeflag( struct gl_context *ctx, const GLvector4f *input, GLuint count) { @@ -221,7 +221,7 @@ static GLboolean *_tnl_import_edgeflag( GLcontext *ctx, } -static void bind_inputs( GLcontext *ctx, +static void bind_inputs( struct gl_context *ctx, const struct gl_client_array *inputs[], GLint count, struct gl_buffer_object **bo, @@ -292,7 +292,7 @@ static void bind_inputs( GLcontext *ctx, /* Translate indices to GLuints and store in VB->Elts. */ -static void bind_indices( GLcontext *ctx, +static void bind_indices( struct gl_context *ctx, const struct _mesa_index_buffer *ib, struct gl_buffer_object **bo, GLuint *nr_bo) @@ -345,7 +345,7 @@ static void bind_indices( GLcontext *ctx, } } -static void bind_prims( GLcontext *ctx, +static void bind_prims( struct gl_context *ctx, const struct _mesa_prim *prim, GLuint nr_prims ) { @@ -356,7 +356,7 @@ static void bind_prims( GLcontext *ctx, VB->PrimitiveCount = nr_prims; } -static void unmap_vbos( GLcontext *ctx, +static void unmap_vbos( struct gl_context *ctx, struct gl_buffer_object **bo, GLuint nr_bo ) { @@ -369,7 +369,7 @@ static void unmap_vbos( GLcontext *ctx, } -void _tnl_vbo_draw_prims(GLcontext *ctx, +void _tnl_vbo_draw_prims(struct gl_context *ctx, const struct gl_client_array *arrays[], const struct _mesa_prim *prim, GLuint nr_prims, @@ -388,7 +388,7 @@ void _tnl_vbo_draw_prims(GLcontext *ctx, * module. In a regular swtnl driver, this can be plugged straight * into the vbo->Driver.DrawPrims() callback. */ -void _tnl_draw_prims( GLcontext *ctx, +void _tnl_draw_prims( struct gl_context *ctx, const struct gl_client_array *arrays[], const struct _mesa_prim *prim, GLuint nr_prims, diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c index 36fcd074cd9..18f095f0d4b 100644 --- a/src/mesa/tnl/t_pipeline.c +++ b/src/mesa/tnl/t_pipeline.c @@ -35,7 +35,7 @@ #include "t_vp_build.h" #include "t_vertex.h" -void _tnl_install_pipeline( GLcontext *ctx, +void _tnl_install_pipeline( struct gl_context *ctx, const struct tnl_pipeline_stage **stages ) { TNLcontext *tnl = TNL_CONTEXT(ctx); @@ -55,7 +55,7 @@ void _tnl_install_pipeline( GLcontext *ctx, tnl->pipeline.nr_stages = i; } -void _tnl_destroy_pipeline( GLcontext *ctx ) +void _tnl_destroy_pipeline( struct gl_context *ctx ) { TNLcontext *tnl = TNL_CONTEXT(ctx); GLuint i; @@ -71,7 +71,7 @@ void _tnl_destroy_pipeline( GLcontext *ctx ) -static GLuint check_input_changes( GLcontext *ctx ) +static GLuint check_input_changes( struct gl_context *ctx ) { TNLcontext *tnl = TNL_CONTEXT(ctx); GLuint i; @@ -89,7 +89,7 @@ static GLuint check_input_changes( GLcontext *ctx ) } -static GLuint check_output_changes( GLcontext *ctx ) +static GLuint check_output_changes( struct gl_context *ctx ) { #if 0 TNLcontext *tnl = TNL_CONTEXT(ctx); @@ -113,7 +113,7 @@ static GLuint check_output_changes( GLcontext *ctx ) } -void _tnl_run_pipeline( GLcontext *ctx ) +void _tnl_run_pipeline( struct gl_context *ctx ) { TNLcontext *tnl = TNL_CONTEXT(ctx); unsigned short __tmp; diff --git a/src/mesa/tnl/t_pipeline.h b/src/mesa/tnl/t_pipeline.h index a6429869cb9..0eb03395c30 100644 --- a/src/mesa/tnl/t_pipeline.h +++ b/src/mesa/tnl/t_pipeline.h @@ -33,11 +33,11 @@ #include "main/mtypes.h" #include "t_context.h" -extern void _tnl_run_pipeline( GLcontext *ctx ); +extern void _tnl_run_pipeline( struct gl_context *ctx ); -extern void _tnl_destroy_pipeline( GLcontext *ctx ); +extern void _tnl_destroy_pipeline( struct gl_context *ctx ); -extern void _tnl_install_pipeline( GLcontext *ctx, +extern void _tnl_install_pipeline( struct gl_context *ctx, const struct tnl_pipeline_stage **stages ); @@ -64,10 +64,10 @@ extern const struct tnl_pipeline_stage *_tnl_vp_pipeline[]; extern tnl_render_func _tnl_render_tab_elts[]; extern tnl_render_func _tnl_render_tab_verts[]; -extern void _tnl_RenderClippedPolygon( GLcontext *ctx, +extern void _tnl_RenderClippedPolygon( struct gl_context *ctx, const GLuint *elts, GLuint n ); -extern void _tnl_RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj ); +extern void _tnl_RenderClippedLine( struct gl_context *ctx, GLuint ii, GLuint jj ); #endif diff --git a/src/mesa/tnl/t_rasterpos.c b/src/mesa/tnl/t_rasterpos.c index d82d5b50736..0492490dfcf 100644 --- a/src/mesa/tnl/t_rasterpos.c +++ b/src/mesa/tnl/t_rasterpos.c @@ -84,7 +84,7 @@ viewclip_point_z( const GLfloat v[] ) * \return zero if the point was clipped, or one otherwise. */ static GLuint -userclip_point( GLcontext *ctx, const GLfloat v[] ) +userclip_point( struct gl_context *ctx, const GLfloat v[] ) { GLuint p; @@ -114,7 +114,7 @@ userclip_point( GLcontext *ctx, const GLfloat v[] ) * \param Rindex returned color index */ static void -shade_rastpos(GLcontext *ctx, +shade_rastpos(struct gl_context *ctx, const GLfloat vertex[4], const GLfloat normal[3], GLfloat Rcolor[4], @@ -263,7 +263,7 @@ shade_rastpos(GLcontext *ctx, * \param texcoord incoming texcoord and resulting texcoord */ static void -compute_texgen(GLcontext *ctx, const GLfloat vObj[4], const GLfloat vEye[4], +compute_texgen(struct gl_context *ctx, const GLfloat vObj[4], const GLfloat vEye[4], const GLfloat normal[3], GLuint unit, GLfloat texcoord[4]) { const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; @@ -373,7 +373,7 @@ compute_texgen(GLcontext *ctx, const GLfloat vObj[4], const GLfloat vEye[4], * \param vObj vertex position in object space */ void -_tnl_RasterPos(GLcontext *ctx, const GLfloat vObj[4]) +_tnl_RasterPos(struct gl_context *ctx, const GLfloat vObj[4]) { if (ctx->VertexProgram._Enabled) { /* XXX implement this */ diff --git a/src/mesa/tnl/t_vb_cliptmp.h b/src/mesa/tnl/t_vb_cliptmp.h index 8cc36e666de..d593193435c 100644 --- a/src/mesa/tnl/t_vb_cliptmp.h +++ b/src/mesa/tnl/t_vb_cliptmp.h @@ -115,7 +115,7 @@ do { \ /* Clip a line against the viewport and user clip planes. */ static INLINE void -TAG(clip_line)( GLcontext *ctx, GLuint v0, GLuint v1, GLubyte mask ) +TAG(clip_line)( struct gl_context *ctx, GLuint v0, GLuint v1, GLubyte mask ) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; @@ -184,7 +184,7 @@ TAG(clip_line)( GLcontext *ctx, GLuint v0, GLuint v1, GLubyte mask ) /* Clip a triangle against the viewport and user clip planes. */ static INLINE void -TAG(clip_tri)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLubyte mask ) +TAG(clip_tri)( struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLubyte mask ) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; @@ -263,7 +263,7 @@ TAG(clip_tri)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLubyte mask ) /* Clip a quad against the viewport and user clip planes. */ static INLINE void -TAG(clip_quad)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3, +TAG(clip_quad)( struct gl_context *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3, GLubyte mask ) { TNLcontext *tnl = TNL_CONTEXT(ctx); diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c index 9faae24ec6d..cbd8dfc967f 100644 --- a/src/mesa/tnl/t_vb_fog.c +++ b/src/mesa/tnl/t_vb_fog.c @@ -94,7 +94,7 @@ init_static_data( void ) * Fog blend factors are in the range [0,1]. */ static void -compute_fog_blend_factors(GLcontext *ctx, GLvector4f *out, const GLvector4f *in) +compute_fog_blend_factors(struct gl_context *ctx, GLvector4f *out, const GLvector4f *in) { GLfloat end = ctx->Fog.End; GLfloat *v = in->start; @@ -140,7 +140,7 @@ compute_fog_blend_factors(GLcontext *ctx, GLvector4f *out, const GLvector4f *in) static GLboolean -run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) +run_fog_stage(struct gl_context *ctx, struct tnl_pipeline_stage *stage) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; @@ -235,7 +235,7 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) /* Called the first time stage->run() is invoked. */ static GLboolean -alloc_fog_data(GLcontext *ctx, struct tnl_pipeline_stage *stage) +alloc_fog_data(struct gl_context *ctx, struct tnl_pipeline_stage *stage) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct fog_stage_data *store; diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c index e7309aaac60..3acedf6e577 100644 --- a/src/mesa/tnl/t_vb_light.c +++ b/src/mesa/tnl/t_vb_light.c @@ -41,7 +41,7 @@ #define LIGHT_MATERIAL 0x2 #define MAX_LIGHT_FUNC 0x4 -typedef void (*light_func)( GLcontext *ctx, +typedef void (*light_func)( struct gl_context *ctx, struct vertex_buffer *VB, struct tnl_pipeline_stage *stage, GLvector4f *input ); @@ -85,7 +85,7 @@ struct light_stage_data { * It's called per-vertex in the lighting loop. */ static void -update_materials(GLcontext *ctx, struct light_stage_data *store) +update_materials(struct gl_context *ctx, struct light_stage_data *store) { GLuint i; @@ -110,7 +110,7 @@ update_materials(GLcontext *ctx, struct light_stage_data *store) * Return number of material attributes which will track vertex color. */ static GLuint -prepare_materials(GLcontext *ctx, +prepare_materials(struct gl_context *ctx, struct vertex_buffer *VB, struct light_stage_data *store) { GLuint i; @@ -192,7 +192,7 @@ static void init_lighting_tables( void ) } -static GLboolean run_lighting( GLcontext *ctx, +static GLboolean run_lighting( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) { struct light_stage_data *store = LIGHT_STAGE_DATA(stage); @@ -250,7 +250,7 @@ static GLboolean run_lighting( GLcontext *ctx, /* Called in place of do_lighting when the light table may have changed. */ -static void validate_lighting( GLcontext *ctx, +static void validate_lighting( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) { light_func *tab; @@ -284,7 +284,7 @@ static void validate_lighting( GLcontext *ctx, /* Called the first time stage->run is called. In effect, don't * allocate data until the first time the stage is run. */ -static GLboolean init_lighting( GLcontext *ctx, +static GLboolean init_lighting( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) { TNLcontext *tnl = TNL_CONTEXT(ctx); diff --git a/src/mesa/tnl/t_vb_lighttmp.h b/src/mesa/tnl/t_vb_lighttmp.h index 0a98c6b02a6..aae1d18ff7f 100644 --- a/src/mesa/tnl/t_vb_lighttmp.h +++ b/src/mesa/tnl/t_vb_lighttmp.h @@ -44,7 +44,7 @@ * stage is the lighting stage-private data * input is the vector of eye or object-space vertex coordinates */ -static void TAG(light_rgba_spec)( GLcontext *ctx, +static void TAG(light_rgba_spec)( struct gl_context *ctx, struct vertex_buffer *VB, struct tnl_pipeline_stage *stage, GLvector4f *input ) @@ -232,7 +232,7 @@ static void TAG(light_rgba_spec)( GLcontext *ctx, } -static void TAG(light_rgba)( GLcontext *ctx, +static void TAG(light_rgba)( struct gl_context *ctx, struct vertex_buffer *VB, struct tnl_pipeline_stage *stage, GLvector4f *input ) @@ -421,7 +421,7 @@ static void TAG(light_rgba)( GLcontext *ctx, /* As below, but with just a single light. */ -static void TAG(light_fast_rgba_single)( GLcontext *ctx, +static void TAG(light_fast_rgba_single)( struct gl_context *ctx, struct vertex_buffer *VB, struct tnl_pipeline_stage *stage, GLvector4f *input ) @@ -529,7 +529,7 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx, /* Light infinite lights */ -static void TAG(light_fast_rgba)( GLcontext *ctx, +static void TAG(light_fast_rgba)( struct gl_context *ctx, struct vertex_buffer *VB, struct tnl_pipeline_stage *stage, GLvector4f *input ) diff --git a/src/mesa/tnl/t_vb_normals.c b/src/mesa/tnl/t_vb_normals.c index c2aa655674c..c19b48e51ee 100644 --- a/src/mesa/tnl/t_vb_normals.c +++ b/src/mesa/tnl/t_vb_normals.c @@ -47,7 +47,7 @@ struct normal_stage_data { static GLboolean -run_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) +run_normal_stage(struct gl_context *ctx, struct tnl_pipeline_stage *stage) { struct normal_stage_data *store = NORMAL_STAGE_DATA(stage); struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; @@ -89,7 +89,7 @@ run_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) * to point to the appropriate normal transformation routine. */ static void -validate_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) +validate_normal_stage(struct gl_context *ctx, struct tnl_pipeline_stage *stage) { struct normal_stage_data *store = NORMAL_STAGE_DATA(stage); @@ -146,7 +146,7 @@ validate_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) * Allocate stage's private data (storage for transformed normals). */ static GLboolean -alloc_normal_data(GLcontext *ctx, struct tnl_pipeline_stage *stage) +alloc_normal_data(struct gl_context *ctx, struct tnl_pipeline_stage *stage) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct normal_stage_data *store; diff --git a/src/mesa/tnl/t_vb_points.c b/src/mesa/tnl/t_vb_points.c index 20634c80d1d..9edbbc708e6 100644 --- a/src/mesa/tnl/t_vb_points.c +++ b/src/mesa/tnl/t_vb_points.c @@ -47,7 +47,7 @@ struct point_stage_data { * disabled. */ static GLboolean -run_point_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) +run_point_stage(struct gl_context *ctx, struct tnl_pipeline_stage *stage) { if (ctx->Point._Attenuated && !ctx->VertexProgram._Current) { struct point_stage_data *store = POINT_STAGE_DATA(stage); @@ -77,7 +77,7 @@ run_point_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) static GLboolean -alloc_point_data(GLcontext *ctx, struct tnl_pipeline_stage *stage) +alloc_point_data(struct gl_context *ctx, struct tnl_pipeline_stage *stage) { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; struct point_stage_data *store; diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index f3a338ef1ed..76f8fde3f52 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -74,7 +74,7 @@ struct vp_stage_data { static void -userclip( GLcontext *ctx, +userclip( struct gl_context *ctx, GLvector4f *clip, GLubyte *clipmask, GLubyte *clipormask, @@ -120,7 +120,7 @@ userclip( GLcontext *ctx, static GLboolean -do_ndc_cliptest(GLcontext *ctx, struct vp_stage_data *store) +do_ndc_cliptest(struct gl_context *ctx, struct vp_stage_data *store) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; @@ -187,7 +187,7 @@ do_ndc_cliptest(GLcontext *ctx, struct vp_stage_data *store) * moved into main/ someday. */ static void -vp_fetch_texel(GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda, +vp_fetch_texel(struct gl_context *ctx, const GLfloat texcoord[4], GLfloat lambda, GLuint unit, GLfloat color[4]) { SWcontext *swrast = SWRAST_CONTEXT(ctx); @@ -204,7 +204,7 @@ vp_fetch_texel(GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda, * string has been parsed. */ GLboolean -_tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program) +_tnl_program_string(struct gl_context *ctx, GLenum target, struct gl_program *program) { /* No-op. * If we had derived anything from the program that was private to this @@ -218,7 +218,7 @@ _tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program) * Initialize virtual machine state prior to executing vertex program. */ static void -init_machine(GLcontext *ctx, struct gl_program_machine *machine) +init_machine(struct gl_context *ctx, struct gl_program_machine *machine) { /* Input registers get initialized from the current vertex attribs */ memcpy(machine->VertAttribs, ctx->Current.Attrib, @@ -261,7 +261,7 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine) * Map the texture images which the vertex program will access (if any). */ static void -map_textures(GLcontext *ctx, const struct gl_vertex_program *vp) +map_textures(struct gl_context *ctx, const struct gl_vertex_program *vp) { GLuint u; @@ -283,7 +283,7 @@ map_textures(GLcontext *ctx, const struct gl_vertex_program *vp) * Unmap the texture images which were used by the vertex program (if any). */ static void -unmap_textures(GLcontext *ctx, const struct gl_vertex_program *vp) +unmap_textures(struct gl_context *ctx, const struct gl_vertex_program *vp) { GLuint u; @@ -305,7 +305,7 @@ unmap_textures(GLcontext *ctx, const struct gl_vertex_program *vp) * This function executes vertex programs */ static GLboolean -run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) +run_vp( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct vp_stage_data *store = VP_STAGE_DATA(stage); @@ -493,7 +493,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) * allocate data until the first time the stage is run. */ static GLboolean -init_vp(GLcontext *ctx, struct tnl_pipeline_stage *stage) +init_vp(struct gl_context *ctx, struct tnl_pipeline_stage *stage) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &(tnl->vb); @@ -546,7 +546,7 @@ dtr(struct tnl_pipeline_stage *stage) static void -validate_vp_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) +validate_vp_stage(struct gl_context *ctx, struct tnl_pipeline_stage *stage) { if (ctx->VertexProgram._Current) { _swrast_update_texture_samplers(ctx); diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c index 7d991009a14..cb319213249 100644 --- a/src/mesa/tnl/t_vb_render.c +++ b/src/mesa/tnl/t_vb_render.c @@ -146,7 +146,7 @@ do { \ /* TODO: do this for all primitives, verts and elts: */ -static void clip_elt_triangles( GLcontext *ctx, +static void clip_elt_triangles( struct gl_context *ctx, GLuint start, GLuint count, GLuint flags ) @@ -235,7 +235,7 @@ static void clip_elt_triangles( GLcontext *ctx, /* Helper functions for drivers */ /**********************************************************************/ -void _tnl_RenderClippedPolygon( GLcontext *ctx, const GLuint *elts, GLuint n ) +void _tnl_RenderClippedPolygon( struct gl_context *ctx, const GLuint *elts, GLuint n ) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; @@ -246,7 +246,7 @@ void _tnl_RenderClippedPolygon( GLcontext *ctx, const GLuint *elts, GLuint n ) VB->Elts = tmp; } -void _tnl_RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj ) +void _tnl_RenderClippedLine( struct gl_context *ctx, GLuint ii, GLuint jj ) { TNLcontext *tnl = TNL_CONTEXT(ctx); tnl->Driver.Render.Line( ctx, ii, jj ); @@ -259,7 +259,7 @@ void _tnl_RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj ) /**********************************************************************/ -static GLboolean run_render( GLcontext *ctx, +static GLboolean run_render( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) { TNLcontext *tnl = TNL_CONTEXT(ctx); diff --git a/src/mesa/tnl/t_vb_rendertmp.h b/src/mesa/tnl/t_vb_rendertmp.h index 75f6f55bdce..4ed485a7bfd 100644 --- a/src/mesa/tnl/t_vb_rendertmp.h +++ b/src/mesa/tnl/t_vb_rendertmp.h @@ -57,7 +57,7 @@ #define RENDER_TAB_QUALIFIER static #endif -static void TAG(render_points)( GLcontext *ctx, +static void TAG(render_points)( struct gl_context *ctx, GLuint start, GLuint count, GLuint flags ) @@ -70,7 +70,7 @@ static void TAG(render_points)( GLcontext *ctx, POSTFIX; } -static void TAG(render_lines)( GLcontext *ctx, +static void TAG(render_lines)( struct gl_context *ctx, GLuint start, GLuint count, GLuint flags ) @@ -91,7 +91,7 @@ static void TAG(render_lines)( GLcontext *ctx, } -static void TAG(render_line_strip)( GLcontext *ctx, +static void TAG(render_line_strip)( struct gl_context *ctx, GLuint start, GLuint count, GLuint flags ) @@ -116,7 +116,7 @@ static void TAG(render_line_strip)( GLcontext *ctx, } -static void TAG(render_line_loop)( GLcontext *ctx, +static void TAG(render_line_loop)( struct gl_context *ctx, GLuint start, GLuint count, GLuint flags ) @@ -156,7 +156,7 @@ static void TAG(render_line_loop)( GLcontext *ctx, } -static void TAG(render_triangles)( GLcontext *ctx, +static void TAG(render_triangles)( struct gl_context *ctx, GLuint start, GLuint count, GLuint flags ) @@ -189,7 +189,7 @@ static void TAG(render_triangles)( GLcontext *ctx, -static void TAG(render_tri_strip)( GLcontext *ctx, +static void TAG(render_tri_strip)( struct gl_context *ctx, GLuint start, GLuint count, GLuint flags ) @@ -239,7 +239,7 @@ static void TAG(render_tri_strip)( GLcontext *ctx, } -static void TAG(render_tri_fan)( GLcontext *ctx, +static void TAG(render_tri_fan)( struct gl_context *ctx, GLuint start, GLuint count, GLuint flags ) @@ -286,7 +286,7 @@ static void TAG(render_tri_fan)( GLcontext *ctx, } -static void TAG(render_poly)( GLcontext *ctx, +static void TAG(render_poly)( struct gl_context *ctx, GLuint start, GLuint count, GLuint flags ) @@ -355,7 +355,7 @@ static void TAG(render_poly)( GLcontext *ctx, POSTFIX; } -static void TAG(render_quads)( GLcontext *ctx, +static void TAG(render_quads)( struct gl_context *ctx, GLuint start, GLuint count, GLuint flags ) @@ -388,7 +388,7 @@ static void TAG(render_quads)( GLcontext *ctx, POSTFIX; } -static void TAG(render_quad_strip)( GLcontext *ctx, +static void TAG(render_quad_strip)( struct gl_context *ctx, GLuint start, GLuint count, GLuint flags ) @@ -436,7 +436,7 @@ static void TAG(render_quad_strip)( GLcontext *ctx, POSTFIX; } -static void TAG(render_noop)( GLcontext *ctx, +static void TAG(render_noop)( struct gl_context *ctx, GLuint start, GLuint count, GLuint flags ) @@ -444,7 +444,7 @@ static void TAG(render_noop)( GLcontext *ctx, (void)(ctx && start && count && flags); } -RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(GLcontext *, +RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(struct gl_context *, GLuint, GLuint, GLuint) = diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c index 950e0f54e9f..61430c396d5 100644 --- a/src/mesa/tnl/t_vb_texgen.c +++ b/src/mesa/tnl/t_vb_texgen.c @@ -54,7 +54,7 @@ struct texgen_stage_data; -typedef void (*texgen_func)( GLcontext *ctx, +typedef void (*texgen_func)( struct gl_context *ctx, struct texgen_stage_data *store, GLuint unit); @@ -248,7 +248,7 @@ static build_f_func build_f_tab[5] = { /* Special case texgen functions. */ -static void texgen_reflection_map_nv( GLcontext *ctx, +static void texgen_reflection_map_nv( struct gl_context *ctx, struct texgen_stage_data *store, GLuint unit ) { @@ -270,7 +270,7 @@ static void texgen_reflection_map_nv( GLcontext *ctx, -static void texgen_normal_map_nv( GLcontext *ctx, +static void texgen_normal_map_nv( struct gl_context *ctx, struct texgen_stage_data *store, GLuint unit ) { @@ -298,7 +298,7 @@ static void texgen_normal_map_nv( GLcontext *ctx, } -static void texgen_sphere_map( GLcontext *ctx, +static void texgen_sphere_map( struct gl_context *ctx, struct texgen_stage_data *store, GLuint unit ) { @@ -331,7 +331,7 @@ static void texgen_sphere_map( GLcontext *ctx, -static void texgen( GLcontext *ctx, +static void texgen( struct gl_context *ctx, struct texgen_stage_data *store, GLuint unit ) { @@ -480,7 +480,7 @@ static void texgen( GLcontext *ctx, -static GLboolean run_texgen_stage( GLcontext *ctx, +static GLboolean run_texgen_stage( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; @@ -505,7 +505,7 @@ static GLboolean run_texgen_stage( GLcontext *ctx, } -static void validate_texgen_stage( GLcontext *ctx, +static void validate_texgen_stage( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) { struct texgen_stage_data *store = TEXGEN_STAGE_DATA(stage); @@ -555,7 +555,7 @@ static void validate_texgen_stage( GLcontext *ctx, /* Called the first time stage->run() is invoked. */ -static GLboolean alloc_texgen_data( GLcontext *ctx, +static GLboolean alloc_texgen_data( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c index 985d137e5cc..38aa51fc496 100644 --- a/src/mesa/tnl/t_vb_texmat.c +++ b/src/mesa/tnl/t_vb_texmat.c @@ -53,7 +53,7 @@ struct texmat_stage_data { -static GLboolean run_texmat_stage( GLcontext *ctx, +static GLboolean run_texmat_stage( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) { struct texmat_stage_data *store = TEXMAT_STAGE_DATA(stage); @@ -82,7 +82,7 @@ static GLboolean run_texmat_stage( GLcontext *ctx, /* Called the first time stage->run() is invoked. */ -static GLboolean alloc_texmat_data( GLcontext *ctx, +static GLboolean alloc_texmat_data( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c index 453479227b7..26e8ae065d5 100644 --- a/src/mesa/tnl/t_vb_vertex.c +++ b/src/mesa/tnl/t_vb_vertex.c @@ -58,7 +58,7 @@ struct vertex_stage_data { * t_render_clip.h. */ #define USER_CLIPTEST(NAME, SZ) \ -static void NAME( GLcontext *ctx, \ +static void NAME( struct gl_context *ctx, \ GLvector4f *clip, \ GLubyte *clipmask, \ GLubyte *clipormask, \ @@ -105,7 +105,7 @@ USER_CLIPTEST(userclip2, 2) USER_CLIPTEST(userclip3, 3) USER_CLIPTEST(userclip4, 4) -static void (*(usercliptab[5]))( GLcontext *, +static void (*(usercliptab[5]))( struct gl_context *, GLvector4f *, GLubyte *, GLubyte *, GLubyte * ) = { @@ -118,7 +118,7 @@ static void (*(usercliptab[5]))( GLcontext *, void -tnl_clip_prepare(GLcontext *ctx) +tnl_clip_prepare(struct gl_context *ctx) { /* Neither the x86 nor sparc asm cliptest functions have been updated * for ARB_depth_clamp, so force the C paths. @@ -134,7 +134,7 @@ tnl_clip_prepare(GLcontext *ctx) -static GLboolean run_vertex_stage( GLcontext *ctx, +static GLboolean run_vertex_stage( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) { struct vertex_stage_data *store = (struct vertex_stage_data *)stage->privatePtr; @@ -229,7 +229,7 @@ static GLboolean run_vertex_stage( GLcontext *ctx, } -static GLboolean init_vertex_stage( GLcontext *ctx, +static GLboolean init_vertex_stage( struct gl_context *ctx, struct tnl_pipeline_stage *stage ) { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c index c1b1570232a..f1cb795cd6c 100644 --- a/src/mesa/tnl/t_vertex.c +++ b/src/mesa/tnl/t_vertex.c @@ -106,7 +106,7 @@ void _tnl_register_fastpath( struct tnl_clipspace *vtx, /*********************************************************************** * Build codegen functions or return generic ones: */ -static void choose_emit_func( GLcontext *ctx, GLuint count, GLubyte *dest) +static void choose_emit_func( struct gl_context *ctx, GLuint count, GLubyte *dest) { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); @@ -150,7 +150,7 @@ static void choose_emit_func( GLcontext *ctx, GLuint count, GLubyte *dest) -static void choose_interp_func( GLcontext *ctx, +static void choose_interp_func( struct gl_context *ctx, GLfloat t, GLuint edst, GLuint eout, GLuint ein, GLboolean force_boundary ) @@ -168,7 +168,7 @@ static void choose_interp_func( GLcontext *ctx, } -static void choose_copy_pv_func( GLcontext *ctx, GLuint edst, GLuint esrc ) +static void choose_copy_pv_func( struct gl_context *ctx, GLuint edst, GLuint esrc ) { struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); @@ -190,7 +190,7 @@ static void choose_copy_pv_func( GLcontext *ctx, GLuint edst, GLuint esrc ) /* Interpolate between two vertices to produce a third: */ -void _tnl_interp( GLcontext *ctx, +void _tnl_interp( struct gl_context *ctx, GLfloat t, GLuint edst, GLuint eout, GLuint ein, GLboolean force_boundary ) @@ -201,7 +201,7 @@ void _tnl_interp( GLcontext *ctx, /* Copy colors from one vertex to another: */ -void _tnl_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc ) +void _tnl_copy_pv( struct gl_context *ctx, GLuint edst, GLuint esrc ) { struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); vtx->copy_pv( ctx, edst, esrc ); @@ -212,7 +212,7 @@ void _tnl_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc ) * reverse any viewport transformation, swizzling or other conversions * which may have been applied: */ -void _tnl_get_attr( GLcontext *ctx, const void *vin, +void _tnl_get_attr( struct gl_context *ctx, const void *vin, GLenum attr, GLfloat *dest ) { struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); @@ -231,7 +231,7 @@ void _tnl_get_attr( GLcontext *ctx, const void *vin, */ if (attr == _TNL_ATTRIB_POINTSIZE) { /* If the hardware vertex doesn't have point size then use size from - * GLcontext. XXX this will be wrong if drawing attenuated points! + * struct gl_context. XXX this will be wrong if drawing attenuated points! */ dest[0] = ctx->Point.Size; } @@ -243,7 +243,7 @@ void _tnl_get_attr( GLcontext *ctx, const void *vin, /* Complementary operation to the above. */ -void _tnl_set_attr( GLcontext *ctx, void *vout, +void _tnl_set_attr( struct gl_context *ctx, void *vout, GLenum attr, const GLfloat *src ) { struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); @@ -260,14 +260,14 @@ void _tnl_set_attr( GLcontext *ctx, void *vout, } -void *_tnl_get_vertex( GLcontext *ctx, GLuint nr ) +void *_tnl_get_vertex( struct gl_context *ctx, GLuint nr ) { struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); return vtx->vertex_buf + nr * vtx->vertex_size; } -void _tnl_invalidate_vertex_state( GLcontext *ctx, GLuint new_state ) +void _tnl_invalidate_vertex_state( struct gl_context *ctx, GLuint new_state ) { if (new_state & (_DD_NEW_TRI_LIGHT_TWOSIDE|_DD_NEW_TRI_UNFILLED) ) { struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); @@ -285,7 +285,7 @@ static void invalidate_funcs( struct tnl_clipspace *vtx ) vtx->new_inputs = ~0; } -GLuint _tnl_install_attrs( GLcontext *ctx, const struct tnl_attr_map *map, +GLuint _tnl_install_attrs( struct gl_context *ctx, const struct tnl_attr_map *map, GLuint nr, const GLfloat *vp, GLuint unpacked_size ) { @@ -360,7 +360,7 @@ GLuint _tnl_install_attrs( GLcontext *ctx, const struct tnl_attr_map *map, -void _tnl_invalidate_vertices( GLcontext *ctx, GLuint newinputs ) +void _tnl_invalidate_vertices( struct gl_context *ctx, GLuint newinputs ) { struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); vtx->new_inputs |= newinputs; @@ -370,14 +370,14 @@ void _tnl_invalidate_vertices( GLcontext *ctx, GLuint newinputs ) /* This event has broader use beyond this file - will move elsewhere * and probably invoke a driver callback. */ -void _tnl_notify_pipeline_output_change( GLcontext *ctx ) +void _tnl_notify_pipeline_output_change( struct gl_context *ctx ) { struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); invalidate_funcs(vtx); } -static void adjust_input_ptrs( GLcontext *ctx, GLint diff) +static void adjust_input_ptrs( struct gl_context *ctx, GLint diff) { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); @@ -392,7 +392,7 @@ static void adjust_input_ptrs( GLcontext *ctx, GLint diff) } } -static void update_input_ptrs( GLcontext *ctx, GLuint start ) +static void update_input_ptrs( struct gl_context *ctx, GLuint start ) { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); @@ -424,7 +424,7 @@ static void update_input_ptrs( GLcontext *ctx, GLuint start ) } -void _tnl_build_vertices( GLcontext *ctx, +void _tnl_build_vertices( struct gl_context *ctx, GLuint start, GLuint end, GLuint newinputs ) @@ -439,7 +439,7 @@ void _tnl_build_vertices( GLcontext *ctx, /* Emit VB vertices start..end to dest. Note that VB vertex at * postion start will be emitted to dest at position zero. */ -void *_tnl_emit_vertices_to_buffer( GLcontext *ctx, +void *_tnl_emit_vertices_to_buffer( struct gl_context *ctx, GLuint start, GLuint end, void *dest ) @@ -457,7 +457,7 @@ void *_tnl_emit_vertices_to_buffer( GLcontext *ctx, * postion start will be emitted to dest at position zero. */ -void *_tnl_emit_indexed_vertices_to_buffer( GLcontext *ctx, +void *_tnl_emit_indexed_vertices_to_buffer( struct gl_context *ctx, const GLuint *elts, GLuint start, GLuint end, @@ -482,7 +482,7 @@ void *_tnl_emit_indexed_vertices_to_buffer( GLcontext *ctx, } -void _tnl_init_vertices( GLcontext *ctx, +void _tnl_init_vertices( struct gl_context *ctx, GLuint vb_size, GLuint max_vertex_size ) { @@ -533,7 +533,7 @@ void _tnl_init_vertices( GLcontext *ctx, } -void _tnl_free_vertices( GLcontext *ctx ) +void _tnl_free_vertices( struct gl_context *ctx ) { TNLcontext *tnl = TNL_CONTEXT(ctx); if (tnl) { diff --git a/src/mesa/tnl/t_vertex.h b/src/mesa/tnl/t_vertex.h index 2dfd7b57f01..252f2f7c295 100644 --- a/src/mesa/tnl/t_vertex.h +++ b/src/mesa/tnl/t_vertex.h @@ -78,43 +78,43 @@ extern const struct tnl_format_info _tnl_format_info[EMIT_MAX]; /* Interpolate between two vertices to produce a third: */ -extern void _tnl_interp( GLcontext *ctx, +extern void _tnl_interp( struct gl_context *ctx, GLfloat t, GLuint edst, GLuint eout, GLuint ein, GLboolean force_boundary ); /* Copy colors from one vertex to another: */ -extern void _tnl_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc ); +extern void _tnl_copy_pv( struct gl_context *ctx, GLuint edst, GLuint esrc ); /* Extract a named attribute from a hardware vertex. Will have to * reverse any viewport transformation, swizzling or other conversions * which may have been applied: */ -extern void _tnl_get_attr( GLcontext *ctx, const void *vertex, GLenum attrib, +extern void _tnl_get_attr( struct gl_context *ctx, const void *vertex, GLenum attrib, GLfloat *dest ); /* Complementary to the above. */ -extern void _tnl_set_attr( GLcontext *ctx, void *vout, GLenum attrib, +extern void _tnl_set_attr( struct gl_context *ctx, void *vout, GLenum attrib, const GLfloat *src ); -extern void *_tnl_get_vertex( GLcontext *ctx, GLuint nr ); +extern void *_tnl_get_vertex( struct gl_context *ctx, GLuint nr ); -extern GLuint _tnl_install_attrs( GLcontext *ctx, +extern GLuint _tnl_install_attrs( struct gl_context *ctx, const struct tnl_attr_map *map, GLuint nr, const GLfloat *vp, GLuint unpacked_size ); -extern void _tnl_free_vertices( GLcontext *ctx ); +extern void _tnl_free_vertices( struct gl_context *ctx ); -extern void _tnl_init_vertices( GLcontext *ctx, +extern void _tnl_init_vertices( struct gl_context *ctx, GLuint vb_size, GLuint max_vertex_size ); -extern void *_tnl_emit_vertices_to_buffer( GLcontext *ctx, +extern void *_tnl_emit_vertices_to_buffer( struct gl_context *ctx, GLuint start, GLuint end, void *dest ); @@ -124,23 +124,23 @@ extern void *_tnl_emit_vertices_to_buffer( GLcontext *ctx, * the same functionality. */ -extern void *_tnl_emit_indexed_vertices_to_buffer( GLcontext *ctx, +extern void *_tnl_emit_indexed_vertices_to_buffer( struct gl_context *ctx, const GLuint *elts, GLuint start, GLuint end, void *dest ); -extern void _tnl_build_vertices( GLcontext *ctx, +extern void _tnl_build_vertices( struct gl_context *ctx, GLuint start, GLuint end, GLuint newinputs ); -extern void _tnl_invalidate_vertices( GLcontext *ctx, GLuint newinputs ); +extern void _tnl_invalidate_vertices( struct gl_context *ctx, GLuint newinputs ); -extern void _tnl_invalidate_vertex_state( GLcontext *ctx, GLuint new_state ); +extern void _tnl_invalidate_vertex_state( struct gl_context *ctx, GLuint new_state ); -extern void _tnl_notify_pipeline_output_change( GLcontext *ctx ); +extern void _tnl_notify_pipeline_output_change( struct gl_context *ctx ); #define GET_VERTEX_STATE(ctx) &(TNL_CONTEXT(ctx)->clipspace) @@ -153,29 +153,29 @@ void _tnl_register_fastpath( struct tnl_clipspace *vtx, /* t_vertex_generic.c -- Internal functions for t_vertex.c */ -void _tnl_generic_copy_pv_extras( GLcontext *ctx, +void _tnl_generic_copy_pv_extras( struct gl_context *ctx, GLuint dst, GLuint src ); -void _tnl_generic_interp_extras( GLcontext *ctx, +void _tnl_generic_interp_extras( struct gl_context *ctx, GLfloat t, GLuint dst, GLuint out, GLuint in, GLboolean force_boundary ); -void _tnl_generic_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc ); +void _tnl_generic_copy_pv( struct gl_context *ctx, GLuint edst, GLuint esrc ); -void _tnl_generic_interp( GLcontext *ctx, +void _tnl_generic_interp( struct gl_context *ctx, GLfloat t, GLuint edst, GLuint eout, GLuint ein, GLboolean force_boundary ); -void _tnl_generic_emit( GLcontext *ctx, +void _tnl_generic_emit( struct gl_context *ctx, GLuint count, GLubyte *v ); -void _tnl_generate_hardwired_emit( GLcontext *ctx ); +void _tnl_generate_hardwired_emit( struct gl_context *ctx ); /* t_vertex_sse.c -- Internal functions for t_vertex.c */ -void _tnl_generate_sse_emit( GLcontext *ctx ); +void _tnl_generate_sse_emit( struct gl_context *ctx ); #endif diff --git a/src/mesa/tnl/t_vertex_generic.c b/src/mesa/tnl/t_vertex_generic.c index b1ea1424649..12da30f5eb3 100644 --- a/src/mesa/tnl/t_vertex_generic.c +++ b/src/mesa/tnl/t_vertex_generic.c @@ -866,7 +866,7 @@ const struct tnl_format_info _tnl_format_info[EMIT_MAX] = * vertices */ #define EMIT5(NR, F0, F1, F2, F3, F4, NAME) \ -static void NAME( GLcontext *ctx, \ +static void NAME( struct gl_context *ctx, \ GLuint count, \ GLubyte *v ) \ { \ @@ -929,7 +929,7 @@ EMIT4(insert_4f_4, insert_4ub_4f_rgba_4, insert_2f_2, insert_2f_2, emit_xyzw4_rg /* Use the codegen paths to select one of a number of hardwired * fastpaths. */ -void _tnl_generate_hardwired_emit( GLcontext *ctx ) +void _tnl_generate_hardwired_emit( struct gl_context *ctx ) { struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); tnl_emit_func func = NULL; @@ -987,7 +987,7 @@ void _tnl_generate_hardwired_emit( GLcontext *ctx ) * vertices */ -void _tnl_generic_emit( GLcontext *ctx, +void _tnl_generic_emit( struct gl_context *ctx, GLuint count, GLubyte *v ) { @@ -1007,7 +1007,7 @@ void _tnl_generic_emit( GLcontext *ctx, } -void _tnl_generic_interp( GLcontext *ctx, +void _tnl_generic_interp( struct gl_context *ctx, GLfloat t, GLuint edst, GLuint eout, GLuint ein, GLboolean force_boundary ) @@ -1061,7 +1061,7 @@ void _tnl_generic_interp( GLcontext *ctx, /* Extract color attributes from one vertex and insert them into * another. (Shortcircuit extract/insert with memcpy). */ -void _tnl_generic_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc ) +void _tnl_generic_copy_pv( struct gl_context *ctx, GLuint edst, GLuint esrc ) { struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); GLubyte *vsrc = vtx->vertex_buf + esrc * vtx->vertex_size; @@ -1085,7 +1085,7 @@ void _tnl_generic_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc ) /* Helper functions for hardware which doesn't put back colors and/or * edgeflags into vertices. */ -void _tnl_generic_interp_extras( GLcontext *ctx, +void _tnl_generic_interp_extras( struct gl_context *ctx, GLfloat t, GLuint dst, GLuint out, GLuint in, GLboolean force_boundary ) @@ -1128,7 +1128,7 @@ void _tnl_generic_interp_extras( GLcontext *ctx, _tnl_generic_interp(ctx, t, dst, out, in, force_boundary); } -void _tnl_generic_copy_pv_extras( GLcontext *ctx, +void _tnl_generic_copy_pv_extras( struct gl_context *ctx, GLuint dst, GLuint src ) { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; diff --git a/src/mesa/tnl/t_vertex_sse.c b/src/mesa/tnl/t_vertex_sse.c index 98058f3bdac..93189656f74 100644 --- a/src/mesa/tnl/t_vertex_sse.c +++ b/src/mesa/tnl/t_vertex_sse.c @@ -54,7 +54,7 @@ struct x86_program { struct x86_function func; - GLcontext *ctx; + struct gl_context *ctx; GLboolean inputs_safe; GLboolean outputs_safe; GLboolean have_sse2; @@ -342,7 +342,7 @@ static void update_src_ptr( struct x86_program *p, */ static GLboolean build_vertex_emit( struct x86_program *p ) { - GLcontext *ctx = p->ctx; + struct gl_context *ctx = p->ctx; TNLcontext *tnl = TNL_CONTEXT(ctx); struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); GLuint j = 0; @@ -638,7 +638,7 @@ static GLboolean build_vertex_emit( struct x86_program *p ) -void _tnl_generate_sse_emit( GLcontext *ctx ) +void _tnl_generate_sse_emit( struct gl_context *ctx ) { struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); struct x86_program p; @@ -676,7 +676,7 @@ void _tnl_generate_sse_emit( GLcontext *ctx ) #else -void _tnl_generate_sse_emit( GLcontext *ctx ) +void _tnl_generate_sse_emit( struct gl_context *ctx ) { /* Dummy version for when USE_SSE_ASM not defined */ } diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 735937bbe29..421ec88a454 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -39,7 +39,7 @@ /** * XXX This should go away someday, but still referenced by some drivers... */ -void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx ) +void _tnl_UpdateFixedFunctionProgram( struct gl_context *ctx ) { const struct gl_vertex_program *prev = ctx->VertexProgram._Current; diff --git a/src/mesa/tnl/t_vp_build.h b/src/mesa/tnl/t_vp_build.h index d6ebc66c045..1d10ff245d9 100644 --- a/src/mesa/tnl/t_vp_build.h +++ b/src/mesa/tnl/t_vp_build.h @@ -37,6 +37,6 @@ _NEW_FOG | \ _NEW_POINT) -extern void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx ); +extern void _tnl_UpdateFixedFunctionProgram( struct gl_context *ctx ); #endif diff --git a/src/mesa/tnl/tnl.h b/src/mesa/tnl/tnl.h index 2c0d1fef737..702efdc5cca 100644 --- a/src/mesa/tnl/tnl.h +++ b/src/mesa/tnl/tnl.h @@ -37,43 +37,43 @@ * itself.) */ extern GLboolean -_tnl_CreateContext( GLcontext *ctx ); +_tnl_CreateContext( struct gl_context *ctx ); extern void -_tnl_DestroyContext( GLcontext *ctx ); +_tnl_DestroyContext( struct gl_context *ctx ); extern void -_tnl_InvalidateState( GLcontext *ctx, GLuint new_state ); +_tnl_InvalidateState( struct gl_context *ctx, GLuint new_state ); /* Functions to revive the tnl module after being unhooked from * dispatch and/or driver callbacks. */ extern void -_tnl_wakeup( GLcontext *ctx ); +_tnl_wakeup( struct gl_context *ctx ); /* Driver configuration options: */ extern void -_tnl_need_projected_coords( GLcontext *ctx, GLboolean flag ); +_tnl_need_projected_coords( struct gl_context *ctx, GLboolean flag ); /* Control whether T&L does per-vertex fog */ extern void -_tnl_allow_vertex_fog( GLcontext *ctx, GLboolean value ); +_tnl_allow_vertex_fog( struct gl_context *ctx, GLboolean value ); extern void -_tnl_allow_pixel_fog( GLcontext *ctx, GLboolean value ); +_tnl_allow_pixel_fog( struct gl_context *ctx, GLboolean value ); extern GLboolean -_tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program); +_tnl_program_string(struct gl_context *ctx, GLenum target, struct gl_program *program); struct _mesa_prim; struct _mesa_index_buffer; void -_tnl_draw_prims( GLcontext *ctx, +_tnl_draw_prims( struct gl_context *ctx, const struct gl_client_array *arrays[], const struct _mesa_prim *prim, GLuint nr_prims, @@ -82,7 +82,7 @@ _tnl_draw_prims( GLcontext *ctx, GLuint max_index); void -_tnl_vbo_draw_prims( GLcontext *ctx, +_tnl_vbo_draw_prims( struct gl_context *ctx, const struct gl_client_array *arrays[], const struct _mesa_prim *prim, GLuint nr_prims, @@ -92,9 +92,9 @@ _tnl_vbo_draw_prims( GLcontext *ctx, GLuint max_index); extern void -_mesa_load_tracked_matrices(GLcontext *ctx); +_mesa_load_tracked_matrices(struct gl_context *ctx); extern void -_tnl_RasterPos(GLcontext *ctx, const GLfloat vObj[4]); +_tnl_RasterPos(struct gl_context *ctx, const GLfloat vObj[4]); #endif |