From f9995b30756140724f41daf963fa06167912be7f Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Tue, 12 Oct 2010 12:26:10 -0400 Subject: Drop GLcontext typedef and use struct gl_context instead --- src/mesa/main/accum.c | 2 +- src/mesa/main/accum.h | 2 +- src/mesa/main/api_arrayelt.c | 12 +- src/mesa/main/api_arrayelt.h | 16 +- src/mesa/main/api_validate.c | 16 +- src/mesa/main/api_validate.h | 12 +- src/mesa/main/arrayobj.c | 24 +-- src/mesa/main/arrayobj.h | 10 +- src/mesa/main/atifragshader.c | 4 +- src/mesa/main/atifragshader.h | 8 +- src/mesa/main/attrib.c | 10 +- src/mesa/main/attrib.h | 4 +- src/mesa/main/blend.c | 6 +- src/mesa/main/blend.h | 2 +- src/mesa/main/bufferobj.c | 70 ++++---- src/mesa/main/bufferobj.h | 22 +-- src/mesa/main/buffers.c | 6 +- src/mesa/main/buffers.h | 4 +- src/mesa/main/clear.c | 4 +- src/mesa/main/colortab.c | 2 +- src/mesa/main/condrender.c | 2 +- src/mesa/main/condrender.h | 2 +- src/mesa/main/context.c | 80 ++++----- src/mesa/main/context.h | 54 +++---- src/mesa/main/dd.h | 330 +++++++++++++++++++------------------- src/mesa/main/debug.c | 4 +- src/mesa/main/debug.h | 4 +- src/mesa/main/depth.c | 2 +- src/mesa/main/depth.h | 2 +- src/mesa/main/depthstencil.c | 38 ++--- src/mesa/main/depthstencil.h | 10 +- src/mesa/main/dlist.c | 50 +++--- src/mesa/main/dlist.h | 20 +-- src/mesa/main/drawpix.c | 2 +- src/mesa/main/drawtex.c | 2 +- src/mesa/main/enable.c | 12 +- src/mesa/main/enable.h | 4 +- src/mesa/main/eval.c | 8 +- src/mesa/main/eval.h | 6 +- src/mesa/main/extensions.c | 44 ++--- src/mesa/main/extensions.h | 28 ++-- src/mesa/main/fbobject.c | 32 ++-- src/mesa/main/fbobject.h | 20 +-- src/mesa/main/feedback.c | 22 +-- src/mesa/main/feedback.h | 14 +- src/mesa/main/ffvertex_prog.c | 6 +- src/mesa/main/ffvertex_prog.h | 2 +- src/mesa/main/fog.c | 2 +- src/mesa/main/fog.h | 2 +- src/mesa/main/framebuffer.c | 30 ++-- src/mesa/main/framebuffer.h | 22 +-- src/mesa/main/get.c | 32 ++-- src/mesa/main/getstring.c | 4 +- src/mesa/main/hash.c | 4 +- src/mesa/main/hint.c | 2 +- src/mesa/main/hint.h | 2 +- src/mesa/main/image.c | 52 +++--- src/mesa/main/image.h | 50 +++--- src/mesa/main/imports.c | 10 +- src/mesa/main/imports.h | 10 +- src/mesa/main/light.c | 28 ++-- src/mesa/main/light.h | 22 +-- src/mesa/main/lines.c | 6 +- src/mesa/main/lines.h | 2 +- src/mesa/main/matrix.c | 40 ++--- src/mesa/main/matrix.h | 8 +- src/mesa/main/mipmap.c | 2 +- src/mesa/main/mipmap.h | 2 +- src/mesa/main/mtypes.h | 88 +++++----- src/mesa/main/multisample.c | 2 +- src/mesa/main/multisample.h | 2 +- src/mesa/main/nvprogram.c | 4 +- src/mesa/main/nvprogram.h | 4 +- src/mesa/main/pixel.c | 12 +- src/mesa/main/pixel.h | 6 +- src/mesa/main/pixelstore.c | 2 +- src/mesa/main/pixelstore.h | 2 +- src/mesa/main/points.c | 6 +- src/mesa/main/points.h | 2 +- src/mesa/main/polygon.c | 6 +- src/mesa/main/polygon.h | 4 +- src/mesa/main/queryobj.c | 20 +-- src/mesa/main/queryobj.h | 8 +- src/mesa/main/rastpos.c | 4 +- src/mesa/main/rastpos.h | 2 +- src/mesa/main/readpix.c | 2 +- src/mesa/main/readpix.h | 2 +- src/mesa/main/renderbuffer.c | 132 +++++++-------- src/mesa/main/renderbuffer.h | 22 +-- src/mesa/main/scissor.c | 6 +- src/mesa/main/scissor.h | 4 +- src/mesa/main/shaderapi.c | 54 +++---- src/mesa/main/shaderapi.h | 2 +- src/mesa/main/shaderobj.c | 28 ++-- src/mesa/main/shaderobj.h | 30 ++-- src/mesa/main/shared.c | 20 +-- src/mesa/main/shared.h | 4 +- src/mesa/main/state.c | 32 ++-- src/mesa/main/state.h | 8 +- src/mesa/main/stencil.c | 16 +- src/mesa/main/stencil.h | 4 +- src/mesa/main/syncobj.c | 18 +-- src/mesa/main/syncobj.h | 16 +- src/mesa/main/texcompress.c | 4 +- src/mesa/main/texcompress.h | 4 +- src/mesa/main/texcompress_s3tc.c | 2 +- src/mesa/main/texcompress_s3tc.h | 4 +- src/mesa/main/texenv.c | 14 +- src/mesa/main/texenvprogram.c | 14 +- src/mesa/main/texenvprogram.h | 2 +- src/mesa/main/texformat.c | 2 +- src/mesa/main/texformat.h | 2 +- src/mesa/main/texgetimage.c | 24 +-- src/mesa/main/texgetimage.h | 4 +- src/mesa/main/teximage.c | 62 +++---- src/mesa/main/teximage.h | 32 ++-- src/mesa/main/texobj.c | 24 +-- src/mesa/main/texobj.h | 18 +-- src/mesa/main/texparam.c | 10 +- src/mesa/main/texrender.c | 22 +-- src/mesa/main/texrender.h | 4 +- src/mesa/main/texstate.c | 22 +-- src/mesa/main/texstate.h | 14 +- src/mesa/main/texstore.c | 38 ++--- src/mesa/main/texstore.h | 34 ++-- src/mesa/main/transformfeedback.c | 36 ++--- src/mesa/main/transformfeedback.h | 12 +- src/mesa/main/uniforms.c | 18 +-- src/mesa/main/uniforms.h | 6 +- src/mesa/main/varray.c | 14 +- src/mesa/main/varray.h | 8 +- src/mesa/main/version.c | 8 +- src/mesa/main/version.h | 2 +- src/mesa/main/viewport.c | 6 +- src/mesa/main/viewport.h | 6 +- src/mesa/main/vtxfmt.c | 8 +- src/mesa/main/vtxfmt.h | 16 +- 137 files changed, 1219 insertions(+), 1219 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c index 2012d00fd5f..9026110f3ef 100644 --- a/src/mesa/main/accum.c +++ b/src/mesa/main/accum.c @@ -115,7 +115,7 @@ _mesa_init_accum_dispatch(struct _glapi_table *disp) void -_mesa_init_accum( GLcontext *ctx ) +_mesa_init_accum( struct gl_context *ctx ) { /* Accumulate buffer group */ ASSIGN_4V( ctx->Accum.ClearColor, 0.0, 0.0, 0.0, 0.0 ); diff --git a/src/mesa/main/accum.h b/src/mesa/main/accum.h index 4b628bafa02..def692a73a5 100644 --- a/src/mesa/main/accum.h +++ b/src/mesa/main/accum.h @@ -67,6 +67,6 @@ _mesa_init_accum_dispatch(struct _glapi_table *disp) #endif /* FEATURE_accum */ extern void -_mesa_init_accum( GLcontext *ctx ); +_mesa_init_accum( struct gl_context *ctx ); #endif /* ACCUM_H */ diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index ffcd194240f..172c33b47bf 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1031,7 +1031,7 @@ static attrib_func AttribFuncsARB[2][4][8] = { /**********************************************************************/ -GLboolean _ae_create_context( GLcontext *ctx ) +GLboolean _ae_create_context( struct gl_context *ctx ) { if (ctx->aelt_context) return GL_TRUE; @@ -1064,7 +1064,7 @@ GLboolean _ae_create_context( GLcontext *ctx ) } -void _ae_destroy_context( GLcontext *ctx ) +void _ae_destroy_context( struct gl_context *ctx ) { if ( AE_CONTEXT( ctx ) ) { FREE( ctx->aelt_context ); @@ -1092,7 +1092,7 @@ static void check_vbo( AEcontext *actx, * etc). * Note: this may be called during display list construction. */ -static void _ae_update_state( GLcontext *ctx ) +static void _ae_update_state( struct gl_context *ctx ) { AEcontext *actx = AE_CONTEXT(ctx); AEarray *aa = actx->arrays; @@ -1211,7 +1211,7 @@ static void _ae_update_state( GLcontext *ctx ) actx->NewState = 0; } -void _ae_map_vbos( GLcontext *ctx ) +void _ae_map_vbos( struct gl_context *ctx ) { AEcontext *actx = AE_CONTEXT(ctx); GLuint i; @@ -1232,7 +1232,7 @@ void _ae_map_vbos( GLcontext *ctx ) actx->mapped_vbos = GL_TRUE; } -void _ae_unmap_vbos( GLcontext *ctx ) +void _ae_unmap_vbos( struct gl_context *ctx ) { AEcontext *actx = AE_CONTEXT(ctx); GLuint i; @@ -1300,7 +1300,7 @@ void GLAPIENTRY _ae_ArrayElement( GLint elt ) } -void _ae_invalidate_state( GLcontext *ctx, GLuint new_state ) +void _ae_invalidate_state( struct gl_context *ctx, GLuint new_state ) { AEcontext *actx = AE_CONTEXT(ctx); diff --git a/src/mesa/main/api_arrayelt.h b/src/mesa/main/api_arrayelt.h index d18c0792c35..610e522a943 100644 --- a/src/mesa/main/api_arrayelt.h +++ b/src/mesa/main/api_arrayelt.h @@ -37,15 +37,15 @@ (vfmt)->ArrayElement = impl ## ArrayElement; \ } while (0) -extern GLboolean _ae_create_context( GLcontext *ctx ); -extern void _ae_destroy_context( GLcontext *ctx ); -extern void _ae_invalidate_state( GLcontext *ctx, GLuint new_state ); +extern GLboolean _ae_create_context( struct gl_context *ctx ); +extern void _ae_destroy_context( struct gl_context *ctx ); +extern void _ae_invalidate_state( struct gl_context *ctx, GLuint new_state ); extern void GLAPIENTRY _ae_ArrayElement( GLint elt ); /* May optionally be called before a batch of element calls: */ -extern void _ae_map_vbos( GLcontext *ctx ); -extern void _ae_unmap_vbos( GLcontext *ctx ); +extern void _ae_map_vbos( struct gl_context *ctx ); +extern void _ae_unmap_vbos( struct gl_context *ctx ); extern void _mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp, @@ -56,18 +56,18 @@ _mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp, #define _MESA_INIT_ARRAYELT_VTXFMT(vfmt, impl) do { } while (0) static INLINE GLboolean -_ae_create_context( GLcontext *ctx ) +_ae_create_context( struct gl_context *ctx ) { return GL_TRUE; } static INLINE void -_ae_destroy_context( GLcontext *ctx ) +_ae_destroy_context( struct gl_context *ctx ) { } static INLINE void -_ae_invalidate_state( GLcontext *ctx, GLuint new_state ) +_ae_invalidate_state( struct gl_context *ctx, GLuint new_state ) { } diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index b3b5c6cc053..4929a9310d4 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -54,7 +54,7 @@ index_bytes(GLenum type, GLsizei count) * Find the max index in the given element/index buffer */ GLuint -_mesa_max_buffer_index(GLcontext *ctx, GLuint count, GLenum type, +_mesa_max_buffer_index(struct gl_context *ctx, GLuint count, GLenum type, const void *indices, struct gl_buffer_object *elementBuf) { @@ -99,7 +99,7 @@ _mesa_max_buffer_index(GLcontext *ctx, GLuint count, GLenum type, * Check if OK to draw arrays/elements. */ static GLboolean -check_valid_to_render(GLcontext *ctx, const char *function) +check_valid_to_render(struct gl_context *ctx, const char *function) { if (!_mesa_valid_to_render(ctx, function)) { return GL_FALSE; @@ -140,7 +140,7 @@ check_valid_to_render(GLcontext *ctx, const char *function) * \return GL_TRUE if OK, GL_FALSE if any indexed vertex goes is out of bounds */ static GLboolean -check_index_bounds(GLcontext *ctx, GLsizei count, GLenum type, +check_index_bounds(struct gl_context *ctx, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex) { struct _mesa_prim prim; @@ -181,7 +181,7 @@ check_index_bounds(GLcontext *ctx, GLsizei count, GLenum type, * \return GL_TRUE if OK to render, GL_FALSE if error found */ GLboolean -_mesa_validate_DrawElements(GLcontext *ctx, +_mesa_validate_DrawElements(struct gl_context *ctx, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex) { @@ -237,7 +237,7 @@ _mesa_validate_DrawElements(GLcontext *ctx, * \return GL_TRUE if OK to render, GL_FALSE if error found */ GLboolean -_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, +_mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex) @@ -298,7 +298,7 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, * \return GL_TRUE if OK to render, GL_FALSE if error found */ GLboolean -_mesa_validate_DrawArrays(GLcontext *ctx, +_mesa_validate_DrawArrays(struct gl_context *ctx, GLenum mode, GLint start, GLsizei count) { ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); @@ -327,7 +327,7 @@ _mesa_validate_DrawArrays(GLcontext *ctx, GLboolean -_mesa_validate_DrawArraysInstanced(GLcontext *ctx, GLenum mode, GLint first, +_mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint first, GLsizei count, GLsizei primcount) { ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); @@ -371,7 +371,7 @@ _mesa_validate_DrawArraysInstanced(GLcontext *ctx, GLenum mode, GLint first, GLboolean -_mesa_validate_DrawElementsInstanced(GLcontext *ctx, +_mesa_validate_DrawElementsInstanced(struct gl_context *ctx, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount) { diff --git a/src/mesa/main/api_validate.h b/src/mesa/main/api_validate.h index cd27d58aa7d..b232a90843e 100644 --- a/src/mesa/main/api_validate.h +++ b/src/mesa/main/api_validate.h @@ -32,32 +32,32 @@ extern GLuint -_mesa_max_buffer_index(GLcontext *ctx, GLuint count, GLenum type, +_mesa_max_buffer_index(struct gl_context *ctx, GLuint count, GLenum type, const void *indices, struct gl_buffer_object *elementBuf); extern GLboolean -_mesa_validate_DrawArrays(GLcontext *ctx, +_mesa_validate_DrawArrays(struct gl_context *ctx, GLenum mode, GLint start, GLsizei count); extern GLboolean -_mesa_validate_DrawElements(GLcontext *ctx, +_mesa_validate_DrawElements(struct gl_context *ctx, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); extern GLboolean -_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, +_mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); extern GLboolean -_mesa_validate_DrawArraysInstanced(GLcontext *ctx, GLenum mode, GLint first, +_mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint first, GLsizei count, GLsizei primcount); extern GLboolean -_mesa_validate_DrawElementsInstanced(GLcontext *ctx, +_mesa_validate_DrawElementsInstanced(struct gl_context *ctx, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 0069cd3dcfd..0d64b7de8dd 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -61,7 +61,7 @@ */ static INLINE struct gl_array_object * -lookup_arrayobj(GLcontext *ctx, GLuint id) +lookup_arrayobj(struct gl_context *ctx, GLuint id) { if (id == 0) return NULL; @@ -77,7 +77,7 @@ lookup_arrayobj(GLcontext *ctx, GLuint id) * This is done just prior to array object destruction. */ static void -unbind_array_object_vbos(GLcontext *ctx, struct gl_array_object *obj) +unbind_array_object_vbos(struct gl_context *ctx, struct gl_array_object *obj) { GLuint i; @@ -109,7 +109,7 @@ unbind_array_object_vbos(GLcontext *ctx, struct gl_array_object *obj) * \c dd_function_table::NewArrayObject. */ struct gl_array_object * -_mesa_new_array_object( GLcontext *ctx, GLuint name ) +_mesa_new_array_object( struct gl_context *ctx, GLuint name ) { struct gl_array_object *obj = CALLOC_STRUCT(gl_array_object); if (obj) @@ -125,7 +125,7 @@ _mesa_new_array_object( GLcontext *ctx, GLuint name ) * \c dd_function_table::DeleteArrayObject. */ void -_mesa_delete_array_object( GLcontext *ctx, struct gl_array_object *obj ) +_mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj ) { (void) ctx; unbind_array_object_vbos(ctx, obj); @@ -138,7 +138,7 @@ _mesa_delete_array_object( GLcontext *ctx, struct gl_array_object *obj ) * Set ptr to arrayObj w/ reference counting. */ void -_mesa_reference_array_object(GLcontext *ctx, +_mesa_reference_array_object(struct gl_context *ctx, struct gl_array_object **ptr, struct gl_array_object *arrayObj) { @@ -193,7 +193,7 @@ _mesa_reference_array_object(GLcontext *ctx, static void -init_array(GLcontext *ctx, +init_array(struct gl_context *ctx, struct gl_client_array *array, GLint size, GLint type) { array->Size = size; @@ -216,7 +216,7 @@ init_array(GLcontext *ctx, * Initialize a gl_array_object's arrays. */ void -_mesa_initialize_array_object( GLcontext *ctx, +_mesa_initialize_array_object( struct gl_context *ctx, struct gl_array_object *obj, GLuint name ) { @@ -253,7 +253,7 @@ _mesa_initialize_array_object( GLcontext *ctx, * Add the given array object to the array object pool. */ static void -save_array_object( GLcontext *ctx, struct gl_array_object *obj ) +save_array_object( struct gl_context *ctx, struct gl_array_object *obj ) { if (obj->Name > 0) { /* insert into hash table */ @@ -267,7 +267,7 @@ save_array_object( GLcontext *ctx, struct gl_array_object *obj ) * Do not deallocate the array object though. */ static void -remove_array_object( GLcontext *ctx, struct gl_array_object *obj ) +remove_array_object( struct gl_context *ctx, struct gl_array_object *obj ) { if (obj->Name > 0) { /* remove from hash table */ @@ -327,7 +327,7 @@ update_min(GLuint min, struct gl_client_array *array) * Examine vertex arrays to update the gl_array_object::_MaxElement field. */ void -_mesa_update_array_object_max_element(GLcontext *ctx, +_mesa_update_array_object_max_element(struct gl_context *ctx, struct gl_array_object *arrayObj) { GLuint i, min = ~0; @@ -364,7 +364,7 @@ _mesa_update_array_object_max_element(GLcontext *ctx, * glGenVertexArrays(). */ static void -bind_vertex_array(GLcontext *ctx, GLuint id, GLboolean genRequired) +bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired) { struct gl_array_object * const oldObj = ctx->Array.ArrayObj; struct gl_array_object *newObj = NULL; @@ -495,7 +495,7 @@ _mesa_DeleteVertexArraysAPPLE(GLsizei n, const GLuint *ids) * \param vboOnly Will arrays have to reside in VBOs? */ static void -gen_vertex_arrays(GLcontext *ctx, GLsizei n, GLuint *arrays, GLboolean vboOnly) +gen_vertex_arrays(struct gl_context *ctx, GLsizei n, GLuint *arrays, GLboolean vboOnly) { GLuint first; GLint i; diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h index fdf7e2bca46..26e3af19c91 100644 --- a/src/mesa/main/arrayobj.h +++ b/src/mesa/main/arrayobj.h @@ -43,23 +43,23 @@ */ extern struct gl_array_object * -_mesa_new_array_object( GLcontext *ctx, GLuint name ); +_mesa_new_array_object( struct gl_context *ctx, GLuint name ); extern void -_mesa_delete_array_object( GLcontext *ctx, struct gl_array_object *obj ); +_mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj ); extern void -_mesa_reference_array_object(GLcontext *ctx, +_mesa_reference_array_object(struct gl_context *ctx, struct gl_array_object **ptr, struct gl_array_object *arrayObj); extern void -_mesa_initialize_array_object( GLcontext *ctx, +_mesa_initialize_array_object( struct gl_context *ctx, struct gl_array_object *obj, GLuint name ); extern void -_mesa_update_array_object_max_element(GLcontext *ctx, +_mesa_update_array_object_max_element(struct gl_context *ctx, struct gl_array_object *arrayObj); diff --git a/src/mesa/main/atifragshader.c b/src/mesa/main/atifragshader.c index 550f50b7a00..ae2feb3229a 100644 --- a/src/mesa/main/atifragshader.c +++ b/src/mesa/main/atifragshader.c @@ -62,7 +62,7 @@ _mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp) * Allocate and initialize a new ATI fragment shader object. */ struct ati_fragment_shader * -_mesa_new_ati_fragment_shader(GLcontext *ctx, GLuint id) +_mesa_new_ati_fragment_shader(struct gl_context *ctx, GLuint id) { struct ati_fragment_shader *s = CALLOC_STRUCT(ati_fragment_shader); (void) ctx; @@ -78,7 +78,7 @@ _mesa_new_ati_fragment_shader(GLcontext *ctx, GLuint id) * Delete the given ati fragment shader */ void -_mesa_delete_ati_fragment_shader(GLcontext *ctx, struct ati_fragment_shader *s) +_mesa_delete_ati_fragment_shader(struct gl_context *ctx, struct ati_fragment_shader *s) { GLuint i; for (i = 0; i < MAX_NUM_PASSES_ATI; i++) { diff --git a/src/mesa/main/atifragshader.h b/src/mesa/main/atifragshader.h index 31c335ec815..6911bba5aee 100644 --- a/src/mesa/main/atifragshader.h +++ b/src/mesa/main/atifragshader.h @@ -66,10 +66,10 @@ extern void _mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp); extern struct ati_fragment_shader * -_mesa_new_ati_fragment_shader(GLcontext *ctx, GLuint id); +_mesa_new_ati_fragment_shader(struct gl_context *ctx, GLuint id); extern void -_mesa_delete_ati_fragment_shader(GLcontext *ctx, +_mesa_delete_ati_fragment_shader(struct gl_context *ctx, struct ati_fragment_shader *s); @@ -133,13 +133,13 @@ _mesa_init_ati_fragment_shader_dispatch(struct _glapi_table *disp) } static INLINE struct ati_fragment_shader * -_mesa_new_ati_fragment_shader(GLcontext *ctx, GLuint id) +_mesa_new_ati_fragment_shader(struct gl_context *ctx, GLuint id) { return NULL; } static INLINE void -_mesa_delete_ati_fragment_shader(GLcontext *ctx, +_mesa_delete_ati_fragment_shader(struct gl_context *ctx, struct ati_fragment_shader *s) { } diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 0299525f46b..fb6fbe5b6db 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -473,7 +473,7 @@ end: static void -pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable) +pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) { const GLuint curTexUnitSave = ctx->Texture.CurrentUnit; GLuint i; @@ -669,7 +669,7 @@ pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable) * Pop/restore texture attribute/group state. */ static void -pop_texture_group(GLcontext *ctx, struct texture_state *texstate) +pop_texture_group(struct gl_context *ctx, struct texture_state *texstate) { GLuint u; @@ -1323,7 +1323,7 @@ adjust_buffer_object_ref_counts(struct gl_array_object *arrayObj, GLint step) * object refcounts. */ static void -copy_pixelstore(GLcontext *ctx, +copy_pixelstore(struct gl_context *ctx, struct gl_pixelstore_attrib *dst, const struct gl_pixelstore_attrib *src) { @@ -1506,7 +1506,7 @@ _mesa_init_attrib_dispatch(struct _glapi_table *disp) * Free any attribute state data that might be attached to the context. */ void -_mesa_free_attrib_data(GLcontext *ctx) +_mesa_free_attrib_data(struct gl_context *ctx) { while (ctx->AttribStackDepth > 0) { struct gl_attrib_node *attr, *next; @@ -1538,7 +1538,7 @@ _mesa_free_attrib_data(GLcontext *ctx) } -void _mesa_init_attrib( GLcontext *ctx ) +void _mesa_init_attrib( struct gl_context *ctx ) { /* Renderer and client attribute stacks */ ctx->AttribStackDepth = 0; diff --git a/src/mesa/main/attrib.h b/src/mesa/main/attrib.h index 83b28a65b77..777781bdf0d 100644 --- a/src/mesa/main/attrib.h +++ b/src/mesa/main/attrib.h @@ -70,9 +70,9 @@ _mesa_init_attrib_dispatch(struct _glapi_table *disp) #endif /* FEATURE_attrib_stack */ extern void -_mesa_init_attrib( GLcontext *ctx ); +_mesa_init_attrib( struct gl_context *ctx ); extern void -_mesa_free_attrib_data( GLcontext *ctx ); +_mesa_free_attrib_data( struct gl_context *ctx ); #endif /* ATTRIB_H */ diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index 736a94c052a..ec778b7244d 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -207,7 +207,7 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, #if _HAVE_FULL_GL static GLboolean -_mesa_validate_blend_equation( GLcontext *ctx, +_mesa_validate_blend_equation( struct gl_context *ctx, GLenum mode, GLboolean is_separate ) { switch (mode) { @@ -589,9 +589,9 @@ _mesa_ClampColorARB(GLenum target, GLenum clamp) * \param ctx GL context. * * Initializes the related fields in the context color attribute group, - * __GLcontextRec::Color. + * __struct gl_contextRec::Color. */ -void _mesa_init_color( GLcontext * ctx ) +void _mesa_init_color( struct gl_context * ctx ) { /* Color buffer group */ ctx->Color.IndexMask = ~0u; diff --git a/src/mesa/main/blend.h b/src/mesa/main/blend.h index b4fd7470ebe..677b01cc9fc 100644 --- a/src/mesa/main/blend.h +++ b/src/mesa/main/blend.h @@ -82,6 +82,6 @@ _mesa_ClampColorARB(GLenum target, GLenum clamp); extern void -_mesa_init_color( GLcontext * ctx ); +_mesa_init_color( struct gl_context * ctx ); #endif diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 61d46b936b2..0a68008a100 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -62,7 +62,7 @@ * specified context or \c NULL if \c target is invalid. */ static INLINE struct gl_buffer_object ** -get_buffer_target(GLcontext *ctx, GLenum target) +get_buffer_target(struct gl_context *ctx, GLenum target) { switch (target) { case GL_ARRAY_BUFFER_ARB: @@ -99,7 +99,7 @@ get_buffer_target(GLcontext *ctx, GLenum target) * specified context or \c NULL if \c target is invalid. */ static INLINE struct gl_buffer_object * -get_buffer(GLcontext *ctx, GLenum target) +get_buffer(struct gl_context *ctx, GLenum target) { struct gl_buffer_object **bufObj = get_buffer_target(ctx, target); if (bufObj) @@ -143,7 +143,7 @@ simplified_access_mode(GLbitfield access) * \sa glBufferSubDataARB, glGetBufferSubDataARB */ static struct gl_buffer_object * -buffer_object_subdata_range_good( GLcontext * ctx, GLenum target, +buffer_object_subdata_range_good( struct gl_context * ctx, GLenum target, GLintptrARB offset, GLsizeiptrARB size, const char *caller ) { @@ -189,7 +189,7 @@ buffer_object_subdata_range_good( GLcontext * ctx, GLenum target, * Default callback for the \c dd_function_table::NewBufferObject() hook. */ static struct gl_buffer_object * -_mesa_new_buffer_object( GLcontext *ctx, GLuint name, GLenum target ) +_mesa_new_buffer_object( struct gl_context *ctx, GLuint name, GLenum target ) { struct gl_buffer_object *obj; @@ -207,7 +207,7 @@ _mesa_new_buffer_object( GLcontext *ctx, GLuint name, GLenum target ) * Default callback for the \c dd_function_table::DeleteBuffer() hook. */ static void -_mesa_delete_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj ) +_mesa_delete_buffer_object( struct gl_context *ctx, struct gl_buffer_object *bufObj ) { (void) ctx; @@ -228,7 +228,7 @@ _mesa_delete_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj ) * Set ptr to bufObj w/ reference counting. */ void -_mesa_reference_buffer_object(GLcontext *ctx, +_mesa_reference_buffer_object(struct gl_context *ctx, struct gl_buffer_object **ptr, struct gl_buffer_object *bufObj) { @@ -328,7 +328,7 @@ _mesa_initialize_buffer_object( struct gl_buffer_object *obj, * \sa glBufferDataARB, dd_function_table::BufferData. */ static GLboolean -_mesa_buffer_data( GLcontext *ctx, GLenum target, GLsizeiptrARB size, +_mesa_buffer_data( struct gl_context *ctx, GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage, struct gl_buffer_object * bufObj ) { @@ -372,7 +372,7 @@ _mesa_buffer_data( GLcontext *ctx, GLenum target, GLsizeiptrARB size, * \sa glBufferSubDataARB, dd_function_table::BufferSubData. */ static void -_mesa_buffer_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset, +_mesa_buffer_subdata( struct gl_context *ctx, GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data, struct gl_buffer_object * bufObj ) { @@ -405,7 +405,7 @@ _mesa_buffer_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset, * \sa glBufferGetSubDataARB, dd_function_table::GetBufferSubData. */ static void -_mesa_buffer_get_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset, +_mesa_buffer_get_subdata( struct gl_context *ctx, GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data, struct gl_buffer_object * bufObj ) { @@ -432,7 +432,7 @@ _mesa_buffer_get_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset, * \sa glMapBufferARB, dd_function_table::MapBuffer */ static void * -_mesa_buffer_map( GLcontext *ctx, GLenum target, GLenum access, +_mesa_buffer_map( struct gl_context *ctx, GLenum target, GLenum access, struct gl_buffer_object *bufObj ) { (void) ctx; @@ -455,7 +455,7 @@ _mesa_buffer_map( GLcontext *ctx, GLenum target, GLenum access, * Called via glMapBufferRange(). */ static void * -_mesa_buffer_map_range( GLcontext *ctx, GLenum target, GLintptr offset, +_mesa_buffer_map_range( struct gl_context *ctx, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access, struct gl_buffer_object *bufObj ) { @@ -476,7 +476,7 @@ _mesa_buffer_map_range( GLcontext *ctx, GLenum target, GLintptr offset, * Called via glFlushMappedBufferRange(). */ static void -_mesa_buffer_flush_mapped_range( GLcontext *ctx, GLenum target, +_mesa_buffer_flush_mapped_range( struct gl_context *ctx, GLenum target, GLintptr offset, GLsizeiptr length, struct gl_buffer_object *obj ) { @@ -497,7 +497,7 @@ _mesa_buffer_flush_mapped_range( GLcontext *ctx, GLenum target, * \sa glUnmapBufferARB, dd_function_table::UnmapBuffer */ static GLboolean -_mesa_buffer_unmap( GLcontext *ctx, GLenum target, +_mesa_buffer_unmap( struct gl_context *ctx, GLenum target, struct gl_buffer_object *bufObj ) { (void) ctx; @@ -516,7 +516,7 @@ _mesa_buffer_unmap( GLcontext *ctx, GLenum target, * Called via glCopyBuffserSubData(). */ static void -_mesa_copy_buffer_subdata(GLcontext *ctx, +_mesa_copy_buffer_subdata(struct gl_context *ctx, struct gl_buffer_object *src, struct gl_buffer_object *dst, GLintptr readOffset, GLintptr writeOffset, @@ -546,7 +546,7 @@ _mesa_copy_buffer_subdata(GLcontext *ctx, * Initialize the state associated with buffer objects */ void -_mesa_init_buffer_objects( GLcontext *ctx ) +_mesa_init_buffer_objects( struct gl_context *ctx ) { _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, ctx->Shared->NullBufferObj); @@ -561,7 +561,7 @@ _mesa_init_buffer_objects( GLcontext *ctx ) void -_mesa_free_buffer_objects( GLcontext *ctx ) +_mesa_free_buffer_objects( struct gl_context *ctx ) { _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, NULL); _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj, NULL); @@ -576,7 +576,7 @@ _mesa_free_buffer_objects( GLcontext *ctx ) * Called by glBindBuffer() and other functions. */ static void -bind_buffer_object(GLcontext *ctx, GLenum target, GLuint buffer) +bind_buffer_object(struct gl_context *ctx, GLenum target, GLuint buffer) { struct gl_buffer_object *oldBufObj; struct gl_buffer_object *newBufObj = NULL; @@ -632,7 +632,7 @@ bind_buffer_object(GLcontext *ctx, GLenum target, GLuint buffer) * shared state. */ void -_mesa_update_default_objects_buffer_objects(GLcontext *ctx) +_mesa_update_default_objects_buffer_objects(struct gl_context *ctx) { /* Bind the NullBufferObj to remove references to those * in the shared context hash table. @@ -716,7 +716,7 @@ _mesa_validate_pbo_access(GLuint dimensions, * \return NULL if error, else pointer to start of data */ const GLvoid * -_mesa_map_pbo_source(GLcontext *ctx, +_mesa_map_pbo_source(struct gl_context *ctx, const struct gl_pixelstore_attrib *unpack, const GLvoid *src) { @@ -750,7 +750,7 @@ _mesa_map_pbo_source(GLcontext *ctx, * _mesa_unmap_pbo_source(). */ const GLvoid * -_mesa_map_validate_pbo_source(GLcontext *ctx, +_mesa_map_validate_pbo_source(struct gl_context *ctx, GLuint dimensions, const struct gl_pixelstore_attrib *unpack, GLsizei width, GLsizei height, GLsizei depth, @@ -786,7 +786,7 @@ _mesa_map_validate_pbo_source(GLcontext *ctx, * Counterpart to _mesa_map_pbo_source() */ void -_mesa_unmap_pbo_source(GLcontext *ctx, +_mesa_unmap_pbo_source(struct gl_context *ctx, const struct gl_pixelstore_attrib *unpack) { ASSERT(unpack != &ctx->Pack); /* catch pack/unpack mismatch */ @@ -806,7 +806,7 @@ _mesa_unmap_pbo_source(GLcontext *ctx, * \return NULL if error, else pointer to start of data */ void * -_mesa_map_pbo_dest(GLcontext *ctx, +_mesa_map_pbo_dest(struct gl_context *ctx, const struct gl_pixelstore_attrib *pack, GLvoid *dest) { @@ -840,7 +840,7 @@ _mesa_map_pbo_dest(GLcontext *ctx, * _mesa_unmap_pbo_dest(). */ GLvoid * -_mesa_map_validate_pbo_dest(GLcontext *ctx, +_mesa_map_validate_pbo_dest(struct gl_context *ctx, GLuint dimensions, const struct gl_pixelstore_attrib *unpack, GLsizei width, GLsizei height, GLsizei depth, @@ -876,7 +876,7 @@ _mesa_map_validate_pbo_dest(GLcontext *ctx, * Counterpart to _mesa_map_pbo_dest() */ void -_mesa_unmap_pbo_dest(GLcontext *ctx, +_mesa_unmap_pbo_dest(struct gl_context *ctx, const struct gl_pixelstore_attrib *pack) { ASSERT(pack != &ctx->Unpack); /* catch pack/unpack mismatch */ @@ -892,7 +892,7 @@ _mesa_unmap_pbo_dest(GLcontext *ctx, * Always return NULL for ID 0. */ struct gl_buffer_object * -_mesa_lookup_bufferobj(GLcontext *ctx, GLuint buffer) +_mesa_lookup_bufferobj(struct gl_context *ctx, GLuint buffer) { if (buffer == 0) return NULL; @@ -909,7 +909,7 @@ _mesa_lookup_bufferobj(GLcontext *ctx, GLuint buffer) * unbound from all arrays in the current context. */ static void -unbind(GLcontext *ctx, +unbind(struct gl_context *ctx, struct gl_buffer_object **ptr, struct gl_buffer_object *obj) { @@ -1754,7 +1754,7 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) #if FEATURE_APPLE_object_purgeable static GLenum -_mesa_BufferObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option) +_mesa_BufferObjectPurgeable(struct gl_context *ctx, GLuint name, GLenum option) { struct gl_buffer_object *bufObj; GLenum retval; @@ -1787,7 +1787,7 @@ _mesa_BufferObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option) static GLenum -_mesa_RenderObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option) +_mesa_RenderObjectPurgeable(struct gl_context *ctx, GLuint name, GLenum option) { struct gl_renderbuffer *bufObj; GLenum retval; @@ -1816,7 +1816,7 @@ _mesa_RenderObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option) static GLenum -_mesa_TextureObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option) +_mesa_TextureObjectPurgeable(struct gl_context *ctx, GLuint name, GLenum option) { struct gl_texture_object *bufObj; GLenum retval; @@ -1897,7 +1897,7 @@ _mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) static GLenum -_mesa_BufferObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option) +_mesa_BufferObjectUnpurgeable(struct gl_context *ctx, GLuint name, GLenum option) { struct gl_buffer_object *bufObj; GLenum retval; @@ -1927,7 +1927,7 @@ _mesa_BufferObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option) static GLenum -_mesa_RenderObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option) +_mesa_RenderObjectUnpurgeable(struct gl_context *ctx, GLuint name, GLenum option) { struct gl_renderbuffer *bufObj; GLenum retval; @@ -1957,7 +1957,7 @@ _mesa_RenderObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option) static GLenum -_mesa_TextureObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option) +_mesa_TextureObjectUnpurgeable(struct gl_context *ctx, GLuint name, GLenum option) { struct gl_texture_object *bufObj; GLenum retval; @@ -2027,7 +2027,7 @@ _mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) static void -_mesa_GetBufferObjectParameterivAPPLE(GLcontext *ctx, GLuint name, +_mesa_GetBufferObjectParameterivAPPLE(struct gl_context *ctx, GLuint name, GLenum pname, GLint* params) { struct gl_buffer_object *bufObj; @@ -2053,7 +2053,7 @@ _mesa_GetBufferObjectParameterivAPPLE(GLcontext *ctx, GLuint name, static void -_mesa_GetRenderObjectParameterivAPPLE(GLcontext *ctx, GLuint name, +_mesa_GetRenderObjectParameterivAPPLE(struct gl_context *ctx, GLuint name, GLenum pname, GLint* params) { struct gl_renderbuffer *bufObj; @@ -2079,7 +2079,7 @@ _mesa_GetRenderObjectParameterivAPPLE(GLcontext *ctx, GLuint name, static void -_mesa_GetTextureObjectParameterivAPPLE(GLcontext *ctx, GLuint name, +_mesa_GetTextureObjectParameterivAPPLE(struct gl_context *ctx, GLuint name, GLenum pname, GLint* params) { struct gl_texture_object *bufObj; diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h index f234d06c6cc..4b97e34767e 100644 --- a/src/mesa/main/bufferobj.h +++ b/src/mesa/main/bufferobj.h @@ -57,24 +57,24 @@ _mesa_is_bufferobj(const struct gl_buffer_object *obj) extern void -_mesa_init_buffer_objects( GLcontext *ctx ); +_mesa_init_buffer_objects( struct gl_context *ctx ); extern void -_mesa_free_buffer_objects( GLcontext *ctx ); +_mesa_free_buffer_objects( struct gl_context *ctx ); extern void -_mesa_update_default_objects_buffer_objects(GLcontext *ctx); +_mesa_update_default_objects_buffer_objects(struct gl_context *ctx); extern struct gl_buffer_object * -_mesa_lookup_bufferobj(GLcontext *ctx, GLuint buffer); +_mesa_lookup_bufferobj(struct gl_context *ctx, GLuint buffer); extern void _mesa_initialize_buffer_object( struct gl_buffer_object *obj, GLuint name, GLenum target ); extern void -_mesa_reference_buffer_object(GLcontext *ctx, +_mesa_reference_buffer_object(struct gl_context *ctx, struct gl_buffer_object **ptr, struct gl_buffer_object *bufObj); @@ -85,12 +85,12 @@ _mesa_validate_pbo_access(GLuint dimensions, GLenum format, GLenum type, const GLvoid *ptr); extern const GLvoid * -_mesa_map_pbo_source(GLcontext *ctx, +_mesa_map_pbo_source(struct gl_context *ctx, const struct gl_pixelstore_attrib *unpack, const GLvoid *src); extern const GLvoid * -_mesa_map_validate_pbo_source(GLcontext *ctx, +_mesa_map_validate_pbo_source(struct gl_context *ctx, GLuint dimensions, const struct gl_pixelstore_attrib *unpack, GLsizei width, GLsizei height, GLsizei depth, @@ -98,16 +98,16 @@ _mesa_map_validate_pbo_source(GLcontext *ctx, const char *where); extern void -_mesa_unmap_pbo_source(GLcontext *ctx, +_mesa_unmap_pbo_source(struct gl_context *ctx, const struct gl_pixelstore_attrib *unpack); extern void * -_mesa_map_pbo_dest(GLcontext *ctx, +_mesa_map_pbo_dest(struct gl_context *ctx, const struct gl_pixelstore_attrib *pack, GLvoid *dest); extern GLvoid * -_mesa_map_validate_pbo_dest(GLcontext *ctx, +_mesa_map_validate_pbo_dest(struct gl_context *ctx, GLuint dimensions, const struct gl_pixelstore_attrib *unpack, GLsizei width, GLsizei height, GLsizei depth, @@ -115,7 +115,7 @@ _mesa_map_validate_pbo_dest(GLcontext *ctx, const char *where); extern void -_mesa_unmap_pbo_dest(GLcontext *ctx, +_mesa_unmap_pbo_dest(struct gl_context *ctx, const struct gl_pixelstore_attrib *pack); diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index fb30b599609..86446311fe3 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -50,7 +50,7 @@ * \return bitmask of BUFFER_BIT_* flags */ static GLbitfield -supported_buffer_bitmask(const GLcontext *ctx, const struct gl_framebuffer *fb) +supported_buffer_bitmask(const struct gl_context *ctx, const struct gl_framebuffer *fb) { GLbitfield mask = 0x0; @@ -355,7 +355,7 @@ _mesa_DrawBuffersARB(GLsizei n, const GLenum *buffers) * BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT). */ void -_mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers, +_mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers, const GLbitfield *destMask) { struct gl_framebuffer *fb = ctx->DrawBuffer; @@ -452,7 +452,7 @@ _mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers, * \param bufferIndex the numerical index corresponding to 'buffer' */ void -_mesa_readbuffer(GLcontext *ctx, GLenum buffer, GLint bufferIndex) +_mesa_readbuffer(struct gl_context *ctx, GLenum buffer, GLint bufferIndex) { struct gl_framebuffer *fb = ctx->ReadBuffer; diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h index 8a7e7b5c1f0..36d6c8b6608 100644 --- a/src/mesa/main/buffers.h +++ b/src/mesa/main/buffers.h @@ -43,11 +43,11 @@ extern void GLAPIENTRY _mesa_DrawBuffersARB(GLsizei n, const GLenum *buffers); extern void -_mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers, +_mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers, const GLbitfield *destMask); extern void -_mesa_readbuffer(GLcontext *ctx, GLenum buffer, GLint bufferIndex); +_mesa_readbuffer(struct gl_context *ctx, GLenum buffer, GLint bufferIndex); extern void GLAPIENTRY _mesa_ReadBuffer( GLenum mode ); diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c index 49d86b3b1f1..b011da04b46 100644 --- a/src/mesa/main/clear.c +++ b/src/mesa/main/clear.c @@ -100,7 +100,7 @@ _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) * * \param mask bit-mask indicating the buffers to be cleared. * - * Flushes the vertices and verifies the parameter. If __GLcontextRec::NewState + * Flushes the vertices and verifies the parameter. If __struct gl_contextRec::NewState * is set then calls _mesa_update_state() to update gl_frame_buffer::_Xmin, * etc. If the rasterization mode is set to GL_RENDER then requests the driver * to clear the buffers, via the dd_function_table::Clear callback. @@ -191,7 +191,7 @@ _mesa_Clear( GLbitfield mask ) * Return INVALID_MASK if the drawbuffer value is invalid. */ static GLbitfield -make_color_buffer_mask(GLcontext *ctx, GLint drawbuffer) +make_color_buffer_mask(struct gl_context *ctx, GLint drawbuffer) { const struct gl_renderbuffer_attachment *att = ctx->DrawBuffer->Attachment; GLbitfield mask = 0x0; diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c index 5c2697d40af..6295dc88dee 100644 --- a/src/mesa/main/colortab.c +++ b/src/mesa/main/colortab.c @@ -176,7 +176,7 @@ set_component_sizes( struct gl_color_table *table ) * \param [rgba]Bias - RGBA bias factors */ static void -store_colortable_entries(GLcontext *ctx, struct gl_color_table *table, +store_colortable_entries(struct gl_context *ctx, struct gl_color_table *table, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data, GLfloat rScale, GLfloat rBias, diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c index 8d9a91d5478..25b3dd678dc 100644 --- a/src/mesa/main/condrender.c +++ b/src/mesa/main/condrender.c @@ -117,7 +117,7 @@ _mesa_EndConditionalRender(void) * \return GL_TRUE if we should render, GL_FALSE if we should discard */ GLboolean -_mesa_check_conditional_render(GLcontext *ctx) +_mesa_check_conditional_render(struct gl_context *ctx) { struct gl_query_object *q = ctx->Query.CondRenderQuery; diff --git a/src/mesa/main/condrender.h b/src/mesa/main/condrender.h index d55e9805fe9..cf6d4ca2893 100644 --- a/src/mesa/main/condrender.h +++ b/src/mesa/main/condrender.h @@ -39,7 +39,7 @@ extern void APIENTRY _mesa_EndConditionalRender(void); extern GLboolean -_mesa_check_conditional_render(GLcontext *ctx); +_mesa_check_conditional_render(struct gl_context *ctx); #endif /* CONDRENDER_H */ diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 0ecbea2c514..41f30cae43c 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -163,7 +163,7 @@ GLfloat _mesa_ubyte_to_float_color_tab[256]; * We have to finish any pending rendering. */ void -_mesa_notifySwapBuffers(GLcontext *ctx) +_mesa_notifySwapBuffers(struct gl_context *ctx) { if (MESA_VERBOSE & VERBOSE_SWAPBUFFERS) _mesa_debug(ctx, "SwapBuffers\n"); @@ -377,7 +377,7 @@ _glthread_DECLARE_STATIC_MUTEX(OneTimeLock); * \sa _math_init(). */ static void -one_time_init( GLcontext *ctx ) +one_time_init( struct gl_context *ctx ) { static GLboolean alreadyCalled = GL_FALSE; (void) ctx; @@ -444,7 +444,7 @@ one_time_init( GLcontext *ctx ) * Initialize fields of gl_current_attrib (aka ctx->Current.*) */ static void -_mesa_init_current(GLcontext *ctx) +_mesa_init_current(struct gl_context *ctx) { GLuint i; @@ -526,7 +526,7 @@ init_program_limits(GLenum type, struct gl_program_constants *prog) * some of these values (such as number of texture units). */ static void -_mesa_init_constants(GLcontext *ctx) +_mesa_init_constants(struct gl_context *ctx) { assert(ctx); @@ -632,7 +632,7 @@ _mesa_init_constants(GLcontext *ctx) * Only called the first time a context is bound. */ static void -check_context_limits(GLcontext *ctx) +check_context_limits(struct gl_context *ctx) { /* check that we don't exceed the size of various bitfields */ assert(VERT_RESULT_MAX <= @@ -707,7 +707,7 @@ check_context_limits(GLcontext *ctx) * functions for the more complex data structures. */ static GLboolean -init_attrib_groups(GLcontext *ctx) +init_attrib_groups(struct gl_context *ctx) { assert(ctx); @@ -775,7 +775,7 @@ init_attrib_groups(GLcontext *ctx) * state. */ static GLboolean -update_default_objects(GLcontext *ctx) +update_default_objects(struct gl_context *ctx) { assert(ctx); @@ -827,7 +827,7 @@ _mesa_alloc_dispatch_table(int size) /** - * Initialize a GLcontext struct (rendering context). + * Initialize a struct gl_context struct (rendering context). * * This includes allocating all the other structs and arrays which hang off of * the context by pointers. @@ -854,10 +854,10 @@ _mesa_alloc_dispatch_table(int size) * \param driverContext pointer to driver-specific context data */ GLboolean -_mesa_initialize_context_for_api(GLcontext *ctx, +_mesa_initialize_context_for_api(struct gl_context *ctx, gl_api api, const struct gl_config *visual, - GLcontext *share_list, + struct gl_context *share_list, const struct dd_function_table *driverFunctions, void *driverContext) { @@ -993,9 +993,9 @@ _mesa_initialize_context_for_api(GLcontext *ctx, } GLboolean -_mesa_initialize_context(GLcontext *ctx, +_mesa_initialize_context(struct gl_context *ctx, const struct gl_config *visual, - GLcontext *share_list, + struct gl_context *share_list, const struct dd_function_table *driverFunctions, void *driverContext) { @@ -1008,7 +1008,7 @@ _mesa_initialize_context(GLcontext *ctx, } /** - * Allocate and initialize a GLcontext structure. + * Allocate and initialize a struct gl_context structure. * Note that the driver needs to pass in its dd_function_table here since * we need to at least call driverFunctions->NewTextureObject to initialize * the rendering context. @@ -1020,21 +1020,21 @@ _mesa_initialize_context(GLcontext *ctx, * driver has plugged in all its special functions. * \param driverContext points to the device driver's private context state * - * \return pointer to a new __GLcontextRec or NULL if error. + * \return pointer to a new __struct gl_contextRec or NULL if error. */ -GLcontext * +struct gl_context * _mesa_create_context_for_api(gl_api api, const struct gl_config *visual, - GLcontext *share_list, + struct gl_context *share_list, const struct dd_function_table *driverFunctions, void *driverContext) { - GLcontext *ctx; + struct gl_context *ctx; ASSERT(visual); /*ASSERT(driverContext);*/ - ctx = (GLcontext *) calloc(1, sizeof(GLcontext)); + ctx = (struct gl_context *) calloc(1, sizeof(struct gl_context)); if (!ctx) return NULL; @@ -1048,9 +1048,9 @@ _mesa_create_context_for_api(gl_api api, } } -GLcontext * +struct gl_context * _mesa_create_context(const struct gl_config *visual, - GLcontext *share_list, + struct gl_context *share_list, const struct dd_function_table *driverFunctions, void *driverContext) { @@ -1063,12 +1063,12 @@ _mesa_create_context(const struct gl_config *visual, /** * Free the data associated with the given context. * - * But doesn't free the GLcontext struct itself. + * But doesn't free the struct gl_context struct itself. * * \sa _mesa_initialize_context() and init_attrib_groups(). */ void -_mesa_free_context_data( GLcontext *ctx ) +_mesa_free_context_data( struct gl_context *ctx ) { if (!_mesa_get_current_context()){ /* No current context, but we may need one in order to delete @@ -1142,14 +1142,14 @@ _mesa_free_context_data( GLcontext *ctx ) /** - * Destroy a GLcontext structure. + * Destroy a struct gl_context structure. * * \param ctx GL context. * - * Calls _mesa_free_context_data() and frees the GLcontext structure itself. + * Calls _mesa_free_context_data() and frees the struct gl_context structure itself. */ void -_mesa_destroy_context( GLcontext *ctx ) +_mesa_destroy_context( struct gl_context *ctx ) { if (ctx) { _mesa_free_context_data(ctx); @@ -1172,7 +1172,7 @@ _mesa_destroy_context( GLcontext *ctx ) * structures. */ void -_mesa_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask ) +_mesa_copy_context( const struct gl_context *src, struct gl_context *dst, GLuint mask ) { if (mask & GL_ACCUM_BUFFER_BIT) { /* OK to memcpy */ @@ -1291,7 +1291,7 @@ _mesa_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask ) * \return GL_TRUE if compatible, GL_FALSE otherwise. */ static GLboolean -check_compatible(const GLcontext *ctx, const struct gl_framebuffer *buffer) +check_compatible(const struct gl_context *ctx, const struct gl_framebuffer *buffer) { const struct gl_config *ctxvis = &ctx->Visual; const struct gl_config *bufvis = &buffer->Visual; @@ -1340,7 +1340,7 @@ check_compatible(const GLcontext *ctx, const struct gl_framebuffer *buffer) * Really, the device driver should totally take care of this. */ static void -initialize_framebuffer_size(GLcontext *ctx, struct gl_framebuffer *fb) +initialize_framebuffer_size(struct gl_context *ctx, struct gl_framebuffer *fb) { GLuint width, height; if (ctx->Driver.GetBufferSize) { @@ -1357,7 +1357,7 @@ initialize_framebuffer_size(GLcontext *ctx, struct gl_framebuffer *fb) * Initialize the size if the given width and height are non-zero. */ void -_mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height) +_mesa_check_init_viewport(struct gl_context *ctx, GLuint width, GLuint height) { if (!ctx->ViewportInitialized && width > 0 && height > 0) { /* Note: set flag here, before calling _mesa_set_viewport(), to prevent @@ -1385,7 +1385,7 @@ _mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height) * \param readBuffer the reading framebuffer */ GLboolean -_mesa_make_current( GLcontext *newCtx, struct gl_framebuffer *drawBuffer, +_mesa_make_current( struct gl_context *newCtx, struct gl_framebuffer *drawBuffer, struct gl_framebuffer *readBuffer ) { if (MESA_VERBOSE & VERBOSE_API) @@ -1524,7 +1524,7 @@ _mesa_make_current( GLcontext *newCtx, struct gl_framebuffer *drawBuffer, * be deleted if nobody else is sharing them. */ GLboolean -_mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare) +_mesa_share_state(struct gl_context *ctx, struct gl_context *ctxToShare) { if (ctx && ctxToShare && ctx->Shared && ctxToShare->Shared) { struct gl_shared_state *oldSharedState = ctx->Shared; @@ -1555,10 +1555,10 @@ _mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare) * context. If you need speed, see the #GET_CURRENT_CONTEXT macro in * context.h. */ -GLcontext * +struct gl_context * _mesa_get_current_context( void ) { - return (GLcontext *) _glapi_get_context(); + return (struct gl_context *) _glapi_get_context(); } @@ -1572,10 +1572,10 @@ _mesa_get_current_context( void ) * * \return pointer to dispatch_table. * - * Simply returns __GLcontextRec::CurrentDispatch. + * Simply returns __struct gl_contextRec::CurrentDispatch. */ struct _glapi_table * -_mesa_get_dispatch(GLcontext *ctx) +_mesa_get_dispatch(struct gl_context *ctx) { return ctx->CurrentDispatch; } @@ -1601,7 +1601,7 @@ _mesa_get_dispatch(GLcontext *ctx) * This is called via _mesa_error(). */ void -_mesa_record_error(GLcontext *ctx, GLenum error) +_mesa_record_error(struct gl_context *ctx, GLenum error) { if (!ctx) return; @@ -1621,7 +1621,7 @@ _mesa_record_error(GLcontext *ctx, GLenum error) * Flush commands and wait for completion. */ void -_mesa_finish(GLcontext *ctx) +_mesa_finish(struct gl_context *ctx) { FLUSH_CURRENT( ctx, 0 ); if (ctx->Driver.Finish) { @@ -1634,7 +1634,7 @@ _mesa_finish(GLcontext *ctx) * Flush commands. */ void -_mesa_flush(GLcontext *ctx) +_mesa_flush(struct gl_context *ctx) { FLUSH_CURRENT( ctx, 0 ); if (ctx->Driver.Flush) { @@ -1680,7 +1680,7 @@ _mesa_Flush(void) * Otherwise we default to MUL/MAD. */ void -_mesa_set_mvp_with_dp4( GLcontext *ctx, +_mesa_set_mvp_with_dp4( struct gl_context *ctx, GLboolean flag ) { ctx->mvp_with_dp4 = flag; @@ -1696,7 +1696,7 @@ _mesa_set_mvp_with_dp4( GLcontext *ctx, * \return GL_TRUE if OK to render, GL_FALSE if not */ GLboolean -_mesa_valid_to_render(GLcontext *ctx, const char *where) +_mesa_valid_to_render(struct gl_context *ctx, const char *where) { bool vert_from_glsl_shader = false; bool geom_from_glsl_shader = false; diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index d89ae36a5c3..42d98a33a8d 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -29,7 +29,7 @@ * * There are three large Mesa data types/classes which are meant to be * used by device drivers: - * - GLcontext: this contains the Mesa rendering state + * - struct gl_context: this contains the Mesa rendering state * - struct gl_config: this describes the color buffer (RGB vs. ci), whether or not * there's a depth buffer, stencil buffer, etc. * - struct gl_framebuffer: contains pointers to the depth buffer, stencil buffer, @@ -38,7 +38,7 @@ * These types should be encapsulated by corresponding device driver * data types. See xmesa.h and xmesaP.h for an example. * - * In OOP terms, GLcontext, struct gl_config, and struct gl_framebuffer are base classes + * In OOP terms, struct gl_context, struct gl_config, and struct gl_framebuffer are base classes * which the device driver must derive from. * * The following functions create and destroy these data types. @@ -99,78 +99,78 @@ _mesa_destroy_visual( struct gl_config *vis ); /** \name Context-related functions */ /*@{*/ -extern GLcontext * +extern struct gl_context * _mesa_create_context( const struct gl_config *visual, - GLcontext *share_list, + struct gl_context *share_list, const struct dd_function_table *driverFunctions, void *driverContext ); extern GLboolean -_mesa_initialize_context( GLcontext *ctx, +_mesa_initialize_context( struct gl_context *ctx, const struct gl_config *visual, - GLcontext *share_list, + struct gl_context *share_list, const struct dd_function_table *driverFunctions, void *driverContext ); -extern GLcontext * +extern struct gl_context * _mesa_create_context_for_api(gl_api api, const struct gl_config *visual, - GLcontext *share_list, + struct gl_context *share_list, const struct dd_function_table *driverFunctions, void *driverContext); extern GLboolean -_mesa_initialize_context_for_api(GLcontext *ctx, +_mesa_initialize_context_for_api(struct gl_context *ctx, gl_api api, const struct gl_config *visual, - GLcontext *share_list, + struct gl_context *share_list, const struct dd_function_table *driverFunctions, void *driverContext); extern void -_mesa_free_context_data( GLcontext *ctx ); +_mesa_free_context_data( struct gl_context *ctx ); extern void -_mesa_destroy_context( GLcontext *ctx ); +_mesa_destroy_context( struct gl_context *ctx ); extern void -_mesa_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask); +_mesa_copy_context(const struct gl_context *src, struct gl_context *dst, GLuint mask); extern void -_mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height); +_mesa_check_init_viewport(struct gl_context *ctx, GLuint width, GLuint height); extern GLboolean -_mesa_make_current( GLcontext *ctx, struct gl_framebuffer *drawBuffer, +_mesa_make_current( struct gl_context *ctx, struct gl_framebuffer *drawBuffer, struct gl_framebuffer *readBuffer ); extern GLboolean -_mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare); +_mesa_share_state(struct gl_context *ctx, struct gl_context *ctxToShare); -extern GLcontext * +extern struct gl_context * _mesa_get_current_context(void); /*@}*/ extern void -_mesa_init_get_hash(GLcontext *ctx); +_mesa_init_get_hash(struct gl_context *ctx); extern void -_mesa_notifySwapBuffers(GLcontext *gc); +_mesa_notifySwapBuffers(struct gl_context *gc); extern struct _glapi_table * -_mesa_get_dispatch(GLcontext *ctx); +_mesa_get_dispatch(struct gl_context *ctx); void -_mesa_set_mvp_with_dp4( GLcontext *ctx, +_mesa_set_mvp_with_dp4( struct gl_context *ctx, GLboolean flag ); extern GLboolean -_mesa_valid_to_render(GLcontext *ctx, const char *where); +_mesa_valid_to_render(struct gl_context *ctx, const char *where); @@ -178,14 +178,14 @@ _mesa_valid_to_render(GLcontext *ctx, const char *where); /*@{*/ extern void -_mesa_record_error( GLcontext *ctx, GLenum error ); +_mesa_record_error( struct gl_context *ctx, GLenum error ); extern void -_mesa_finish(GLcontext *ctx); +_mesa_finish(struct gl_context *ctx); extern void -_mesa_flush(GLcontext *ctx); +_mesa_flush(struct gl_context *ctx); extern void GLAPIENTRY @@ -211,7 +211,7 @@ _mesa_Flush( void ); * * Checks if dd_function_table::NeedFlush is marked to flush stored vertices, * and calls dd_function_table::FlushVertices if so. Marks - * __GLcontextRec::NewState with \p newstate. + * __struct gl_contextRec::NewState with \p newstate. */ #define FLUSH_VERTICES(ctx, newstate) \ do { \ @@ -230,7 +230,7 @@ do { \ * * Checks if dd_function_table::NeedFlush is marked to flush current state, * and calls dd_function_table::FlushVertices if so. Marks - * __GLcontextRec::NewState with \p newstate. + * __struct gl_contextRec::NewState with \p newstate. */ #define FLUSH_CURRENT(ctx, newstate) \ do { \ diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 01ad2903df7..c9f0facdaff 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -70,7 +70,7 @@ struct dd_function_table { * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be * returned. */ - const GLubyte * (*GetString)( GLcontext *ctx, GLenum name ); + const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name ); /** * Notify the driver after Mesa has made some internal state changes. @@ -78,7 +78,7 @@ struct dd_function_table { * This is in addition to any state change callbacks Mesa may already have * made. */ - void (*UpdateState)( GLcontext *ctx, GLbitfield new_state ); + void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state ); /** * Get the width and height of the named buffer/window. @@ -93,42 +93,42 @@ struct dd_function_table { * Resize the given framebuffer to the given size. * XXX OBSOLETE: this function will be removed in the future. */ - void (*ResizeBuffers)( GLcontext *ctx, struct gl_framebuffer *fb, + void (*ResizeBuffers)( struct gl_context *ctx, struct gl_framebuffer *fb, GLuint width, GLuint height); /** * Called whenever an error is generated. - * __GLcontextRec::ErrorValue contains the error value. + * __struct gl_contextRec::ErrorValue contains the error value. */ - void (*Error)( GLcontext *ctx ); + void (*Error)( struct gl_context *ctx ); /** * This is called whenever glFinish() is called. */ - void (*Finish)( GLcontext *ctx ); + void (*Finish)( struct gl_context *ctx ); /** * This is called whenever glFlush() is called. */ - void (*Flush)( GLcontext *ctx ); + void (*Flush)( struct gl_context *ctx ); /** * Clear the color/depth/stencil/accum buffer(s). * \param buffers a bitmask of BUFFER_BIT_* flags indicating which * renderbuffers need to be cleared. */ - void (*Clear)( GLcontext *ctx, GLbitfield buffers ); + void (*Clear)( struct gl_context *ctx, GLbitfield buffers ); /** * Execute glAccum command. */ - void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value ); + void (*Accum)( struct gl_context *ctx, GLenum op, GLfloat value ); /** * Execute glRasterPos, updating the ctx->Current.Raster fields */ - void (*RasterPos)( GLcontext *ctx, const GLfloat v[4] ); + void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] ); /** * \name Image-related functions @@ -139,7 +139,7 @@ struct dd_function_table { * Called by glDrawPixels(). * \p unpack describes how to unpack the source image data. */ - void (*DrawPixels)( GLcontext *ctx, + void (*DrawPixels)( struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, @@ -148,7 +148,7 @@ struct dd_function_table { /** * Called by glReadPixels(). */ - void (*ReadPixels)( GLcontext *ctx, + void (*ReadPixels)( struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, const struct gl_pixelstore_attrib *unpack, @@ -157,14 +157,14 @@ struct dd_function_table { /** * Called by glCopyPixels(). */ - void (*CopyPixels)( GLcontext *ctx, GLint srcx, GLint srcy, + void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy, GLsizei width, GLsizei height, GLint dstx, GLint dsty, GLenum type ); /** * Called by glBitmap(). */ - void (*Bitmap)( GLcontext *ctx, + void (*Bitmap)( struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap ); @@ -183,7 +183,7 @@ struct dd_function_table { * functions. The driver should examine \p internalFormat and return a * gl_format value. */ - GLuint (*ChooseTextureFormat)( GLcontext *ctx, GLint internalFormat, + GLuint (*ChooseTextureFormat)( struct gl_context *ctx, GLint internalFormat, GLenum srcFormat, GLenum srcType ); /** @@ -203,7 +203,7 @@ struct dd_function_table { * * Drivers should call a fallback routine from texstore.c if needed. */ - void (*TexImage1D)( GLcontext *ctx, GLenum target, GLint level, + void (*TexImage1D)( struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint border, GLenum format, GLenum type, const GLvoid *pixels, @@ -216,7 +216,7 @@ struct dd_function_table { * * \sa dd_function_table::TexImage1D. */ - void (*TexImage2D)( GLcontext *ctx, GLenum target, GLint level, + void (*TexImage2D)( struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint border, GLenum format, GLenum type, const GLvoid *pixels, @@ -229,7 +229,7 @@ struct dd_function_table { * * \sa dd_function_table::TexImage1D. */ - void (*TexImage3D)( GLcontext *ctx, GLenum target, GLint level, + void (*TexImage3D)( struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels, @@ -258,7 +258,7 @@ struct dd_function_table { * * The driver should use a fallback routine from texstore.c if needed. */ - void (*TexSubImage1D)( GLcontext *ctx, GLenum target, GLint level, + void (*TexSubImage1D)( struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels, @@ -271,7 +271,7 @@ struct dd_function_table { * * \sa dd_function_table::TexSubImage1D. */ - void (*TexSubImage2D)( GLcontext *ctx, GLenum target, GLint level, + void (*TexSubImage2D)( struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, @@ -285,7 +285,7 @@ struct dd_function_table { * * \sa dd_function_table::TexSubImage1D. */ - void (*TexSubImage3D)( GLcontext *ctx, GLenum target, GLint level, + void (*TexSubImage3D)( struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLint depth, GLenum format, GLenum type, @@ -297,7 +297,7 @@ struct dd_function_table { /** * Called by glGetTexImage(). */ - void (*GetTexImage)( GLcontext *ctx, GLenum target, GLint level, + void (*GetTexImage)( struct gl_context *ctx, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels, struct gl_texture_object *texObj, struct gl_texture_image *texImage ); @@ -307,7 +307,7 @@ struct dd_function_table { * * Drivers should use a fallback routine from texstore.c if needed. */ - void (*CopyTexImage1D)( GLcontext *ctx, GLenum target, GLint level, + void (*CopyTexImage1D)( struct gl_context *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border ); @@ -316,7 +316,7 @@ struct dd_function_table { * * Drivers should use a fallback routine from texstore.c if needed. */ - void (*CopyTexImage2D)( GLcontext *ctx, GLenum target, GLint level, + void (*CopyTexImage2D)( struct gl_context *ctx, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ); @@ -325,7 +325,7 @@ struct dd_function_table { * * Drivers should use a fallback routine from texstore.c if needed. */ - void (*CopyTexSubImage1D)( GLcontext *ctx, GLenum target, GLint level, + void (*CopyTexSubImage1D)( struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width ); /** @@ -333,7 +333,7 @@ struct dd_function_table { * * Drivers should use a fallback routine from texstore.c if needed. */ - void (*CopyTexSubImage2D)( GLcontext *ctx, GLenum target, GLint level, + void (*CopyTexSubImage2D)( struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ); @@ -342,7 +342,7 @@ struct dd_function_table { * * Drivers should use a fallback routine from texstore.c if needed. */ - void (*CopyTexSubImage3D)( GLcontext *ctx, GLenum target, GLint level, + void (*CopyTexSubImage3D)( struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ); @@ -350,7 +350,7 @@ struct dd_function_table { /** * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled. */ - void (*GenerateMipmap)(GLcontext *ctx, GLenum target, + void (*GenerateMipmap)(struct gl_context *ctx, GLenum target, struct gl_texture_object *texObj); /** @@ -359,7 +359,7 @@ struct dd_function_table { * * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails. */ - GLboolean (*TestProxyTexImage)(GLcontext *ctx, GLenum target, + GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLenum format, GLenum type, GLint width, GLint height, @@ -387,7 +387,7 @@ struct dd_function_table { * \a retainInternalCopy is returned by this function and indicates whether * core Mesa should keep an internal copy of the texture image. */ - void (*CompressedTexImage1D)( GLcontext *ctx, GLenum target, + void (*CompressedTexImage1D)( struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data, @@ -398,7 +398,7 @@ struct dd_function_table { * * \sa dd_function_table::CompressedTexImage1D. */ - void (*CompressedTexImage2D)( GLcontext *ctx, GLenum target, + void (*CompressedTexImage2D)( struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data, @@ -409,7 +409,7 @@ struct dd_function_table { * * \sa dd_function_table::CompressedTexImage3D. */ - void (*CompressedTexImage3D)( GLcontext *ctx, GLenum target, + void (*CompressedTexImage3D)( struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, @@ -434,7 +434,7 @@ struct dd_function_table { * \param texImage is the target texture image. It will have the texture \p * width, \p height, \p depth, \p border and \p internalFormat information. */ - void (*CompressedTexSubImage1D)(GLcontext *ctx, GLenum target, GLint level, + void (*CompressedTexSubImage1D)(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data, @@ -445,7 +445,7 @@ struct dd_function_table { * * \sa dd_function_table::CompressedTexImage3D. */ - void (*CompressedTexSubImage2D)(GLcontext *ctx, GLenum target, GLint level, + void (*CompressedTexSubImage2D)(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLint height, GLenum format, @@ -457,7 +457,7 @@ struct dd_function_table { * * \sa dd_function_table::CompressedTexImage3D. */ - void (*CompressedTexSubImage3D)(GLcontext *ctx, GLenum target, GLint level, + void (*CompressedTexSubImage3D)(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLint height, GLint depth, GLenum format, @@ -469,7 +469,7 @@ struct dd_function_table { /** * Called by glGetCompressedTexImage. */ - void (*GetCompressedTexImage)(GLcontext *ctx, GLenum target, GLint level, + void (*GetCompressedTexImage)(struct gl_context *ctx, GLenum target, GLint level, GLvoid *img, struct gl_texture_object *texObj, struct gl_texture_image *texImage); @@ -484,7 +484,7 @@ struct dd_function_table { /** * Called by glBindTexture(). */ - void (*BindTexture)( GLcontext *ctx, GLenum target, + void (*BindTexture)( struct gl_context *ctx, GLenum target, struct gl_texture_object *tObj ); /** @@ -492,7 +492,7 @@ struct dd_function_table { * A new gl_texture_object should be returned. The driver should * attach to it any device-specific info it needs. */ - struct gl_texture_object * (*NewTextureObject)( GLcontext *ctx, GLuint name, + struct gl_texture_object * (*NewTextureObject)( struct gl_context *ctx, GLuint name, GLenum target ); /** * Called when a texture object is about to be deallocated. @@ -500,22 +500,22 @@ struct dd_function_table { * Driver should delete the gl_texture_object object and anything * hanging off of it. */ - void (*DeleteTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); + void (*DeleteTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); /** * Called to allocate a new texture image object. */ - struct gl_texture_image * (*NewTextureImage)( GLcontext *ctx ); + struct gl_texture_image * (*NewTextureImage)( struct gl_context *ctx ); /** * Called to free tImage->Data. */ - void (*FreeTexImageData)( GLcontext *ctx, struct gl_texture_image *tImage ); + void (*FreeTexImageData)( struct gl_context *ctx, struct gl_texture_image *tImage ); /** Map texture image data into user space */ - void (*MapTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); + void (*MapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); /** Unmap texture images from user space */ - void (*UnmapTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); + void (*UnmapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); /** * Note: no context argument. This function doesn't initially look @@ -533,7 +533,7 @@ struct dd_function_table { /** * Called by glAreTextureResident(). */ - GLboolean (*IsTextureResident)( GLcontext *ctx, + GLboolean (*IsTextureResident)( struct gl_context *ctx, struct gl_texture_object *t ); /** @@ -542,7 +542,7 @@ struct dd_function_table { * If \p tObj is NULL then the shared texture palette * gl_texture_object::Palette is to be updated. */ - void (*UpdateTexturePalette)( GLcontext *ctx, + void (*UpdateTexturePalette)( struct gl_context *ctx, struct gl_texture_object *tObj ); /*@}*/ @@ -551,11 +551,11 @@ struct dd_function_table { * \name Imaging functionality */ /*@{*/ - void (*CopyColorTable)( GLcontext *ctx, + void (*CopyColorTable)( struct gl_context *ctx, GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width ); - void (*CopyColorSubTable)( GLcontext *ctx, + void (*CopyColorSubTable)( struct gl_context *ctx, GLenum target, GLsizei start, GLint x, GLint y, GLsizei width ); /*@}*/ @@ -566,21 +566,21 @@ struct dd_function_table { */ /*@{*/ /** Bind a vertex/fragment program */ - void (*BindProgram)(GLcontext *ctx, GLenum target, struct gl_program *prog); + void (*BindProgram)(struct gl_context *ctx, GLenum target, struct gl_program *prog); /** Allocate a new program */ - struct gl_program * (*NewProgram)(GLcontext *ctx, GLenum target, GLuint id); + struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target, GLuint id); /** Delete a program */ - void (*DeleteProgram)(GLcontext *ctx, struct gl_program *prog); + void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog); /** * Notify driver that a program string (and GPU code) has been specified * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is * supported by the driver. */ - GLboolean (*ProgramStringNotify)(GLcontext *ctx, GLenum target, + GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target, struct gl_program *prog); /** Query if program can be loaded onto hardware */ - GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target, + GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target, struct gl_program *prog); /*@}*/ @@ -597,14 +597,14 @@ struct dd_function_table { * have CompileShader() called, so if lowering passes are done they * need to also be performed in LinkShader(). */ - GLboolean (*CompileShader)(GLcontext *ctx, struct gl_shader *shader); + GLboolean (*CompileShader)(struct gl_context *ctx, struct gl_shader *shader); /** * Called when a shader program is linked. * * This gives drivers an opportunity to clone the IR and make their * own transformations on it for the purposes of code generation. */ - GLboolean (*LinkShader)(GLcontext *ctx, struct gl_shader_program *shader); + GLboolean (*LinkShader)(struct gl_context *ctx, struct gl_shader_program *shader); /*@}*/ /** @@ -618,102 +618,102 @@ struct dd_function_table { */ /*@{*/ /** Specify the alpha test function */ - void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLfloat ref); + void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref); /** Set the blend color */ - void (*BlendColor)(GLcontext *ctx, const GLfloat color[4]); + void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]); /** Set the blend equation */ - void (*BlendEquationSeparate)(GLcontext *ctx, GLenum modeRGB, GLenum modeA); + void (*BlendEquationSeparate)(struct gl_context *ctx, GLenum modeRGB, GLenum modeA); /** Specify pixel arithmetic */ - void (*BlendFuncSeparate)(GLcontext *ctx, + void (*BlendFuncSeparate)(struct gl_context *ctx, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA); /** Specify clear values for the color buffers */ - void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]); + void (*ClearColor)(struct gl_context *ctx, const GLfloat color[4]); /** Specify the clear value for the depth buffer */ - void (*ClearDepth)(GLcontext *ctx, GLclampd d); + void (*ClearDepth)(struct gl_context *ctx, GLclampd d); /** Specify the clear value for the stencil buffer */ - void (*ClearStencil)(GLcontext *ctx, GLint s); + void (*ClearStencil)(struct gl_context *ctx, GLint s); /** Specify a plane against which all geometry is clipped */ - void (*ClipPlane)(GLcontext *ctx, GLenum plane, const GLfloat *equation ); + void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *equation ); /** Enable and disable writing of frame buffer color components */ - void (*ColorMask)(GLcontext *ctx, GLboolean rmask, GLboolean gmask, + void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask ); - void (*ColorMaskIndexed)(GLcontext *ctx, GLuint buf, GLboolean rmask, + void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask); /** Cause a material color to track the current color */ - void (*ColorMaterial)(GLcontext *ctx, GLenum face, GLenum mode); + void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode); /** Specify whether front- or back-facing facets can be culled */ - void (*CullFace)(GLcontext *ctx, GLenum mode); + void (*CullFace)(struct gl_context *ctx, GLenum mode); /** Define front- and back-facing polygons */ - void (*FrontFace)(GLcontext *ctx, GLenum mode); + void (*FrontFace)(struct gl_context *ctx, GLenum mode); /** Specify the value used for depth buffer comparisons */ - void (*DepthFunc)(GLcontext *ctx, GLenum func); + void (*DepthFunc)(struct gl_context *ctx, GLenum func); /** Enable or disable writing into the depth buffer */ - void (*DepthMask)(GLcontext *ctx, GLboolean flag); + void (*DepthMask)(struct gl_context *ctx, GLboolean flag); /** Specify mapping of depth values from NDC to window coordinates */ - void (*DepthRange)(GLcontext *ctx, GLclampd nearval, GLclampd farval); + void (*DepthRange)(struct gl_context *ctx, GLclampd nearval, GLclampd farval); /** Specify the current buffer for writing */ - void (*DrawBuffer)( GLcontext *ctx, GLenum buffer ); + void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer ); /** Specify the buffers for writing for fragment programs*/ - void (*DrawBuffers)( GLcontext *ctx, GLsizei n, const GLenum *buffers ); + void (*DrawBuffers)( struct gl_context *ctx, GLsizei n, const GLenum *buffers ); /** Enable or disable server-side gl capabilities */ - void (*Enable)(GLcontext *ctx, GLenum cap, GLboolean state); + void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state); /** Specify fog parameters */ - void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); + void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params); /** Specify implementation-specific hints */ - void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode); + void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode); /** Set light source parameters. * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already * been transformed to eye-space. */ - void (*Lightfv)(GLcontext *ctx, GLenum light, + void (*Lightfv)(struct gl_context *ctx, GLenum light, GLenum pname, const GLfloat *params ); /** Set the lighting model parameters */ - void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); + void (*LightModelfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params); /** Specify the line stipple pattern */ - void (*LineStipple)(GLcontext *ctx, GLint factor, GLushort pattern ); + void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern ); /** Specify the width of rasterized lines */ - void (*LineWidth)(GLcontext *ctx, GLfloat width); + void (*LineWidth)(struct gl_context *ctx, GLfloat width); /** Specify a logical pixel operation for color index rendering */ - void (*LogicOpcode)(GLcontext *ctx, GLenum opcode); - void (*PointParameterfv)(GLcontext *ctx, GLenum pname, + void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode); + void (*PointParameterfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params); /** Specify the diameter of rasterized points */ - void (*PointSize)(GLcontext *ctx, GLfloat size); + void (*PointSize)(struct gl_context *ctx, GLfloat size); /** Select a polygon rasterization mode */ - void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode); + void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode); /** Set the scale and units used to calculate depth values */ - void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units); + void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units); /** Set the polygon stippling pattern */ - void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask ); + void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask ); /* Specifies the current buffer for reading */ - void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); + void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer ); /** Set rasterization mode */ - void (*RenderMode)(GLcontext *ctx, GLenum mode ); + void (*RenderMode)(struct gl_context *ctx, GLenum mode ); /** Define the scissor box */ - void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); + void (*Scissor)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h); /** Select flat or smooth shading */ - void (*ShadeModel)(GLcontext *ctx, GLenum mode); + void (*ShadeModel)(struct gl_context *ctx, GLenum mode); /** OpenGL 2.0 two-sided StencilFunc */ - void (*StencilFuncSeparate)(GLcontext *ctx, GLenum face, GLenum func, + void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func, GLint ref, GLuint mask); /** OpenGL 2.0 two-sided StencilMask */ - void (*StencilMaskSeparate)(GLcontext *ctx, GLenum face, GLuint mask); + void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask); /** OpenGL 2.0 two-sided StencilOp */ - void (*StencilOpSeparate)(GLcontext *ctx, GLenum face, GLenum fail, + void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail, GLenum zfail, GLenum zpass); /** Control the generation of texture coordinates */ - void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname, + void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname, const GLfloat *params); /** Set texture environment parameters */ - void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname, + void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname, const GLfloat *param); /** Set texture parameters */ - void (*TexParameter)(GLcontext *ctx, GLenum target, + void (*TexParameter)(struct gl_context *ctx, GLenum target, struct gl_texture_object *texObj, GLenum pname, const GLfloat *params); /** Set the viewport */ - void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); + void (*Viewport)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h); /*@}*/ @@ -721,30 +721,30 @@ struct dd_function_table { * \name Vertex/pixel buffer object functions */ /*@{*/ - void (*BindBuffer)( GLcontext *ctx, GLenum target, + void (*BindBuffer)( struct gl_context *ctx, GLenum target, struct gl_buffer_object *obj ); - struct gl_buffer_object * (*NewBufferObject)( GLcontext *ctx, GLuint buffer, + struct gl_buffer_object * (*NewBufferObject)( struct gl_context *ctx, GLuint buffer, GLenum target ); - void (*DeleteBuffer)( GLcontext *ctx, struct gl_buffer_object *obj ); + void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj ); - GLboolean (*BufferData)( GLcontext *ctx, GLenum target, GLsizeiptrARB size, + GLboolean (*BufferData)( struct gl_context *ctx, GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage, struct gl_buffer_object *obj ); - void (*BufferSubData)( GLcontext *ctx, GLenum target, GLintptrARB offset, + void (*BufferSubData)( struct gl_context *ctx, GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data, struct gl_buffer_object *obj ); - void (*GetBufferSubData)( GLcontext *ctx, GLenum target, + void (*GetBufferSubData)( struct gl_context *ctx, GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data, struct gl_buffer_object *obj ); - void * (*MapBuffer)( GLcontext *ctx, GLenum target, GLenum access, + void * (*MapBuffer)( struct gl_context *ctx, GLenum target, GLenum access, struct gl_buffer_object *obj ); - void (*CopyBufferSubData)( GLcontext *ctx, + void (*CopyBufferSubData)( struct gl_context *ctx, struct gl_buffer_object *src, struct gl_buffer_object *dst, GLintptr readOffset, GLintptr writeOffset, @@ -752,15 +752,15 @@ struct dd_function_table { /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access: */ - void * (*MapBufferRange)( GLcontext *ctx, GLenum target, GLintptr offset, + void * (*MapBufferRange)( struct gl_context *ctx, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access, struct gl_buffer_object *obj); - void (*FlushMappedBufferRange)(GLcontext *ctx, GLenum target, + void (*FlushMappedBufferRange)(struct gl_context *ctx, GLenum target, GLintptr offset, GLsizeiptr length, struct gl_buffer_object *obj); - GLboolean (*UnmapBuffer)( GLcontext *ctx, GLenum target, + GLboolean (*UnmapBuffer)( struct gl_context *ctx, GLenum target, struct gl_buffer_object *obj ); /*@}*/ @@ -769,38 +769,38 @@ struct dd_function_table { */ /*@{*/ /* variations on ObjectPurgeable */ - GLenum (*BufferObjectPurgeable)( GLcontext *ctx, struct gl_buffer_object *obj, GLenum option ); - GLenum (*RenderObjectPurgeable)( GLcontext *ctx, struct gl_renderbuffer *obj, GLenum option ); - GLenum (*TextureObjectPurgeable)( GLcontext *ctx, struct gl_texture_object *obj, GLenum option ); + GLenum (*BufferObjectPurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option ); + GLenum (*RenderObjectPurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option ); + GLenum (*TextureObjectPurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option ); /* variations on ObjectUnpurgeable */ - GLenum (*BufferObjectUnpurgeable)( GLcontext *ctx, struct gl_buffer_object *obj, GLenum option ); - GLenum (*RenderObjectUnpurgeable)( GLcontext *ctx, struct gl_renderbuffer *obj, GLenum option ); - GLenum (*TextureObjectUnpurgeable)( GLcontext *ctx, struct gl_texture_object *obj, GLenum option ); + GLenum (*BufferObjectUnpurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option ); + GLenum (*RenderObjectUnpurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option ); + GLenum (*TextureObjectUnpurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option ); /*@}*/ /** * \name Functions for GL_EXT_framebuffer_{object,blit}. */ /*@{*/ - struct gl_framebuffer * (*NewFramebuffer)(GLcontext *ctx, GLuint name); - struct gl_renderbuffer * (*NewRenderbuffer)(GLcontext *ctx, GLuint name); - void (*BindFramebuffer)(GLcontext *ctx, GLenum target, + struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx, GLuint name); + struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx, GLuint name); + void (*BindFramebuffer)(struct gl_context *ctx, GLenum target, struct gl_framebuffer *drawFb, struct gl_framebuffer *readFb); - void (*FramebufferRenderbuffer)(GLcontext *ctx, + void (*FramebufferRenderbuffer)(struct gl_context *ctx, struct gl_framebuffer *fb, GLenum attachment, struct gl_renderbuffer *rb); - void (*RenderTexture)(GLcontext *ctx, + void (*RenderTexture)(struct gl_context *ctx, struct gl_framebuffer *fb, struct gl_renderbuffer_attachment *att); - void (*FinishRenderTexture)(GLcontext *ctx, + void (*FinishRenderTexture)(struct gl_context *ctx, struct gl_renderbuffer_attachment *att); - void (*ValidateFramebuffer)(GLcontext *ctx, + void (*ValidateFramebuffer)(struct gl_context *ctx, struct gl_framebuffer *fb); /*@}*/ - void (*BlitFramebuffer)(GLcontext *ctx, + void (*BlitFramebuffer)(struct gl_context *ctx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); @@ -809,12 +809,12 @@ struct dd_function_table { * \name Query objects */ /*@{*/ - struct gl_query_object * (*NewQueryObject)(GLcontext *ctx, GLuint id); - void (*DeleteQuery)(GLcontext *ctx, struct gl_query_object *q); - void (*BeginQuery)(GLcontext *ctx, struct gl_query_object *q); - void (*EndQuery)(GLcontext *ctx, struct gl_query_object *q); - void (*CheckQuery)(GLcontext *ctx, struct gl_query_object *q); - void (*WaitQuery)(GLcontext *ctx, struct gl_query_object *q); + struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id); + void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q); /*@}*/ @@ -822,21 +822,21 @@ struct dd_function_table { * \name Vertex Array objects */ /*@{*/ - struct gl_array_object * (*NewArrayObject)(GLcontext *ctx, GLuint id); - void (*DeleteArrayObject)(GLcontext *ctx, struct gl_array_object *obj); - void (*BindArrayObject)(GLcontext *ctx, struct gl_array_object *obj); + struct gl_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id); + void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_array_object *obj); + void (*BindArrayObject)(struct gl_context *ctx, struct gl_array_object *obj); /*@}*/ /** * \name GLSL-related functions (ARB extensions and OpenGL 2.x) */ /*@{*/ - struct gl_shader *(*NewShader)(GLcontext *ctx, GLuint name, GLenum type); - void (*DeleteShader)(GLcontext *ctx, struct gl_shader *shader); - struct gl_shader_program *(*NewShaderProgram)(GLcontext *ctx, GLuint name); - void (*DeleteShaderProgram)(GLcontext *ctx, + struct gl_shader *(*NewShader)(struct gl_context *ctx, GLuint name, GLenum type); + void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader); + struct gl_shader_program *(*NewShaderProgram)(struct gl_context *ctx, GLuint name); + void (*DeleteShaderProgram)(struct gl_context *ctx, struct gl_shader_program *shProg); - void (*UseProgram)(GLcontext *ctx, struct gl_shader_program *shProg); + void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg); /*@}*/ @@ -862,7 +862,7 @@ struct dd_function_table { * This must be non-NULL if a driver installs a custom T&L module and sets * the dd_function_table::NeedValidate bitmask, but may be NULL otherwise. */ - void (*ValidateTnlModule)( GLcontext *ctx, GLuint new_state ); + void (*ValidateTnlModule)( struct gl_context *ctx, GLuint new_state ); #define PRIM_OUTSIDE_BEGIN_END (GL_POLYGON+1) @@ -889,7 +889,7 @@ struct dd_function_table { #define FLUSH_UPDATE_CURRENT 0x2 /** * Set by the driver-supplied T&L engine whenever vertices are buffered - * between glBegin()/glEnd() objects or __GLcontextRec::Current is not + * between glBegin()/glEnd() objects or __struct gl_contextRec::Current is not * updated. * * The dd_function_table::FlushVertices call below may be used to resolve @@ -902,32 +902,32 @@ struct dd_function_table { /* Called prior to any of the GLvertexformat functions being * called. Paired with Driver.FlushVertices(). */ - void (*BeginVertices)( GLcontext *ctx ); + void (*BeginVertices)( struct gl_context *ctx ); /** * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered * vertices, if FLUSH_UPDATE_CURRENT bit is set updates - * __GLcontextRec::Current and gl_light_attrib::Material + * __struct gl_contextRec::Current and gl_light_attrib::Material * * Note that the default T&L engine never clears the * FLUSH_UPDATE_CURRENT bit, even after performing the update. */ - void (*FlushVertices)( GLcontext *ctx, GLuint flags ); - void (*SaveFlushVertices)( GLcontext *ctx ); + void (*FlushVertices)( struct gl_context *ctx, GLuint flags ); + void (*SaveFlushVertices)( struct gl_context *ctx ); /** * Give the driver the opportunity to hook in its own vtxfmt for * compiling optimized display lists. This is called on each valid * glBegin() during list compilation. */ - GLboolean (*NotifySaveBegin)( GLcontext *ctx, GLenum mode ); + GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode ); /** * Notify driver that the special derived value _NeedEyeCoords has * changed. */ - void (*LightingSpaceChange)( GLcontext *ctx ); + void (*LightingSpaceChange)( struct gl_context *ctx ); /** * Called by glNewList(). @@ -935,64 +935,64 @@ struct dd_function_table { * Let the T&L component know what is going on with display lists * in time to make changes to dispatch tables, etc. */ - void (*NewList)( GLcontext *ctx, GLuint list, GLenum mode ); + void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode ); /** * Called by glEndList(). * * \sa dd_function_table::NewList. */ - void (*EndList)( GLcontext *ctx ); + void (*EndList)( struct gl_context *ctx ); /** * Called by glCallList(s). * * Notify the T&L component before and after calling a display list. */ - void (*BeginCallList)( GLcontext *ctx, + void (*BeginCallList)( struct gl_context *ctx, struct gl_display_list *dlist ); /** * Called by glEndCallList(). * * \sa dd_function_table::BeginCallList. */ - void (*EndCallList)( GLcontext *ctx ); + void (*EndCallList)( struct gl_context *ctx ); /** * \name GL_ARB_sync interfaces */ /*@{*/ - struct gl_sync_object * (*NewSyncObject)(GLcontext *, GLenum); - void (*FenceSync)(GLcontext *, struct gl_sync_object *, GLenum, GLbitfield); - void (*DeleteSyncObject)(GLcontext *, struct gl_sync_object *); - void (*CheckSync)(GLcontext *, struct gl_sync_object *); - void (*ClientWaitSync)(GLcontext *, struct gl_sync_object *, + struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum); + void (*FenceSync)(struct gl_context *, struct gl_sync_object *, GLenum, GLbitfield); + void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *); + void (*CheckSync)(struct gl_context *, struct gl_sync_object *); + void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *, GLbitfield, GLuint64); - void (*ServerWaitSync)(GLcontext *, struct gl_sync_object *, + void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *, GLbitfield, GLuint64); /*@}*/ /** GL_NV_conditional_render */ - void (*BeginConditionalRender)(GLcontext *ctx, struct gl_query_object *q, + void (*BeginConditionalRender)(struct gl_context *ctx, struct gl_query_object *q, GLenum mode); - void (*EndConditionalRender)(GLcontext *ctx, struct gl_query_object *q); + void (*EndConditionalRender)(struct gl_context *ctx, struct gl_query_object *q); /** * \name GL_OES_draw_texture interface */ /*@{*/ - void (*DrawTex)(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, + void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); /*@}*/ /** * \name GL_OES_EGL_image interface */ - void (*EGLImageTargetTexture2D)(GLcontext *ctx, GLenum target, + void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target, struct gl_texture_object *texObj, struct gl_texture_image *texImage, GLeglImageOES image_handle); - void (*EGLImageTargetRenderbufferStorage)(GLcontext *ctx, + void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx, struct gl_renderbuffer *rb, void *image_handle); @@ -1000,18 +1000,18 @@ struct dd_function_table { * \name GL_EXT_transform_feedback interface */ struct gl_transform_feedback_object * - (*NewTransformFeedback)(GLcontext *ctx, GLuint name); - void (*DeleteTransformFeedback)(GLcontext *ctx, + (*NewTransformFeedback)(struct gl_context *ctx, GLuint name); + void (*DeleteTransformFeedback)(struct gl_context *ctx, struct gl_transform_feedback_object *obj); - void (*BeginTransformFeedback)(GLcontext *ctx, GLenum mode, + void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode, struct gl_transform_feedback_object *obj); - void (*EndTransformFeedback)(GLcontext *ctx, + void (*EndTransformFeedback)(struct gl_context *ctx, struct gl_transform_feedback_object *obj); - void (*PauseTransformFeedback)(GLcontext *ctx, + void (*PauseTransformFeedback)(struct gl_context *ctx, struct gl_transform_feedback_object *obj); - void (*ResumeTransformFeedback)(GLcontext *ctx, + void (*ResumeTransformFeedback)(struct gl_context *ctx, struct gl_transform_feedback_object *obj); - void (*DrawTransformFeedback)(GLcontext *ctx, GLenum mode, + void (*DrawTransformFeedback)(struct gl_context *ctx, GLenum mode, struct gl_transform_feedback_object *obj); }; diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index 4205c7a4b71..a7e65f8d3aa 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -233,7 +233,7 @@ static void add_debug_flags( const char *debug ) void -_mesa_init_debug( GLcontext *ctx ) +_mesa_init_debug( struct gl_context *ctx ) { char *c; @@ -578,7 +578,7 @@ _mesa_dump_stencil_buffer(const char *filename) * Quick and dirty function to "print" a texture to stdout. */ void -_mesa_print_texture(GLcontext *ctx, const struct gl_texture_image *img) +_mesa_print_texture(struct gl_context *ctx, const struct gl_texture_image *img) { #if CHAN_TYPE != GL_UNSIGNED_BYTE _mesa_problem(NULL, "PrintTexture not supported"); diff --git a/src/mesa/main/debug.h b/src/mesa/main/debug.h index b517cc8259f..e3bb4dfe813 100644 --- a/src/mesa/main/debug.h +++ b/src/mesa/main/debug.h @@ -45,7 +45,7 @@ extern void _mesa_print_tri_caps( const char *name, GLuint flags ); extern void _mesa_print_enable_flags( const char *msg, GLuint flags ); extern void _mesa_print_state( const char *msg, GLuint state ); extern void _mesa_print_info( void ); -extern void _mesa_init_debug( GLcontext *ctx ); +extern void _mesa_init_debug( struct gl_context *ctx ); #else @@ -79,6 +79,6 @@ extern void _mesa_dump_stencil_buffer(const char *filename); extern void -_mesa_print_texture(GLcontext *ctx, const struct gl_texture_image *img); +_mesa_print_texture(struct gl_context *ctx, const struct gl_texture_image *img); #endif diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c index f187205b978..c5a910e144a 100644 --- a/src/mesa/main/depth.c +++ b/src/mesa/main/depth.c @@ -153,7 +153,7 @@ _mesa_DepthBoundsEXT( GLclampd zmin, GLclampd zmax ) * Initialize the depth buffer attribute group in the given context. */ void -_mesa_init_depth(GLcontext *ctx) +_mesa_init_depth(struct gl_context *ctx) { ctx->Depth.Test = GL_FALSE; ctx->Depth.Clear = 1.0; diff --git a/src/mesa/main/depth.h b/src/mesa/main/depth.h index dcc0b4637a7..d61d3b121ba 100644 --- a/src/mesa/main/depth.h +++ b/src/mesa/main/depth.h @@ -50,7 +50,7 @@ extern void GLAPIENTRY _mesa_DepthBoundsEXT( GLclampd zmin, GLclampd zmax ); extern void -_mesa_init_depth( GLcontext * ctx ); +_mesa_init_depth( struct gl_context * ctx ); #else diff --git a/src/mesa/main/depthstencil.c b/src/mesa/main/depthstencil.c index dbaa8416457..c5466dc9fcc 100644 --- a/src/mesa/main/depthstencil.c +++ b/src/mesa/main/depthstencil.c @@ -46,7 +46,7 @@ static void * -nop_get_pointer(GLcontext *ctx, struct gl_renderbuffer *rb, GLint x, GLint y) +nop_get_pointer(struct gl_context *ctx, struct gl_renderbuffer *rb, GLint x, GLint y) { (void) ctx; (void) rb; @@ -73,7 +73,7 @@ delete_wrapper(struct gl_renderbuffer *rb) * Realloc storage for wrapper. */ static GLboolean -alloc_wrapper_storage(GLcontext *ctx, struct gl_renderbuffer *rb, +alloc_wrapper_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, GLenum internalFormat, GLuint width, GLuint height) { /* just pass this on to the wrapped renderbuffer */ @@ -103,7 +103,7 @@ alloc_wrapper_storage(GLcontext *ctx, struct gl_renderbuffer *rb, */ static void -get_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, +get_row_z24(struct gl_context *ctx, struct gl_renderbuffer *z24rb, GLuint count, GLint x, GLint y, void *values) { struct gl_renderbuffer *dsrb = z24rb->Wrapped; @@ -130,7 +130,7 @@ get_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, } static void -get_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, +get_values_z24(struct gl_context *ctx, struct gl_renderbuffer *z24rb, GLuint count, const GLint x[], const GLint y[], void *values) { struct gl_renderbuffer *dsrb = z24rb->Wrapped; @@ -155,7 +155,7 @@ get_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, } static void -put_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, +put_row_z24(struct gl_context *ctx, struct gl_renderbuffer *z24rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { struct gl_renderbuffer *dsrb = z24rb->Wrapped; @@ -206,7 +206,7 @@ put_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, } static void -put_mono_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, +put_mono_row_z24(struct gl_context *ctx, struct gl_renderbuffer *z24rb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask) { struct gl_renderbuffer *dsrb = z24rb->Wrapped; @@ -260,7 +260,7 @@ put_mono_row_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, } static void -put_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, +put_values_z24(struct gl_context *ctx, struct gl_renderbuffer *z24rb, GLuint count, const GLint x[], const GLint y[], const void *values, const GLubyte *mask) { @@ -313,7 +313,7 @@ put_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, GLuint count, } static void -put_mono_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, +put_mono_values_z24(struct gl_context *ctx, struct gl_renderbuffer *z24rb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask) { @@ -348,7 +348,7 @@ put_mono_values_z24(GLcontext *ctx, struct gl_renderbuffer *z24rb, * \return new depth renderbuffer */ struct gl_renderbuffer * -_mesa_new_z24_renderbuffer_wrapper(GLcontext *ctx, +_mesa_new_z24_renderbuffer_wrapper(struct gl_context *ctx, struct gl_renderbuffer *dsrb) { struct gl_renderbuffer *z24rb; @@ -396,7 +396,7 @@ _mesa_new_z24_renderbuffer_wrapper(GLcontext *ctx, */ static void -get_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, +get_row_s8(struct gl_context *ctx, struct gl_renderbuffer *s8rb, GLuint count, GLint x, GLint y, void *values) { struct gl_renderbuffer *dsrb = s8rb->Wrapped; @@ -423,7 +423,7 @@ get_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, } static void -get_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, +get_values_s8(struct gl_context *ctx, struct gl_renderbuffer *s8rb, GLuint count, const GLint x[], const GLint y[], void *values) { struct gl_renderbuffer *dsrb = s8rb->Wrapped; @@ -448,7 +448,7 @@ get_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, } static void -put_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, +put_row_s8(struct gl_context *ctx, struct gl_renderbuffer *s8rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { struct gl_renderbuffer *dsrb = s8rb->Wrapped; @@ -499,7 +499,7 @@ put_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, } static void -put_mono_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, +put_mono_row_s8(struct gl_context *ctx, struct gl_renderbuffer *s8rb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask) { struct gl_renderbuffer *dsrb = s8rb->Wrapped; @@ -550,7 +550,7 @@ put_mono_row_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, } static void -put_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, +put_values_s8(struct gl_context *ctx, struct gl_renderbuffer *s8rb, GLuint count, const GLint x[], const GLint y[], const void *values, const GLubyte *mask) { @@ -603,7 +603,7 @@ put_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, } static void -put_mono_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, +put_mono_values_s8(struct gl_context *ctx, struct gl_renderbuffer *s8rb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask) { @@ -637,7 +637,7 @@ put_mono_values_s8(GLcontext *ctx, struct gl_renderbuffer *s8rb, GLuint count, * \return new stencil renderbuffer */ struct gl_renderbuffer * -_mesa_new_s8_renderbuffer_wrapper(GLcontext *ctx, struct gl_renderbuffer *dsrb) +_mesa_new_s8_renderbuffer_wrapper(struct gl_context *ctx, struct gl_renderbuffer *dsrb) { struct gl_renderbuffer *s8rb; @@ -698,7 +698,7 @@ _mesa_new_s8_renderbuffer_wrapper(GLcontext *ctx, struct gl_renderbuffer *dsrb) * (either 8-bit or 32-bit) */ void -_mesa_extract_stencil(GLcontext *ctx, +_mesa_extract_stencil(struct gl_context *ctx, struct gl_renderbuffer *dsRb, struct gl_renderbuffer *stencilRb) { @@ -747,7 +747,7 @@ _mesa_extract_stencil(GLcontext *ctx, * \param stencilRb the source stencil buffer (either 8-bit or 32-bit) */ void -_mesa_insert_stencil(GLcontext *ctx, +_mesa_insert_stencil(struct gl_context *ctx, struct gl_renderbuffer *dsRb, struct gl_renderbuffer *stencilRb) { @@ -803,7 +803,7 @@ _mesa_insert_stencil(GLcontext *ctx, * \param stencilRb the stencil renderbuffer to promote */ void -_mesa_promote_stencil(GLcontext *ctx, struct gl_renderbuffer *stencilRb) +_mesa_promote_stencil(struct gl_context *ctx, struct gl_renderbuffer *stencilRb) { const GLsizei width = stencilRb->Width; const GLsizei height = stencilRb->Height; diff --git a/src/mesa/main/depthstencil.h b/src/mesa/main/depthstencil.h index afbac77f0e2..4db5868263a 100644 --- a/src/mesa/main/depthstencil.h +++ b/src/mesa/main/depthstencil.h @@ -29,29 +29,29 @@ #include "mtypes.h" extern struct gl_renderbuffer * -_mesa_new_z24_renderbuffer_wrapper(GLcontext *ctx, +_mesa_new_z24_renderbuffer_wrapper(struct gl_context *ctx, struct gl_renderbuffer *dsrb); extern struct gl_renderbuffer * -_mesa_new_s8_renderbuffer_wrapper(GLcontext *ctx, +_mesa_new_s8_renderbuffer_wrapper(struct gl_context *ctx, struct gl_renderbuffer *dsrb); extern void -_mesa_extract_stencil(GLcontext *ctx, +_mesa_extract_stencil(struct gl_context *ctx, struct gl_renderbuffer *dsRb, struct gl_renderbuffer *stencilRb); extern void -_mesa_insert_stencil(GLcontext *ctx, +_mesa_insert_stencil(struct gl_context *ctx, struct gl_renderbuffer *dsRb, struct gl_renderbuffer *stencilRb); extern void -_mesa_promote_stencil(GLcontext *ctx, struct gl_renderbuffer *stencilRb); +_mesa_promote_stencil(struct gl_context *ctx, struct gl_renderbuffer *stencilRb); #endif /* DEPTHSTENCIL_H */ diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index cccec248539..f513f31c56e 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -77,9 +77,9 @@ struct gl_list_instruction { GLuint Size; - void (*Execute)( GLcontext *ctx, void *data ); - void (*Destroy)( GLcontext *ctx, void *data ); - void (*Print)( GLcontext *ctx, void *data ); + void (*Execute)( struct gl_context *ctx, void *data ); + void (*Destroy)( struct gl_context *ctx, void *data ); + void (*Print)( struct gl_context *ctx, void *data ); }; @@ -496,7 +496,7 @@ make_list(GLuint name, GLuint count) * Lookup function to just encapsulate casting. */ static INLINE struct gl_display_list * -lookup_list(GLcontext *ctx, GLuint list) +lookup_list(struct gl_context *ctx, GLuint list) { return (struct gl_display_list *) _mesa_HashLookup(ctx->Shared->DisplayList, list); @@ -513,7 +513,7 @@ is_ext_opcode(OpCode opcode) /** Destroy an extended opcode instruction */ static GLint -ext_opcode_destroy(GLcontext *ctx, Node *node) +ext_opcode_destroy(struct gl_context *ctx, Node *node) { const GLint i = node[0].opcode - OPCODE_EXT_0; GLint step; @@ -525,7 +525,7 @@ ext_opcode_destroy(GLcontext *ctx, Node *node) /** Execute an extended opcode instruction */ static GLint -ext_opcode_execute(GLcontext *ctx, Node *node) +ext_opcode_execute(struct gl_context *ctx, Node *node) { const GLint i = node[0].opcode - OPCODE_EXT_0; GLint step; @@ -537,7 +537,7 @@ ext_opcode_execute(GLcontext *ctx, Node *node) /** Print an extended opcode instruction */ static GLint -ext_opcode_print(GLcontext *ctx, Node *node) +ext_opcode_print(struct gl_context *ctx, Node *node) { const GLint i = node[0].opcode - OPCODE_EXT_0; GLint step; @@ -552,7 +552,7 @@ ext_opcode_print(GLcontext *ctx, Node *node) * \param dlist - display list pointer */ void -_mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist) +_mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist) { Node *n, *block; GLboolean done; @@ -730,7 +730,7 @@ _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist) * \param list - display list number */ static void -destroy_list(GLcontext *ctx, GLuint list) +destroy_list(struct gl_context *ctx, GLuint list) { struct gl_display_list *dlist; @@ -814,7 +814,7 @@ translate_id(GLsizei n, GLenum type, const GLvoid * list) * If we run out of memory, GL_OUT_OF_MEMORY will be recorded. */ static GLvoid * -unpack_image(GLcontext *ctx, GLuint dimensions, +unpack_image(struct gl_context *ctx, GLuint dimensions, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels, const struct gl_pixelstore_attrib *unpack) @@ -866,7 +866,7 @@ unpack_image(GLcontext *ctx, GLuint dimensions, * \return pointer to allocated memory (the opcode space) */ static Node * -dlist_alloc(GLcontext *ctx, OpCode opcode, GLuint bytes) +dlist_alloc(struct gl_context *ctx, OpCode opcode, GLuint bytes) { const GLuint numNodes = 1 + (bytes + sizeof(Node) - 1) / sizeof(Node); Node *n; @@ -917,7 +917,7 @@ dlist_alloc(GLcontext *ctx, OpCode opcode, GLuint bytes) * opcode). */ void * -_mesa_dlist_alloc(GLcontext *ctx, GLuint opcode, GLuint bytes) +_mesa_dlist_alloc(struct gl_context *ctx, GLuint opcode, GLuint bytes) { Node *n = dlist_alloc(ctx, (OpCode) opcode, bytes); if (n) @@ -938,11 +938,11 @@ _mesa_dlist_alloc(GLcontext *ctx, GLuint opcode, GLuint bytes) * \return the new opcode number or -1 if error */ GLint -_mesa_dlist_alloc_opcode(GLcontext *ctx, +_mesa_dlist_alloc_opcode(struct gl_context *ctx, GLuint size, - void (*execute) (GLcontext *, void *), - void (*destroy) (GLcontext *, void *), - void (*print) (GLcontext *, void *)) + void (*execute) (struct gl_context *, void *), + void (*destroy) (struct gl_context *, void *), + void (*print) (struct gl_context *, void *)) { if (ctx->ListExt->NumOpcodes < MAX_DLIST_EXT_OPCODES) { const GLuint i = ctx->ListExt->NumOpcodes++; @@ -967,7 +967,7 @@ _mesa_dlist_alloc_opcode(GLcontext *ctx, * \return pointer to start of instruction space */ static INLINE Node * -alloc_instruction(GLcontext *ctx, OpCode opcode, GLuint nparams) +alloc_instruction(struct gl_context *ctx, OpCode opcode, GLuint nparams) { return dlist_alloc(ctx, opcode, nparams * sizeof(Node)); } @@ -1132,7 +1132,7 @@ save_BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) } } -static void invalidate_saved_current_state( GLcontext *ctx ) +static void invalidate_saved_current_state( struct gl_context *ctx ) { GLint i; @@ -6795,7 +6795,7 @@ save_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, * command that provoked the error. I don't see this as a problem. */ static void -save_error(GLcontext *ctx, GLenum error, const char *s) +save_error(struct gl_context *ctx, GLenum error, const char *s) { Node *n; n = alloc_instruction(ctx, OPCODE_ERROR, 2); @@ -6810,7 +6810,7 @@ save_error(GLcontext *ctx, GLenum error, const char *s) * Compile an error into current display list. */ void -_mesa_compile_error(GLcontext *ctx, GLenum error, const char *s) +_mesa_compile_error(struct gl_context *ctx, GLenum error, const char *s) { if (ctx->CompileFlag) save_error(ctx, error, s); @@ -6823,7 +6823,7 @@ _mesa_compile_error(GLcontext *ctx, GLenum error, const char *s) * Test if ID names a display list. */ static GLboolean -islist(GLcontext *ctx, GLuint list) +islist(struct gl_context *ctx, GLuint list) { if (list > 0 && lookup_list(ctx, list)) { return GL_TRUE; @@ -6847,7 +6847,7 @@ islist(GLcontext *ctx, GLuint list) * \param list - display list number */ static void -execute_list(GLcontext *ctx, GLuint list) +execute_list(struct gl_context *ctx, GLuint list) { struct gl_display_list *dlist; Node *n; @@ -9577,7 +9577,7 @@ enum_string(GLenum k) * TODO: many commands aren't handled yet. */ static void GLAPIENTRY -print_list(GLcontext *ctx, GLuint list) +print_list(struct gl_context *ctx, GLuint list) { struct gl_display_list *dlist; Node *n; @@ -9969,7 +9969,7 @@ void _mesa_init_dlist_dispatch(struct _glapi_table *disp) * Initialize display list state for given context. */ void -_mesa_init_display_list(GLcontext *ctx) +_mesa_init_display_list(struct gl_context *ctx) { static GLboolean tableInitialized = GL_FALSE; @@ -9999,7 +9999,7 @@ _mesa_init_display_list(GLcontext *ctx) void -_mesa_free_display_list_data(GLcontext *ctx) +_mesa_free_display_list_data(struct gl_context *ctx) { free(ctx->ListExt); ctx->ListExt = NULL; diff --git a/src/mesa/main/dlist.h b/src/mesa/main/dlist.h index 86bb132e56e..24241a4bd4f 100644 --- a/src/mesa/main/dlist.h +++ b/src/mesa/main/dlist.h @@ -49,16 +49,16 @@ extern void GLAPIENTRY _mesa_CallList( GLuint list ); extern void GLAPIENTRY _mesa_CallLists( GLsizei n, GLenum type, const GLvoid *lists ); -extern void _mesa_compile_error( GLcontext *ctx, GLenum error, const char *s ); +extern void _mesa_compile_error( struct gl_context *ctx, GLenum error, const char *s ); -extern void *_mesa_dlist_alloc(GLcontext *ctx, GLuint opcode, GLuint sz); +extern void *_mesa_dlist_alloc(struct gl_context *ctx, GLuint opcode, GLuint sz); -extern GLint _mesa_dlist_alloc_opcode( GLcontext *ctx, GLuint sz, - void (*execute)( GLcontext *, void * ), - void (*destroy)( GLcontext *, void * ), - void (*print)( GLcontext *, void * ) ); +extern GLint _mesa_dlist_alloc_opcode( struct gl_context *ctx, GLuint sz, + void (*execute)( struct gl_context *, void * ), + void (*destroy)( struct gl_context *, void * ), + void (*print)( struct gl_context *, void * ) ); -extern void _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist); +extern void _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist); extern void _mesa_save_vtxfmt_init( GLvertexformat *vfmt ); @@ -76,7 +76,7 @@ extern void _mesa_init_dlist_dispatch(struct _glapi_table *disp); #define _MESA_INIT_DLIST_VTXFMT(vfmt, impl) do { } while (0) static INLINE void -_mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist) +_mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist) { /* there should be no list to delete */ ASSERT_NO_FEATURE(); @@ -95,9 +95,9 @@ _mesa_init_dlist_dispatch(struct _glapi_table *disp) #endif /* FEATURE_dlist */ -extern void _mesa_init_display_list( GLcontext * ctx ); +extern void _mesa_init_display_list( struct gl_context * ctx ); -extern void _mesa_free_display_list_data(GLcontext *ctx); +extern void _mesa_free_display_list_data(struct gl_context *ctx); #endif /* DLIST_H */ diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index bf36a7e7a49..ac92a3fb084 100644 --- a/src/mesa/main/drawpix.c +++ b/src/mesa/main/drawpix.c @@ -43,7 +43,7 @@ * \return GL_TRUE if valid, GL_FALSE otherwise */ static GLboolean -valid_fragment_program(GLcontext *ctx) +valid_fragment_program(struct gl_context *ctx) { return !(ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled); } diff --git a/src/mesa/main/drawtex.c b/src/mesa/main/drawtex.c index c2ad5f23862..b9afc9974e0 100644 --- a/src/mesa/main/drawtex.c +++ b/src/mesa/main/drawtex.c @@ -30,7 +30,7 @@ static void -draw_texture(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, +draw_texture(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) { if (!ctx->Extensions.OES_draw_texture) { diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index b2be44830a0..5a5b199df32 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -50,7 +50,7 @@ * Helper to enable/disable client-side state. */ static void -client_state(GLcontext *ctx, GLenum cap, GLboolean state) +client_state(struct gl_context *ctx, GLenum cap, GLboolean state) { struct gl_array_object *arrayObj = ctx->Array.ArrayObj; GLuint flag; @@ -207,7 +207,7 @@ _mesa_DisableClientState( GLenum cap ) * higher than the number of supported coordinate units. And we'll return NULL. */ static struct gl_texture_unit * -get_texcoord_unit(GLcontext *ctx) +get_texcoord_unit(struct gl_context *ctx) { if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { _mesa_error(ctx, GL_INVALID_OPERATION, "glEnable/Disable(texcoord unit)"); @@ -225,7 +225,7 @@ get_texcoord_unit(GLcontext *ctx) * \return GL_TRUE if state is changing or GL_FALSE if no change */ static GLboolean -enable_texture(GLcontext *ctx, GLboolean state, GLbitfield texBit) +enable_texture(struct gl_context *ctx, GLboolean state, GLbitfield texBit) { struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx); const GLbitfield newenabled = state @@ -253,7 +253,7 @@ enable_texture(GLcontext *ctx, GLboolean state, GLbitfield texBit) * dd_function_table::Enable. */ void -_mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state) +_mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) { if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "%s %s (newstate is %x)\n", @@ -1005,7 +1005,7 @@ _mesa_Disable( GLenum cap ) * Enable/disable an indexed state var. */ void -_mesa_set_enablei(GLcontext *ctx, GLenum cap, GLuint index, GLboolean state) +_mesa_set_enablei(struct gl_context *ctx, GLenum cap, GLuint index, GLboolean state) { ASSERT(state == 0 || state == 1); switch (cap) { @@ -1095,7 +1095,7 @@ _mesa_IsEnabledIndexed( GLenum cap, GLuint index ) * Helper function to determine whether a texture target is enabled. */ static GLboolean -is_texture_enabled(GLcontext *ctx, GLbitfield bit) +is_texture_enabled(struct gl_context *ctx, GLbitfield bit) { const struct gl_texture_unit *const texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; diff --git a/src/mesa/main/enable.h b/src/mesa/main/enable.h index 24e3181a8ba..69e52b1cb26 100644 --- a/src/mesa/main/enable.h +++ b/src/mesa/main/enable.h @@ -36,7 +36,7 @@ extern void -_mesa_set_enable( GLcontext* ctx, GLenum cap, GLboolean state ); +_mesa_set_enable( struct gl_context* ctx, GLenum cap, GLboolean state ); extern void GLAPIENTRY _mesa_Disable( GLenum cap ); @@ -48,7 +48,7 @@ extern GLboolean GLAPIENTRY _mesa_IsEnabled( GLenum cap ); extern void -_mesa_set_enablei(GLcontext *ctx, GLenum cap, GLuint index, GLboolean state); +_mesa_set_enablei(struct gl_context *ctx, GLenum cap, GLuint index, GLboolean state); extern void GLAPIENTRY _mesa_DisableIndexed( GLenum cap, GLuint index ); diff --git a/src/mesa/main/eval.c b/src/mesa/main/eval.c index bd2e1177fd2..c607e6a26af 100644 --- a/src/mesa/main/eval.c +++ b/src/mesa/main/eval.c @@ -100,7 +100,7 @@ GLuint _mesa_evaluator_components( GLenum target ) * Return pointer to the gl_1d_map struct for the named target. */ static struct gl_1d_map * -get_1d_map( GLcontext *ctx, GLenum target ) +get_1d_map( struct gl_context *ctx, GLenum target ) { switch (target) { case GL_MAP1_VERTEX_3: @@ -150,7 +150,7 @@ get_1d_map( GLcontext *ctx, GLenum target ) * Return pointer to the gl_2d_map struct for the named target. */ static struct gl_2d_map * -get_2d_map( GLcontext *ctx, GLenum target ) +get_2d_map( struct gl_context *ctx, GLenum target ) { switch (target) { case GL_MAP2_VERTEX_3: @@ -880,7 +880,7 @@ init_2d_map( struct gl_2d_map *map, int n, const float *initial ) } -void _mesa_init_eval( GLcontext *ctx ) +void _mesa_init_eval( struct gl_context *ctx ) { int i; @@ -952,7 +952,7 @@ void _mesa_init_eval( GLcontext *ctx ) } -void _mesa_free_eval_data( GLcontext *ctx ) +void _mesa_free_eval_data( struct gl_context *ctx ) { int i; diff --git a/src/mesa/main/eval.h b/src/mesa/main/eval.h index ffd1bab76da..bd908f00cdd 100644 --- a/src/mesa/main/eval.h +++ b/src/mesa/main/eval.h @@ -57,7 +57,7 @@ extern GLuint _mesa_evaluator_components( GLenum target ); -extern void gl_free_control_points( GLcontext *ctx, +extern void gl_free_control_points( struct gl_context *ctx, GLenum target, GLfloat *data ); @@ -103,8 +103,8 @@ _mesa_init_eval_dispatch(struct _glapi_table *disp) #endif /* FEATURE_evaluators */ -extern void _mesa_init_eval( GLcontext *ctx ); -extern void _mesa_free_eval_data( GLcontext *ctx ); +extern void _mesa_init_eval( struct gl_context *ctx ); +extern void _mesa_free_eval_data( struct gl_context *ctx ); #endif /* EVAL_H */ diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index 99583a6345d..bc8cbef1320 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -228,7 +228,7 @@ static const struct { * This is a convenience function used by the XMesa, OSMesa, GGI drivers, etc. */ void -_mesa_enable_sw_extensions(GLcontext *ctx) +_mesa_enable_sw_extensions(struct gl_context *ctx) { /*ctx->Extensions.ARB_copy_buffer = GL_TRUE;*/ ctx->Extensions.ARB_depth_clamp = GL_TRUE; @@ -388,7 +388,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx) * Enable common EXT extensions in the ARB_imaging subset. */ void -_mesa_enable_imaging_extensions(GLcontext *ctx) +_mesa_enable_imaging_extensions(struct gl_context *ctx) { ctx->Extensions.EXT_blend_color = GL_TRUE; ctx->Extensions.EXT_blend_logic_op = GL_TRUE; @@ -403,7 +403,7 @@ _mesa_enable_imaging_extensions(GLcontext *ctx) * A convenience function to be called by drivers. */ void -_mesa_enable_1_3_extensions(GLcontext *ctx) +_mesa_enable_1_3_extensions(struct gl_context *ctx) { /*ctx->Extensions.ARB_multisample = GL_TRUE;*/ ctx->Extensions.ARB_multitexture = GL_TRUE; @@ -423,7 +423,7 @@ _mesa_enable_1_3_extensions(GLcontext *ctx) * A convenience function to be called by drivers. */ void -_mesa_enable_1_4_extensions(GLcontext *ctx) +_mesa_enable_1_4_extensions(struct gl_context *ctx) { ctx->Extensions.ARB_depth_texture = GL_TRUE; ctx->Extensions.ARB_shadow = GL_TRUE; @@ -449,7 +449,7 @@ _mesa_enable_1_4_extensions(GLcontext *ctx) * A convenience function to be called by drivers. */ void -_mesa_enable_1_5_extensions(GLcontext *ctx) +_mesa_enable_1_5_extensions(struct gl_context *ctx) { ctx->Extensions.ARB_occlusion_query = GL_TRUE; /*ctx->Extensions.ARB_vertex_buffer_object = GL_TRUE;*/ @@ -462,7 +462,7 @@ _mesa_enable_1_5_extensions(GLcontext *ctx) * A convenience function to be called by drivers. */ void -_mesa_enable_2_0_extensions(GLcontext *ctx) +_mesa_enable_2_0_extensions(struct gl_context *ctx) { /*ctx->Extensions.ARB_draw_buffers = GL_TRUE;*/ #if FEATURE_ARB_fragment_shader @@ -489,7 +489,7 @@ _mesa_enable_2_0_extensions(GLcontext *ctx) * A convenience function to be called by drivers. */ void -_mesa_enable_2_1_extensions(GLcontext *ctx) +_mesa_enable_2_1_extensions(struct gl_context *ctx) { #if FEATURE_EXT_pixel_buffer_object ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE; @@ -505,7 +505,7 @@ _mesa_enable_2_1_extensions(GLcontext *ctx) * \return GL_TRUE for success, GL_FALSE if invalid extension name */ static GLboolean -set_extension( GLcontext *ctx, const char *name, GLboolean state ) +set_extension( struct gl_context *ctx, const char *name, GLboolean state ) { GLboolean *base = (GLboolean *) &ctx->Extensions; GLuint i; @@ -534,7 +534,7 @@ set_extension( GLcontext *ctx, const char *name, GLboolean state ) * Typically called by drivers. */ void -_mesa_enable_extension( GLcontext *ctx, const char *name ) +_mesa_enable_extension( struct gl_context *ctx, const char *name ) { if (!set_extension(ctx, name, GL_TRUE)) _mesa_problem(ctx, "Trying to enable unknown extension: %s", name); @@ -546,7 +546,7 @@ _mesa_enable_extension( GLcontext *ctx, const char *name ) * XXX is this really needed??? */ void -_mesa_disable_extension( GLcontext *ctx, const char *name ) +_mesa_disable_extension( struct gl_context *ctx, const char *name ) { if (!set_extension(ctx, name, GL_FALSE)) _mesa_problem(ctx, "Trying to disable unknown extension: %s", name); @@ -557,7 +557,7 @@ _mesa_disable_extension( GLcontext *ctx, const char *name ) * Check if the i-th extension is enabled. */ static GLboolean -extension_enabled(GLcontext *ctx, GLuint index) +extension_enabled(struct gl_context *ctx, GLuint index) { const GLboolean *base = (const GLboolean *) &ctx->Extensions; if (!default_extensions[index].flag_offset || @@ -574,7 +574,7 @@ extension_enabled(GLcontext *ctx, GLuint index) * Test if the named extension is enabled in this context. */ GLboolean -_mesa_extension_is_enabled( GLcontext *ctx, const char *name ) +_mesa_extension_is_enabled( struct gl_context *ctx, const char *name ) { GLuint i; @@ -616,7 +616,7 @@ append(const char *a, const char *b) * Return a string of the unknown/leftover names. */ static const char * -get_extension_override( GLcontext *ctx ) +get_extension_override( struct gl_context *ctx ) { const char *envExt = _mesa_getenv("MESA_EXTENSION_OVERRIDE"); char *extraExt = NULL; @@ -667,7 +667,7 @@ get_extension_override( GLcontext *ctx ) * To be called during context initialization. */ void -_mesa_init_extensions( GLcontext *ctx ) +_mesa_init_extensions( struct gl_context *ctx ) { GLboolean *base = (GLboolean *) &ctx->Extensions; GLuint i; @@ -686,7 +686,7 @@ _mesa_init_extensions( GLcontext *ctx ) * glGetString(GL_EXTENSIONS) is called. */ static GLubyte * -compute_extensions( GLcontext *ctx ) +compute_extensions( struct gl_context *ctx ) { const char *extraExt = get_extension_override(ctx); GLuint extStrLen = 0; @@ -753,7 +753,7 @@ append_extension(GLubyte **str, const char *ext) static size_t -make_extension_string_es1(const GLcontext *ctx, GLubyte *str) +make_extension_string_es1(const struct gl_context *ctx, GLubyte *str) { size_t len = 0; @@ -835,7 +835,7 @@ make_extension_string_es1(const GLcontext *ctx, GLubyte *str) static GLubyte * -compute_extensions_es1(const GLcontext *ctx) +compute_extensions_es1(const struct gl_context *ctx) { GLubyte *s; unsigned int len; @@ -850,7 +850,7 @@ compute_extensions_es1(const GLcontext *ctx) } static size_t -make_extension_string_es2(const GLcontext *ctx, GLubyte *str) +make_extension_string_es2(const struct gl_context *ctx, GLubyte *str) { size_t len = 0; @@ -904,7 +904,7 @@ make_extension_string_es2(const GLcontext *ctx, GLubyte *str) } static GLubyte * -compute_extensions_es2(GLcontext *ctx) +compute_extensions_es2(struct gl_context *ctx) { GLubyte *s; unsigned int len; @@ -920,7 +920,7 @@ compute_extensions_es2(GLcontext *ctx) GLubyte * -_mesa_make_extension_string(GLcontext *ctx) +_mesa_make_extension_string(struct gl_context *ctx) { switch (ctx->API) { case API_OPENGL: @@ -939,7 +939,7 @@ _mesa_make_extension_string(GLcontext *ctx) * Return number of enabled extensions. */ GLuint -_mesa_get_extension_count(GLcontext *ctx) +_mesa_get_extension_count(struct gl_context *ctx) { GLuint i; @@ -964,7 +964,7 @@ _mesa_get_extension_count(GLcontext *ctx) * Return name of i-th enabled extension */ const GLubyte * -_mesa_get_enabled_extension(GLcontext *ctx, GLuint index) +_mesa_get_enabled_extension(struct gl_context *ctx, GLuint index) { GLuint i; diff --git a/src/mesa/main/extensions.h b/src/mesa/main/extensions.h index a25472440d6..6eb85393965 100644 --- a/src/mesa/main/extensions.h +++ b/src/mesa/main/extensions.h @@ -40,35 +40,35 @@ #if _HAVE_FULL_GL -extern void _mesa_enable_sw_extensions(GLcontext *ctx); +extern void _mesa_enable_sw_extensions(struct gl_context *ctx); -extern void _mesa_enable_imaging_extensions(GLcontext *ctx); +extern void _mesa_enable_imaging_extensions(struct gl_context *ctx); -extern void _mesa_enable_1_3_extensions(GLcontext *ctx); +extern void _mesa_enable_1_3_extensions(struct gl_context *ctx); -extern void _mesa_enable_1_4_extensions(GLcontext *ctx); +extern void _mesa_enable_1_4_extensions(struct gl_context *ctx); -extern void _mesa_enable_1_5_extensions(GLcontext *ctx); +extern void _mesa_enable_1_5_extensions(struct gl_context *ctx); -extern void _mesa_enable_2_0_extensions(GLcontext *ctx); +extern void _mesa_enable_2_0_extensions(struct gl_context *ctx); -extern void _mesa_enable_2_1_extensions(GLcontext *ctx); +extern void _mesa_enable_2_1_extensions(struct gl_context *ctx); -extern void _mesa_enable_extension(GLcontext *ctx, const char *name); +extern void _mesa_enable_extension(struct gl_context *ctx, const char *name); -extern void _mesa_disable_extension(GLcontext *ctx, const char *name); +extern void _mesa_disable_extension(struct gl_context *ctx, const char *name); -extern GLboolean _mesa_extension_is_enabled(GLcontext *ctx, const char *name); +extern GLboolean _mesa_extension_is_enabled(struct gl_context *ctx, const char *name); -extern void _mesa_init_extensions(GLcontext *ctx); +extern void _mesa_init_extensions(struct gl_context *ctx); -extern GLubyte *_mesa_make_extension_string(GLcontext *ctx); +extern GLubyte *_mesa_make_extension_string(struct gl_context *ctx); extern GLuint -_mesa_get_extension_count(GLcontext *ctx); +_mesa_get_extension_count(struct gl_context *ctx); extern const GLubyte * -_mesa_get_enabled_extension(GLcontext *ctx, GLuint index); +_mesa_get_enabled_extension(struct gl_context *ctx, GLuint index); #else diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index f28846c4c99..3dc78f2bf53 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -95,7 +95,7 @@ delete_dummy_framebuffer(struct gl_framebuffer *fb) void -_mesa_init_fbobjects(GLcontext *ctx) +_mesa_init_fbobjects(struct gl_context *ctx) { _glthread_INIT_MUTEX(DummyFramebuffer.Mutex); _glthread_INIT_MUTEX(DummyRenderbuffer.Mutex); @@ -115,7 +115,7 @@ _mesa_get_incomplete_framebuffer(void) * Helper routine for getting a gl_renderbuffer. */ struct gl_renderbuffer * -_mesa_lookup_renderbuffer(GLcontext *ctx, GLuint id) +_mesa_lookup_renderbuffer(struct gl_context *ctx, GLuint id) { struct gl_renderbuffer *rb; @@ -132,7 +132,7 @@ _mesa_lookup_renderbuffer(GLcontext *ctx, GLuint id) * Helper routine for getting a gl_framebuffer. */ struct gl_framebuffer * -_mesa_lookup_framebuffer(GLcontext *ctx, GLuint id) +_mesa_lookup_framebuffer(struct gl_context *ctx, GLuint id) { struct gl_framebuffer *fb; @@ -166,7 +166,7 @@ invalidate_framebuffer(struct gl_framebuffer *fb) * the depth buffer attachment point. */ struct gl_renderbuffer_attachment * -_mesa_get_attachment(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb, GLenum attachment) { GLuint i; @@ -216,7 +216,7 @@ _mesa_get_attachment(GLcontext *ctx, struct gl_framebuffer *fb, * window-system framebuffer (not user-created framebuffer objects). */ static struct gl_renderbuffer_attachment * -_mesa_get_fb0_attachment(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_get_fb0_attachment(struct gl_context *ctx, struct gl_framebuffer *fb, GLenum attachment) { assert(fb->Name == 0); @@ -255,7 +255,7 @@ _mesa_get_fb0_attachment(GLcontext *ctx, struct gl_framebuffer *fb, * point. Update reference counts, etc. */ void -_mesa_remove_attachment(GLcontext *ctx, struct gl_renderbuffer_attachment *att) +_mesa_remove_attachment(struct gl_context *ctx, struct gl_renderbuffer_attachment *att) { if (att->Type == GL_TEXTURE) { ASSERT(att->Texture); @@ -281,7 +281,7 @@ _mesa_remove_attachment(GLcontext *ctx, struct gl_renderbuffer_attachment *att) * The previous binding, if any, will be removed first. */ void -_mesa_set_texture_attachment(GLcontext *ctx, +_mesa_set_texture_attachment(struct gl_context *ctx, struct gl_framebuffer *fb, struct gl_renderbuffer_attachment *att, struct gl_texture_object *texObj, @@ -322,7 +322,7 @@ _mesa_set_texture_attachment(GLcontext *ctx, * The previous binding, if any, will be removed first. */ void -_mesa_set_renderbuffer_attachment(GLcontext *ctx, +_mesa_set_renderbuffer_attachment(struct gl_context *ctx, struct gl_renderbuffer_attachment *att, struct gl_renderbuffer *rb) { @@ -340,7 +340,7 @@ _mesa_set_renderbuffer_attachment(GLcontext *ctx, * Attach a renderbuffer object to a framebuffer object. */ void -_mesa_framebuffer_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_framebuffer_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLenum attachment, struct gl_renderbuffer *rb) { struct gl_renderbuffer_attachment *att; @@ -406,7 +406,7 @@ fbo_incomplete(const char *msg, int index) * if GL_STENCIL, this is a stencil component attachment point. */ static void -test_attachment_completeness(const GLcontext *ctx, GLenum format, +test_attachment_completeness(const struct gl_context *ctx, GLenum format, struct gl_renderbuffer_attachment *att) { assert(format == GL_COLOR || format == GL_DEPTH || format == GL_STENCIL); @@ -563,7 +563,7 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format, * framebuffer is complete. */ void -_mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb) +_mesa_test_framebuffer_completeness(struct gl_context *ctx, struct gl_framebuffer *fb) { GLuint numImages; GLenum intFormat = GL_NONE; /* color buffers' internal format */ @@ -833,7 +833,7 @@ _mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer) * The spec calls for unbinding. */ static void -detach_renderbuffer(GLcontext *ctx, +detach_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, struct gl_renderbuffer *rb) { @@ -934,7 +934,7 @@ _mesa_GenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers) * we'll also return GL_RED and GL_RG. */ GLenum -_mesa_base_fbo_format(GLcontext *ctx, GLenum internalFormat) +_mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat) { switch (internalFormat) { case GL_ALPHA: @@ -1287,7 +1287,7 @@ _mesa_IsFramebufferEXT(GLuint framebuffer) * attachments. */ static void -check_begin_texture_render(GLcontext *ctx, struct gl_framebuffer *fb) +check_begin_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb) { GLuint i; ASSERT(ctx->Driver.RenderTexture); @@ -1312,7 +1312,7 @@ check_begin_texture_render(GLcontext *ctx, struct gl_framebuffer *fb) * notify the device driver that the texture image may have changed. */ static void -check_end_texture_render(GLcontext *ctx, struct gl_framebuffer *fb) +check_end_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb) { if (fb->Name == 0) return; /* can't render to texture with winsys framebuffers */ @@ -1606,7 +1606,7 @@ _mesa_CheckFramebufferStatusEXT(GLenum target) * Common code called by glFramebufferTexture1D/2D/3DEXT(). */ static void -framebuffer_texture(GLcontext *ctx, const char *caller, GLenum target, +framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) { diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 9850ee9aa23..9e18e538a6f 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -29,47 +29,47 @@ #include "mtypes.h" extern void -_mesa_init_fbobjects(GLcontext *ctx); +_mesa_init_fbobjects(struct gl_context *ctx); extern struct gl_framebuffer * _mesa_get_incomplete_framebuffer(void); extern struct gl_renderbuffer * -_mesa_lookup_renderbuffer(GLcontext *ctx, GLuint id); +_mesa_lookup_renderbuffer(struct gl_context *ctx, GLuint id); extern struct gl_framebuffer * -_mesa_lookup_framebuffer(GLcontext *ctx, GLuint id); +_mesa_lookup_framebuffer(struct gl_context *ctx, GLuint id); extern struct gl_renderbuffer_attachment * -_mesa_get_attachment(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb, GLenum attachment); extern void -_mesa_remove_attachment(GLcontext *ctx, +_mesa_remove_attachment(struct gl_context *ctx, struct gl_renderbuffer_attachment *att); extern void -_mesa_set_texture_attachment(GLcontext *ctx, +_mesa_set_texture_attachment(struct gl_context *ctx, struct gl_framebuffer *fb, struct gl_renderbuffer_attachment *att, struct gl_texture_object *texObj, GLenum texTarget, GLuint level, GLuint zoffset); extern void -_mesa_set_renderbuffer_attachment(GLcontext *ctx, +_mesa_set_renderbuffer_attachment(struct gl_context *ctx, struct gl_renderbuffer_attachment *att, struct gl_renderbuffer *rb); extern void -_mesa_framebuffer_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_framebuffer_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLenum attachment, struct gl_renderbuffer *rb); extern void -_mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb); +_mesa_test_framebuffer_completeness(struct gl_context *ctx, struct gl_framebuffer *fb); extern GLenum -_mesa_base_fbo_format(GLcontext *ctx, GLenum internalFormat); +_mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat); extern GLboolean GLAPIENTRY _mesa_IsRenderbufferEXT(GLuint renderbuffer); diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c index c72b91280ed..ffdecaecc29 100644 --- a/src/mesa/main/feedback.c +++ b/src/mesa/main/feedback.c @@ -116,7 +116,7 @@ _mesa_PassThrough( GLfloat token ) * Put a vertex into the feedback buffer. */ void -_mesa_feedback_vertex(GLcontext *ctx, +_mesa_feedback_vertex(struct gl_context *ctx, const GLfloat win[4], const GLfloat color[4], const GLfloat texcoord[4]) @@ -159,7 +159,7 @@ _mesa_feedback_vertex(GLcontext *ctx, * \note this function can't be put in a display list. * * Verifies we're not in selection mode, flushes the vertices and initialize - * the fields in __GLcontextRec::Select with the given buffer. + * the fields in __struct gl_contextRec::Select with the given buffer. */ static void GLAPIENTRY _mesa_SelectBuffer( GLsizei size, GLuint *buffer ) @@ -192,7 +192,7 @@ _mesa_SelectBuffer( GLsizei size, GLuint *buffer ) * increments the pointer. */ static INLINE void -write_record(GLcontext *ctx, GLuint value) +write_record(struct gl_context *ctx, GLuint value) { if (ctx->Select.BufferCount < ctx->Select.BufferSize) { ctx->Select.Buffer[ctx->Select.BufferCount] = value; @@ -211,7 +211,7 @@ write_record(GLcontext *ctx, GLuint value) * gl_selection::HitMaxZ. */ void -_mesa_update_hitflag(GLcontext *ctx, GLfloat z) +_mesa_update_hitflag(struct gl_context *ctx, GLfloat z) { ctx->Select.HitFlag = GL_TRUE; if (z < ctx->Select.HitMinZ) { @@ -235,7 +235,7 @@ _mesa_update_hitflag(GLcontext *ctx, GLfloat z) * \sa gl_selection. */ static void -write_hit_record(GLcontext *ctx) +write_hit_record(struct gl_context *ctx) { GLuint i; GLuint zmin, zmax, zscale = (~0u); @@ -266,7 +266,7 @@ write_hit_record(GLcontext *ctx) * * Verifies we are in select mode and resets the name stack depth and resets * the hit record data in gl_selection. Marks new render mode in - * __GLcontextRec::NewState. + * __struct gl_contextRec::NewState. */ static void GLAPIENTRY _mesa_InitNames( void ) @@ -297,7 +297,7 @@ _mesa_InitNames( void ) * Flushes vertices. If there is a hit flag writes it (via write_hit_record()), * and replace the top-most name in the stack. * - * sa __GLcontextRec::Select. + * sa __struct gl_contextRec::Select. */ static void GLAPIENTRY _mesa_LoadName( GLuint name ) @@ -336,7 +336,7 @@ _mesa_LoadName( GLuint name ) * Flushes vertices. If there is a hit flag writes it (via write_hit_record()), * and adds the name to the top of the name stack. * - * sa __GLcontextRec::Select. + * sa __struct gl_contextRec::Select. */ static void GLAPIENTRY _mesa_PushName( GLuint name ) @@ -367,7 +367,7 @@ _mesa_PushName( GLuint name ) * Flushes vertices. If there is a hit flag writes it (via write_hit_record()), * and removes top-most name in the name stack. * - * sa __GLcontextRec::Select. + * sa __struct gl_contextRec::Select. */ static void GLAPIENTRY _mesa_PopName( void ) @@ -409,7 +409,7 @@ _mesa_PopName( void ) * Flushes the vertices and do the necessary cleanup according to the previous * rasterization mode, such as writing the hit record or resent the select * buffer index when exiting the select mode. Updates - * __GLcontextRec::RenderMode and notifies the driver via the + * __struct gl_contextRec::RenderMode and notifies the driver via the * dd_function_table::RenderMode callback. */ static GLint GLAPIENTRY @@ -519,7 +519,7 @@ _mesa_init_feedback_dispatch(struct _glapi_table *disp) /** * Initialize context feedback data. */ -void _mesa_init_feedback( GLcontext * ctx ) +void _mesa_init_feedback( struct gl_context * ctx ) { /* Feedback */ ctx->Feedback.Type = GL_2D; /* TODO: verify */ diff --git a/src/mesa/main/feedback.h b/src/mesa/main/feedback.h index c6354b97bcd..f9fbbce70b9 100644 --- a/src/mesa/main/feedback.h +++ b/src/mesa/main/feedback.h @@ -33,14 +33,14 @@ #if FEATURE_feedback extern void -_mesa_feedback_vertex( GLcontext *ctx, +_mesa_feedback_vertex( struct gl_context *ctx, const GLfloat win[4], const GLfloat color[4], const GLfloat texcoord[4] ); static INLINE void -_mesa_feedback_token( GLcontext *ctx, GLfloat token ) +_mesa_feedback_token( struct gl_context *ctx, GLfloat token ) { if (ctx->Feedback.Count < ctx->Feedback.BufferSize) { ctx->Feedback.Buffer[ctx->Feedback.Count] = token; @@ -50,7 +50,7 @@ _mesa_feedback_token( GLcontext *ctx, GLfloat token ) extern void -_mesa_update_hitflag( GLcontext *ctx, GLfloat z ); +_mesa_update_hitflag( struct gl_context *ctx, GLfloat z ); extern void @@ -61,7 +61,7 @@ _mesa_init_feedback_dispatch(struct _glapi_table *disp); #include "main/compiler.h" static INLINE void -_mesa_feedback_vertex( GLcontext *ctx, +_mesa_feedback_vertex( struct gl_context *ctx, const GLfloat win[4], const GLfloat color[4], const GLfloat texcoord[4] ) @@ -72,14 +72,14 @@ _mesa_feedback_vertex( GLcontext *ctx, static INLINE void -_mesa_feedback_token( GLcontext *ctx, GLfloat token ) +_mesa_feedback_token( struct gl_context *ctx, GLfloat token ) { /* render mode is always GL_RENDER */ ASSERT_NO_FEATURE(); } static INLINE void -_mesa_update_hitflag( GLcontext *ctx, GLfloat z ) +_mesa_update_hitflag( struct gl_context *ctx, GLfloat z ) { /* render mode is always GL_RENDER */ ASSERT_NO_FEATURE(); @@ -93,6 +93,6 @@ _mesa_init_feedback_dispatch(struct _glapi_table *disp) #endif /* FEATURE_feedback */ extern void -_mesa_init_feedback( GLcontext *ctx ); +_mesa_init_feedback( struct gl_context *ctx ); #endif /* FEEDBACK_H */ diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index 92fec09bad0..0f2c313c819 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -109,7 +109,7 @@ static GLuint translate_texgen( GLboolean enabled, GLenum mode ) -static GLboolean check_active_shininess( GLcontext *ctx, +static GLboolean check_active_shininess( struct gl_context *ctx, const struct state_key *key, GLuint side ) { @@ -129,7 +129,7 @@ static GLboolean check_active_shininess( GLcontext *ctx, } -static void make_state_key( GLcontext *ctx, struct state_key *key ) +static void make_state_key( struct gl_context *ctx, struct state_key *key ) { const struct gl_fragment_program *fp; GLuint i; @@ -1638,7 +1638,7 @@ create_new_program( const struct state_key *key, * XXX move this into core mesa (main/) */ struct gl_vertex_program * -_mesa_get_fixed_func_vertex_program(GLcontext *ctx) +_mesa_get_fixed_func_vertex_program(struct gl_context *ctx) { struct gl_vertex_program *prog; struct state_key key; diff --git a/src/mesa/main/ffvertex_prog.h b/src/mesa/main/ffvertex_prog.h index 38dc5fbb8d3..72cd6ea115d 100644 --- a/src/mesa/main/ffvertex_prog.h +++ b/src/mesa/main/ffvertex_prog.h @@ -33,7 +33,7 @@ #include "main/mtypes.h" struct gl_vertex_program * -_mesa_get_fixed_func_vertex_program(GLcontext *ctx); +_mesa_get_fixed_func_vertex_program(struct gl_context *ctx); diff --git a/src/mesa/main/fog.c b/src/mesa/main/fog.c index 9f26c012d66..fd64bd1fd89 100644 --- a/src/mesa/main/fog.c +++ b/src/mesa/main/fog.c @@ -178,7 +178,7 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) /***** Initialization *****/ /**********************************************************************/ -void _mesa_init_fog( GLcontext * ctx ) +void _mesa_init_fog( struct gl_context * ctx ) { /* Fog group */ ctx->Fog.Enabled = GL_FALSE; diff --git a/src/mesa/main/fog.h b/src/mesa/main/fog.h index a14d19cdb39..7df4f0b6735 100644 --- a/src/mesa/main/fog.h +++ b/src/mesa/main/fog.h @@ -54,7 +54,7 @@ _mesa_Fogfv(GLenum pname, const GLfloat *params ); extern void GLAPIENTRY _mesa_Fogiv(GLenum pname, const GLint *params ); -extern void _mesa_init_fog( GLcontext * ctx ); +extern void _mesa_init_fog( struct gl_context * ctx ); #else diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index 0e9e6def9b6..af3b5dfcf9b 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -102,7 +102,7 @@ _mesa_create_framebuffer(const struct gl_config *visual) * \sa _mesa_create_framebuffer */ struct gl_framebuffer * -_mesa_new_framebuffer(GLcontext *ctx, GLuint name) +_mesa_new_framebuffer(struct gl_context *ctx, GLuint name) { struct gl_framebuffer *fb; (void) ctx; @@ -281,7 +281,7 @@ _mesa_reference_framebuffer(struct gl_framebuffer **ptr, * without a currently bound rendering context. */ void -_mesa_resize_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_resize_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint width, GLuint height) { GLuint i; @@ -359,7 +359,7 @@ _mesa_resize_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb, * from device drivers (as was done in the past). */ void -_mesa_resizebuffers( GLcontext *ctx ) +_mesa_resizebuffers( struct gl_context *ctx ) { ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx ); @@ -429,7 +429,7 @@ _mesa_ResizeBuffersMESA( void ) * window-system framebuffes. */ static void -update_framebuffer_size(GLcontext *ctx, struct gl_framebuffer *fb) +update_framebuffer_size(struct gl_context *ctx, struct gl_framebuffer *fb) { GLuint minWidth = ~0, minHeight = ~0; GLuint i; @@ -464,7 +464,7 @@ update_framebuffer_size(GLcontext *ctx, struct gl_framebuffer *fb) * \param ctx the GL context. */ void -_mesa_update_draw_buffer_bounds(GLcontext *ctx) +_mesa_update_draw_buffer_bounds(struct gl_context *ctx) { struct gl_framebuffer *buffer = ctx->DrawBuffer; @@ -600,7 +600,7 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb) * \param attIndex indicates the renderbuffer to possibly wrap */ void -_mesa_update_depth_buffer(GLcontext *ctx, +_mesa_update_depth_buffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint attIndex) { @@ -641,7 +641,7 @@ _mesa_update_depth_buffer(GLcontext *ctx, * \param attIndex indicates the renderbuffer to possibly wrap */ void -_mesa_update_stencil_buffer(GLcontext *ctx, +_mesa_update_stencil_buffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint attIndex) { @@ -722,7 +722,7 @@ _mesa_update_stencil_buffer(GLcontext *ctx, * writing colors. */ static void -update_color_draw_buffers(GLcontext *ctx, struct gl_framebuffer *fb) +update_color_draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb) { GLuint output; @@ -746,7 +746,7 @@ update_color_draw_buffers(GLcontext *ctx, struct gl_framebuffer *fb) * Unlike the DrawBuffer, we can only read from one (or zero) color buffers. */ static void -update_color_read_buffer(GLcontext *ctx, struct gl_framebuffer *fb) +update_color_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb) { (void) ctx; if (fb->_ColorReadBufferIndex == -1 || @@ -781,7 +781,7 @@ update_color_read_buffer(GLcontext *ctx, struct gl_framebuffer *fb) * glRenderbufferStorageEXT. */ static void -update_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb) +update_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) { if (fb->Name == 0) { /* This is a window-system framebuffer */ @@ -823,7 +823,7 @@ update_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb) * Update state related to the current draw/read framebuffers. */ void -_mesa_update_framebuffer(GLcontext *ctx) +_mesa_update_framebuffer(struct gl_context *ctx) { struct gl_framebuffer *drawFb; struct gl_framebuffer *readFb; @@ -846,7 +846,7 @@ _mesa_update_framebuffer(GLcontext *ctx) * \return GL_TRUE if buffer exists, GL_FALSE otherwise */ GLboolean -_mesa_source_buffer_exists(GLcontext *ctx, GLenum format) +_mesa_source_buffer_exists(struct gl_context *ctx, GLenum format) { const struct gl_renderbuffer_attachment *att = ctx->ReadBuffer->Attachment; @@ -922,7 +922,7 @@ _mesa_source_buffer_exists(GLcontext *ctx, GLenum format) * XXX could do some code merging w/ above function. */ GLboolean -_mesa_dest_buffer_exists(GLcontext *ctx, GLenum format) +_mesa_dest_buffer_exists(struct gl_context *ctx, GLenum format) { const struct gl_renderbuffer_attachment *att = ctx->DrawBuffer->Attachment; @@ -993,7 +993,7 @@ _mesa_dest_buffer_exists(GLcontext *ctx, GLenum format) * Used to answer the GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES query. */ GLenum -_mesa_get_color_read_format(GLcontext *ctx) +_mesa_get_color_read_format(struct gl_context *ctx) { switch (ctx->ReadBuffer->_ColorReadBuffer->Format) { case MESA_FORMAT_ARGB8888: @@ -1010,7 +1010,7 @@ _mesa_get_color_read_format(GLcontext *ctx) * Used to answer the GL_IMPLEMENTATION_COLOR_READ_TYPE_OES query. */ GLenum -_mesa_get_color_read_type(GLcontext *ctx) +_mesa_get_color_read_type(struct gl_context *ctx) { switch (ctx->ReadBuffer->_ColorReadBuffer->Format) { case MESA_FORMAT_ARGB8888: diff --git a/src/mesa/main/framebuffer.h b/src/mesa/main/framebuffer.h index 0cf28424cf9..13722ea457a 100644 --- a/src/mesa/main/framebuffer.h +++ b/src/mesa/main/framebuffer.h @@ -32,7 +32,7 @@ extern struct gl_framebuffer * _mesa_create_framebuffer(const struct gl_config *visual); extern struct gl_framebuffer * -_mesa_new_framebuffer(GLcontext *ctx, GLuint name); +_mesa_new_framebuffer(struct gl_context *ctx, GLuint name); extern void _mesa_initialize_window_framebuffer(struct gl_framebuffer *fb, @@ -52,45 +52,45 @@ _mesa_reference_framebuffer(struct gl_framebuffer **ptr, struct gl_framebuffer *fb); extern void -_mesa_resize_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_resize_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint width, GLuint height); extern void -_mesa_resizebuffers( GLcontext *ctx ); +_mesa_resizebuffers( struct gl_context *ctx ); extern void GLAPIENTRY _mesa_ResizeBuffersMESA( void ); extern void -_mesa_update_draw_buffer_bounds(GLcontext *ctx); +_mesa_update_draw_buffer_bounds(struct gl_context *ctx); extern void _mesa_update_framebuffer_visual(struct gl_framebuffer *fb); extern void -_mesa_update_depth_buffer(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_update_depth_buffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint attIndex); extern void -_mesa_update_stencil_buffer(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_update_stencil_buffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint attIndex); extern void -_mesa_update_framebuffer(GLcontext *ctx); +_mesa_update_framebuffer(struct gl_context *ctx); extern GLboolean -_mesa_source_buffer_exists(GLcontext *ctx, GLenum format); +_mesa_source_buffer_exists(struct gl_context *ctx, GLenum format); extern GLboolean -_mesa_dest_buffer_exists(GLcontext *ctx, GLenum format); +_mesa_dest_buffer_exists(struct gl_context *ctx, GLenum format); extern GLenum -_mesa_get_color_read_type(GLcontext *ctx); +_mesa_get_color_read_type(struct gl_context *ctx); extern GLenum -_mesa_get_color_read_format(GLcontext *ctx); +_mesa_get_color_read_format(struct gl_context *ctx); extern void _mesa_print_framebuffer(const struct gl_framebuffer *fb); diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index cb456fb64d8..8224c15627c 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -36,17 +36,17 @@ /* This is a table driven implemetation of the glGet*v() functions. * The basic idea is that most getters just look up an int somewhere - * in GLcontext and then convert it to a bool or float according to + * in struct gl_context and then convert it to a bool or float according to * which of glGetIntegerv() glGetBooleanv() etc is being called. * Instead of generating code to do this, we can just record the enum - * value and the offset into GLcontext in an array of structs. Then + * value and the offset into struct gl_context in an array of structs. Then * in glGet*(), we lookup the struct for the enum in question, and use * the offset to get the int we need. * * Sometimes we need to look up a float, a boolean, a bit in a * bitfield, a matrix or other types instead, so we need to track the - * type of the value in GLcontext. And sometimes the value isn't in - * GLcontext but in the drawbuffer, the array object, current texture + * type of the value in struct gl_context. And sometimes the value isn't in + * struct gl_context but in the drawbuffer, the array object, current texture * unit, or maybe it's a computed value. So we need to also track * where or how to find the value. Finally, we sometimes need to * check that one of a number of extensions are enabled, the GL @@ -165,7 +165,7 @@ union value { #define BUFFER_FIELD(field, type) \ LOC_BUFFER, type, offsetof(struct gl_framebuffer, field) #define CONTEXT_FIELD(field, type) \ - LOC_CONTEXT, type, offsetof(GLcontext, field) + LOC_CONTEXT, type, offsetof(struct gl_context, field) #define ARRAY_FIELD(field, type) \ LOC_ARRAY, type, offsetof(struct gl_array_object, field) #define CONST(value) \ @@ -371,7 +371,7 @@ static const struct value_desc values[] = { { GL_MAX_ELEMENTS_VERTICES, CONTEXT_INT(Const.MaxArrayLockSize), NO_EXTRA }, { GL_MAX_ELEMENTS_INDICES, CONTEXT_INT(Const.MaxArrayLockSize), NO_EXTRA }, { GL_MAX_TEXTURE_SIZE, LOC_CUSTOM, TYPE_INT, - offsetof(GLcontext, Const.MaxTextureLevels), NO_EXTRA }, + offsetof(struct gl_context, Const.MaxTextureLevels), NO_EXTRA }, { GL_MAX_VIEWPORT_DIMS, CONTEXT_INT2(Const.MaxViewportWidth), NO_EXTRA }, { GL_PACK_ALIGNMENT, CONTEXT_INT(Pack.Alignment), NO_EXTRA }, { GL_ALIASED_POINT_SIZE_RANGE, CONTEXT_FLOAT2(Const.MinPointSize), NO_EXTRA }, @@ -410,7 +410,7 @@ static const struct value_desc values[] = { { GL_TEXTURE_BINDING_CUBE_MAP_ARB, LOC_CUSTOM, TYPE_INT, TEXTURE_CUBE_INDEX, extra_ARB_texture_cube_map }, { GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB, LOC_CUSTOM, TYPE_INT, - offsetof(GLcontext, Const.MaxCubeTextureLevels), + offsetof(struct gl_context, Const.MaxCubeTextureLevels), extra_ARB_texture_cube_map }, /* XXX: OES_texture_cube_map */ /* XXX: OES_blend_subtract */ @@ -522,7 +522,7 @@ static const struct value_desc values[] = { { GL_MAX_TEXTURE_STACK_DEPTH, CONST(MAX_TEXTURE_STACK_DEPTH), NO_EXTRA }, { GL_MODELVIEW_MATRIX, CONTEXT_MATRIX(ModelviewMatrixStack.Top), NO_EXTRA }, { GL_MODELVIEW_STACK_DEPTH, LOC_CUSTOM, TYPE_INT, - offsetof(GLcontext, ModelviewMatrixStack.Depth), NO_EXTRA }, + offsetof(struct gl_context, ModelviewMatrixStack.Depth), NO_EXTRA }, { GL_NORMALIZE, CONTEXT_BOOL(Transform.Normalize), NO_EXTRA }, { GL_PACK_SKIP_IMAGES_EXT, CONTEXT_INT(Pack.SkipImages), NO_EXTRA }, { GL_PERSPECTIVE_CORRECTION_HINT, CONTEXT_ENUM(Hint.PerspectiveCorrection), NO_EXTRA }, @@ -535,7 +535,7 @@ static const struct value_desc values[] = { { GL_POINT_FADE_THRESHOLD_SIZE_EXT, CONTEXT_FLOAT(Point.Threshold), NO_EXTRA }, { GL_PROJECTION_MATRIX, CONTEXT_MATRIX(ProjectionMatrixStack.Top), NO_EXTRA }, { GL_PROJECTION_STACK_DEPTH, LOC_CUSTOM, TYPE_INT, - offsetof(GLcontext, ProjectionMatrixStack.Depth), NO_EXTRA }, + offsetof(struct gl_context, ProjectionMatrixStack.Depth), NO_EXTRA }, { GL_RESCALE_NORMAL, CONTEXT_BOOL(Transform.RescaleNormals), NO_EXTRA }, { GL_SHADE_MODEL, CONTEXT_ENUM(Light.ShadeModel), NO_EXTRA }, { GL_TEXTURE_2D, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA }, @@ -672,7 +672,7 @@ static const struct value_desc values[] = { /* OES_texture_3D */ { GL_TEXTURE_BINDING_3D, LOC_CUSTOM, TYPE_INT, TEXTURE_3D_INDEX, NO_EXTRA }, { GL_MAX_3D_TEXTURE_SIZE, LOC_CUSTOM, TYPE_INT, - offsetof(GLcontext, Const.Max3DTextureLevels), NO_EXTRA }, + offsetof(struct gl_context, Const.Max3DTextureLevels), NO_EXTRA }, /* GL_ARB_fragment_program/OES_standard_derivatives */ { GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB, @@ -683,11 +683,11 @@ static const struct value_desc values[] = { /* Enums unique to OpenGL ES 2.0 */ { 0, 0, TYPE_API_MASK, API_OPENGLES2_BIT, NO_EXTRA }, { GL_MAX_FRAGMENT_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, - offsetof(GLcontext, Const.FragmentProgram.MaxUniformComponents), NO_EXTRA }, + offsetof(struct gl_context, Const.FragmentProgram.MaxUniformComponents), NO_EXTRA }, { GL_MAX_VARYING_VECTORS, LOC_CUSTOM, TYPE_INT, - offsetof(GLcontext, Const.MaxVarying), NO_EXTRA }, + offsetof(struct gl_context, Const.MaxVarying), NO_EXTRA }, { GL_MAX_VERTEX_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, - offsetof(GLcontext, Const.VertexProgram.MaxUniformComponents), NO_EXTRA }, + offsetof(struct gl_context, Const.VertexProgram.MaxUniformComponents), NO_EXTRA }, { GL_SHADER_COMPILER, CONST(1), NO_EXTRA }, /* OES_get_program_binary */ { GL_NUM_SHADER_BINARY_FORMATS, CONST(0), NO_EXTRA }, @@ -1256,7 +1256,7 @@ print_table_stats(void) * * \param the current context, for determining the API in question */ -void _mesa_init_get_hash(GLcontext *ctx) +void _mesa_init_get_hash(struct gl_context *ctx) { int i, hash, index, mask; int api_mask = 0, api_bit; @@ -1305,7 +1305,7 @@ void _mesa_init_get_hash(GLcontext *ctx) * \param v pointer to the tmp declared in the calling glGet*v() function */ static void -find_custom_value(GLcontext *ctx, const struct value_desc *d, union value *v) +find_custom_value(struct gl_context *ctx, const struct value_desc *d, union value *v) { struct gl_buffer_object *buffer_obj; struct gl_client_array *array; @@ -1583,7 +1583,7 @@ find_custom_value(GLcontext *ctx, const struct value_desc *d, union value *v) * otherwise GL_TRUE. */ static GLboolean -check_extra(GLcontext *ctx, const char *func, const struct value_desc *d) +check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d) { const GLuint version = ctx->VersionMajor * 10 + ctx->VersionMinor; int total, enabled; diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index 3910047fb5d..bfa283f6a30 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -35,7 +35,7 @@ * Return the string for a glGetString(GL_SHADING_LANGUAGE_VERSION) query. */ static const GLubyte * -shading_language_version(GLcontext *ctx) +shading_language_version(struct gl_context *ctx) { switch (ctx->API) { case API_OPENGL: @@ -233,7 +233,7 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params ) * Returns the current GL error code, or GL_NO_ERROR. * \return current error code * - * Returns __GLcontextRec::ErrorValue. + * Returns __struct gl_contextRec::ErrorValue. */ GLenum GLAPIENTRY _mesa_GetError( void ) diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c index b624e6ecac1..72d924dcc38 100644 --- a/src/mesa/main/hash.c +++ b/src/mesa/main/hash.c @@ -277,7 +277,7 @@ _mesa_HashRemove(struct _mesa_HashTable *table, GLuint key) * \param table the hash table to delete * \param callback the callback function * \param userData arbitrary pointer to pass along to the callback - * (this is typically a GLcontext pointer) + * (this is typically a struct gl_context pointer) */ void _mesa_HashDeleteAll(struct _mesa_HashTable *table, @@ -313,7 +313,7 @@ _mesa_HashDeleteAll(struct _mesa_HashTable *table, * \param table the hash table to walk * \param callback the callback function * \param userData arbitrary pointer to pass along to the callback - * (this is typically a GLcontext pointer) + * (this is typically a struct gl_context pointer) */ void _mesa_HashWalk(const struct _mesa_HashTable *table, diff --git a/src/mesa/main/hint.c b/src/mesa/main/hint.c index 8902ae37763..878f10d4a43 100644 --- a/src/mesa/main/hint.c +++ b/src/mesa/main/hint.c @@ -130,7 +130,7 @@ _mesa_Hint( GLenum target, GLenum mode ) /***** Initialization *****/ /**********************************************************************/ -void _mesa_init_hint( GLcontext * ctx ) +void _mesa_init_hint( struct gl_context * ctx ) { /* Hint group */ ctx->Hint.PerspectiveCorrection = GL_DONT_CARE; diff --git a/src/mesa/main/hint.h b/src/mesa/main/hint.h index bfc3887107d..66e78ad6557 100644 --- a/src/mesa/main/hint.h +++ b/src/mesa/main/hint.h @@ -45,7 +45,7 @@ extern void GLAPIENTRY _mesa_Hint( GLenum target, GLenum mode ); extern void -_mesa_init_hint( GLcontext * ctx ); +_mesa_init_hint( struct gl_context * ctx ); #else diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index f83fcc725d8..2c3af332c0c 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -399,7 +399,7 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type ) * otherwise. */ GLboolean -_mesa_is_legal_format_and_type( GLcontext *ctx, GLenum format, GLenum type ) +_mesa_is_legal_format_and_type( struct gl_context *ctx, GLenum format, GLenum type ) { switch (format) { case GL_COLOR_INDEX: @@ -869,7 +869,7 @@ _mesa_is_integer_format(GLenum format) * \return GL_TRUE if compressed, GL_FALSE if uncompressed */ GLboolean -_mesa_is_compressed_format(GLcontext *ctx, GLenum format) +_mesa_is_compressed_format(struct gl_context *ctx, GLenum format) { switch (format) { case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: @@ -1541,7 +1541,7 @@ _mesa_scale_and_bias_rgba(GLuint n, GLfloat rgba[][4], * Apply pixel mapping to an array of floating point RGBA pixels. */ void -_mesa_map_rgba( const GLcontext *ctx, GLuint n, GLfloat rgba[][4] ) +_mesa_map_rgba( const struct gl_context *ctx, GLuint n, GLfloat rgba[][4] ) { const GLfloat rscale = (GLfloat) (ctx->PixelMaps.RtoR.Size - 1); const GLfloat gscale = (GLfloat) (ctx->PixelMaps.GtoG.Size - 1); @@ -1829,7 +1829,7 @@ _mesa_lookup_rgba_ubyte(const struct gl_color_table *table, * Map color indexes to float rgba values. */ void -_mesa_map_ci_to_rgba( const GLcontext *ctx, GLuint n, +_mesa_map_ci_to_rgba( const struct gl_context *ctx, GLuint n, const GLuint index[], GLfloat rgba[][4] ) { GLuint rmask = ctx->PixelMaps.ItoR.Size - 1; @@ -1854,7 +1854,7 @@ _mesa_map_ci_to_rgba( const GLcontext *ctx, GLuint n, * Map ubyte color indexes to ubyte/RGBA values. */ void -_mesa_map_ci8_to_rgba8(const GLcontext *ctx, GLuint n, const GLubyte index[], +_mesa_map_ci8_to_rgba8(const struct gl_context *ctx, GLuint n, const GLubyte index[], GLubyte rgba[][4]) { GLuint rmask = ctx->PixelMaps.ItoR.Size - 1; @@ -1876,7 +1876,7 @@ _mesa_map_ci8_to_rgba8(const GLcontext *ctx, GLuint n, const GLubyte index[], void -_mesa_scale_and_bias_depth(const GLcontext *ctx, GLuint n, +_mesa_scale_and_bias_depth(const struct gl_context *ctx, GLuint n, GLfloat depthValues[]) { const GLfloat scale = ctx->Pixel.DepthScale; @@ -1890,7 +1890,7 @@ _mesa_scale_and_bias_depth(const GLcontext *ctx, GLuint n, void -_mesa_scale_and_bias_depth_uint(const GLcontext *ctx, GLuint n, +_mesa_scale_and_bias_depth_uint(const struct gl_context *ctx, GLuint n, GLuint depthValues[]) { const GLdouble max = (double) 0xffffffff; @@ -1909,7 +1909,7 @@ _mesa_scale_and_bias_depth_uint(const GLcontext *ctx, GLuint n, * as indicated by the transferOps bitmask */ void -_mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLbitfield transferOps, +_mesa_apply_rgba_transfer_ops(struct gl_context *ctx, GLbitfield transferOps, GLuint n, GLfloat rgba[][4]) { /* scale & bias */ @@ -1942,7 +1942,7 @@ _mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLbitfield transferOps, * Apply color index shift and offset to an array of pixels. */ static void -shift_and_offset_ci( const GLcontext *ctx, GLuint n, GLuint indexes[] ) +shift_and_offset_ci( const struct gl_context *ctx, GLuint n, GLuint indexes[] ) { GLint shift = ctx->Pixel.IndexShift; GLint offset = ctx->Pixel.IndexOffset; @@ -1972,7 +1972,7 @@ shift_and_offset_ci( const GLcontext *ctx, GLuint n, GLuint indexes[] ) * of color indexes; */ void -_mesa_apply_ci_transfer_ops(const GLcontext *ctx, GLbitfield transferOps, +_mesa_apply_ci_transfer_ops(const struct gl_context *ctx, GLbitfield transferOps, GLuint n, GLuint indexes[]) { if (transferOps & IMAGE_SHIFT_OFFSET_BIT) { @@ -1994,7 +1994,7 @@ _mesa_apply_ci_transfer_ops(const GLcontext *ctx, GLbitfield transferOps, * of stencil values. */ void -_mesa_apply_stencil_transfer_ops(const GLcontext *ctx, GLuint n, +_mesa_apply_stencil_transfer_ops(const struct gl_context *ctx, GLuint n, GLstencil stencil[]) { if (ctx->Pixel.IndexShift != 0 || ctx->Pixel.IndexOffset != 0) { @@ -2035,7 +2035,7 @@ _mesa_apply_stencil_transfer_ops(const GLcontext *ctx, GLuint n, * transfer ops are enabled. */ void -_mesa_pack_rgba_span_float(GLcontext *ctx, GLuint n, GLfloat rgba[][4], +_mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4], GLenum dstFormat, GLenum dstType, GLvoid *dstAddr, const struct gl_pixelstore_attrib *dstPacking, @@ -3912,7 +3912,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4], * XXX perhaps expand this to process whole images someday. */ void -_mesa_unpack_color_span_chan( GLcontext *ctx, +_mesa_unpack_color_span_chan( struct gl_context *ctx, GLuint n, GLenum dstFormat, GLchan dest[], GLenum srcFormat, GLenum srcType, const GLvoid *source, @@ -4262,7 +4262,7 @@ _mesa_unpack_color_span_chan( GLcontext *ctx, * instead of GLchan. */ void -_mesa_unpack_color_span_float( GLcontext *ctx, +_mesa_unpack_color_span_float( struct gl_context *ctx, GLuint n, GLenum dstFormat, GLfloat dest[], GLenum srcFormat, GLenum srcType, const GLvoid *source, @@ -4498,7 +4498,7 @@ _mesa_unpack_color_span_float( GLcontext *ctx, * directly return GLbyte data, no transfer ops apply. */ void -_mesa_unpack_dudv_span_byte( GLcontext *ctx, +_mesa_unpack_dudv_span_byte( struct gl_context *ctx, GLuint n, GLenum dstFormat, GLbyte dest[], GLenum srcFormat, GLenum srcType, const GLvoid *source, @@ -4565,7 +4565,7 @@ _mesa_unpack_dudv_span_byte( GLcontext *ctx, * transferOps - the pixel transfer operations to apply */ void -_mesa_unpack_index_span( const GLcontext *ctx, GLuint n, +_mesa_unpack_index_span( const struct gl_context *ctx, GLuint n, GLenum dstType, GLvoid *dest, GLenum srcType, const GLvoid *source, const struct gl_pixelstore_attrib *srcPacking, @@ -4643,7 +4643,7 @@ _mesa_unpack_index_span( const GLcontext *ctx, GLuint n, void -_mesa_pack_index_span( const GLcontext *ctx, GLuint n, +_mesa_pack_index_span( const struct gl_context *ctx, GLuint n, GLenum dstType, GLvoid *dest, const GLuint *source, const struct gl_pixelstore_attrib *dstPacking, GLbitfield transferOps ) @@ -4773,7 +4773,7 @@ _mesa_pack_index_span( const GLcontext *ctx, GLuint n, * transferOps - apply offset/bias/lookup ops? */ void -_mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n, +_mesa_unpack_stencil_span( const struct gl_context *ctx, GLuint n, GLenum dstType, GLvoid *dest, GLenum srcType, const GLvoid *source, const struct gl_pixelstore_attrib *srcPacking, @@ -4868,7 +4868,7 @@ _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n, void -_mesa_pack_stencil_span( const GLcontext *ctx, GLuint n, +_mesa_pack_stencil_span( const struct gl_context *ctx, GLuint n, GLenum dstType, GLvoid *dest, const GLstencil *source, const struct gl_pixelstore_attrib *dstPacking ) { @@ -5043,7 +5043,7 @@ _mesa_pack_stencil_span( const GLcontext *ctx, GLuint n, * (ignored for GLfloat). */ void -_mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, +_mesa_unpack_depth_span( const struct gl_context *ctx, GLuint n, GLenum dstType, GLvoid *dest, GLuint depthMax, GLenum srcType, const GLvoid *source, const struct gl_pixelstore_attrib *srcPacking ) @@ -5242,7 +5242,7 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, * Pack an array of depth values. The values are floats in [0,1]. */ void -_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest, +_mesa_pack_depth_span( const struct gl_context *ctx, GLuint n, GLvoid *dest, GLenum dstType, const GLfloat *depthSpan, const struct gl_pixelstore_attrib *dstPacking ) { @@ -5358,7 +5358,7 @@ _mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest, * Pack depth and stencil values as GL_DEPTH_STENCIL/GL_UNSIGNED_INT_24_8. */ void -_mesa_pack_depth_stencil_span(const GLcontext *ctx, GLuint n, GLuint *dest, +_mesa_pack_depth_stencil_span(const struct gl_context *ctx, GLuint n, GLuint *dest, const GLfloat *depthVals, const GLstencil *stencilVals, const struct gl_pixelstore_attrib *dstPacking) @@ -5673,7 +5673,7 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, * GL_FALSE if image was completely clipped away (draw nothing) */ GLboolean -_mesa_clip_drawpixels(const GLcontext *ctx, +_mesa_clip_drawpixels(const struct gl_context *ctx, GLint *destX, GLint *destY, GLsizei *width, GLsizei *height, struct gl_pixelstore_attrib *unpack) @@ -5744,7 +5744,7 @@ _mesa_clip_drawpixels(const GLcontext *ctx, * GL_FALSE if image was completely clipped away (draw nothing) */ GLboolean -_mesa_clip_readpixels(const GLcontext *ctx, +_mesa_clip_readpixels(const struct gl_context *ctx, GLint *srcX, GLint *srcY, GLsizei *width, GLsizei *height, struct gl_pixelstore_attrib *pack) @@ -5794,7 +5794,7 @@ _mesa_clip_readpixels(const GLcontext *ctx, * \return GL_FALSE if region is totally clipped, GL_TRUE otherwise. */ GLboolean -_mesa_clip_copytexsubimage(const GLcontext *ctx, +_mesa_clip_copytexsubimage(const struct gl_context *ctx, GLint *destX, GLint *destY, GLint *srcX, GLint *srcY, GLsizei *width, GLsizei *height) @@ -5937,7 +5937,7 @@ clip_left_or_bottom(GLint *srcX0, GLint *srcX1, * \return GL_TRUE if anything is left to draw, GL_FALSE if totally clipped */ GLboolean -_mesa_clip_blit(GLcontext *ctx, +_mesa_clip_blit(struct gl_context *ctx, GLint *srcX0, GLint *srcY0, GLint *srcX1, GLint *srcY1, GLint *dstX0, GLint *dstY0, GLint *dstX1, GLint *dstY1) { diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h index 672dbf2823e..ed5ffa368c5 100644 --- a/src/mesa/main/image.h +++ b/src/mesa/main/image.h @@ -52,7 +52,7 @@ extern GLint _mesa_bytes_per_pixel( GLenum format, GLenum type ); extern GLboolean -_mesa_is_legal_format_and_type( GLcontext *ctx, GLenum format, GLenum type ); +_mesa_is_legal_format_and_type( struct gl_context *ctx, GLenum format, GLenum type ); extern GLboolean _mesa_is_color_format(GLenum format); @@ -82,7 +82,7 @@ extern GLboolean _mesa_is_integer_format(GLenum format); extern GLboolean -_mesa_is_compressed_format(GLcontext *ctx, GLenum format); +_mesa_is_compressed_format(struct gl_context *ctx, GLenum format); extern GLvoid * _mesa_image_address( GLuint dimensions, @@ -161,7 +161,7 @@ _mesa_scale_and_bias_rgba(GLuint n, GLfloat rgba[][4], GLfloat bBias, GLfloat aBias); extern void -_mesa_map_rgba(const GLcontext *ctx, GLuint n, GLfloat rgba[][4]); +_mesa_map_rgba(const struct gl_context *ctx, GLuint n, GLfloat rgba[][4]); extern void _mesa_lookup_rgba_float(const struct gl_color_table *table, @@ -173,47 +173,47 @@ _mesa_lookup_rgba_ubyte(const struct gl_color_table *table, extern void -_mesa_map_ci_to_rgba(const GLcontext *ctx, +_mesa_map_ci_to_rgba(const struct gl_context *ctx, GLuint n, const GLuint index[], GLfloat rgba[][4]); extern void -_mesa_map_ci8_to_rgba8(const GLcontext *ctx, GLuint n, const GLubyte index[], +_mesa_map_ci8_to_rgba8(const struct gl_context *ctx, GLuint n, const GLubyte index[], GLubyte rgba[][4]); extern void -_mesa_scale_and_bias_depth(const GLcontext *ctx, GLuint n, +_mesa_scale_and_bias_depth(const struct gl_context *ctx, GLuint n, GLfloat depthValues[]); extern void -_mesa_scale_and_bias_depth_uint(const GLcontext *ctx, GLuint n, +_mesa_scale_and_bias_depth_uint(const struct gl_context *ctx, GLuint n, GLuint depthValues[]); extern void -_mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLbitfield transferOps, +_mesa_apply_rgba_transfer_ops(struct gl_context *ctx, GLbitfield transferOps, GLuint n, GLfloat rgba[][4]); extern void -_mesa_apply_ci_transfer_ops(const GLcontext *ctx, GLbitfield transferOps, +_mesa_apply_ci_transfer_ops(const struct gl_context *ctx, GLbitfield transferOps, GLuint n, GLuint indexes[]); extern void -_mesa_apply_stencil_transfer_ops(const GLcontext *ctx, GLuint n, +_mesa_apply_stencil_transfer_ops(const struct gl_context *ctx, GLuint n, GLstencil stencil[]); extern void -_mesa_pack_rgba_span_float( GLcontext *ctx, GLuint n, GLfloat rgba[][4], +_mesa_pack_rgba_span_float( struct gl_context *ctx, GLuint n, GLfloat rgba[][4], GLenum dstFormat, GLenum dstType, GLvoid *dstAddr, const struct gl_pixelstore_attrib *dstPacking, GLbitfield transferOps ); extern void -_mesa_unpack_color_span_chan( GLcontext *ctx, +_mesa_unpack_color_span_chan( struct gl_context *ctx, GLuint n, GLenum dstFormat, GLchan dest[], GLenum srcFormat, GLenum srcType, const GLvoid *source, @@ -222,7 +222,7 @@ _mesa_unpack_color_span_chan( GLcontext *ctx, extern void -_mesa_unpack_color_span_float( GLcontext *ctx, +_mesa_unpack_color_span_float( struct gl_context *ctx, GLuint n, GLenum dstFormat, GLfloat dest[], GLenum srcFormat, GLenum srcType, const GLvoid *source, @@ -230,7 +230,7 @@ _mesa_unpack_color_span_float( GLcontext *ctx, GLbitfield transferOps ); extern void -_mesa_unpack_dudv_span_byte( GLcontext *ctx, +_mesa_unpack_dudv_span_byte( struct gl_context *ctx, GLuint n, GLenum dstFormat, GLbyte dest[], GLenum srcFormat, GLenum srcType, const GLvoid *source, @@ -238,7 +238,7 @@ _mesa_unpack_dudv_span_byte( GLcontext *ctx, GLbitfield transferOps ); extern void -_mesa_unpack_index_span( const GLcontext *ctx, GLuint n, +_mesa_unpack_index_span( const struct gl_context *ctx, GLuint n, GLenum dstType, GLvoid *dest, GLenum srcType, const GLvoid *source, const struct gl_pixelstore_attrib *srcPacking, @@ -246,39 +246,39 @@ _mesa_unpack_index_span( const GLcontext *ctx, GLuint n, extern void -_mesa_pack_index_span( const GLcontext *ctx, GLuint n, +_mesa_pack_index_span( const struct gl_context *ctx, GLuint n, GLenum dstType, GLvoid *dest, const GLuint *source, const struct gl_pixelstore_attrib *dstPacking, GLbitfield transferOps ); extern void -_mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n, +_mesa_unpack_stencil_span( const struct gl_context *ctx, GLuint n, GLenum dstType, GLvoid *dest, GLenum srcType, const GLvoid *source, const struct gl_pixelstore_attrib *srcPacking, GLbitfield transferOps ); extern void -_mesa_pack_stencil_span( const GLcontext *ctx, GLuint n, +_mesa_pack_stencil_span( const struct gl_context *ctx, GLuint n, GLenum dstType, GLvoid *dest, const GLstencil *source, const struct gl_pixelstore_attrib *dstPacking ); extern void -_mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, +_mesa_unpack_depth_span( const struct gl_context *ctx, GLuint n, GLenum dstType, GLvoid *dest, GLuint depthMax, GLenum srcType, const GLvoid *source, const struct gl_pixelstore_attrib *srcPacking ); extern void -_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest, +_mesa_pack_depth_span( const struct gl_context *ctx, GLuint n, GLvoid *dest, GLenum dstType, const GLfloat *depthSpan, const struct gl_pixelstore_attrib *dstPacking ); extern void -_mesa_pack_depth_stencil_span(const GLcontext *ctx, GLuint n, GLuint *dest, +_mesa_pack_depth_stencil_span(const struct gl_context *ctx, GLuint n, GLuint *dest, const GLfloat *depthVals, const GLstencil *stencilVals, const struct gl_pixelstore_attrib *dstPacking); @@ -298,20 +298,20 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, extern GLboolean -_mesa_clip_drawpixels(const GLcontext *ctx, +_mesa_clip_drawpixels(const struct gl_context *ctx, GLint *destX, GLint *destY, GLsizei *width, GLsizei *height, struct gl_pixelstore_attrib *unpack); extern GLboolean -_mesa_clip_readpixels(const GLcontext *ctx, +_mesa_clip_readpixels(const struct gl_context *ctx, GLint *srcX, GLint *srcY, GLsizei *width, GLsizei *height, struct gl_pixelstore_attrib *pack); extern GLboolean -_mesa_clip_copytexsubimage(const GLcontext *ctx, +_mesa_clip_copytexsubimage(const struct gl_context *ctx, GLint *destX, GLint *destY, GLint *srcX, GLint *srcY, GLsizei *width, GLsizei *height); @@ -323,7 +323,7 @@ _mesa_clip_to_region(GLint xmin, GLint ymin, GLsizei *width, GLsizei *height ); extern GLboolean -_mesa_clip_blit(GLcontext *ctx, +_mesa_clip_blit(struct gl_context *ctx, GLint *srcX0, GLint *srcY0, GLint *srcX1, GLint *srcY1, GLint *dstX0, GLint *dstY0, GLint *dstX1, GLint *dstY1); diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 46e5c932d0f..bcca4edc1aa 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -882,7 +882,7 @@ error_string( GLenum error ) * previous errors which were accumulated. */ static void -flush_delayed_errors( GLcontext *ctx ) +flush_delayed_errors( struct gl_context *ctx ) { char s[MAXSTRING]; @@ -906,7 +906,7 @@ flush_delayed_errors( GLcontext *ctx ) * \param fmtString printf()-like format string. */ void -_mesa_warning( GLcontext *ctx, const char *fmtString, ... ) +_mesa_warning( struct gl_context *ctx, const char *fmtString, ... ) { char str[MAXSTRING]; va_list args; @@ -929,7 +929,7 @@ _mesa_warning( GLcontext *ctx, const char *fmtString, ... ) * \param fmtString problem description string. */ void -_mesa_problem( const GLcontext *ctx, const char *fmtString, ... ) +_mesa_problem( const struct gl_context *ctx, const char *fmtString, ... ) { va_list args; char str[MAXSTRING]; @@ -957,7 +957,7 @@ _mesa_problem( const GLcontext *ctx, const char *fmtString, ... ) * \param fmtString printf() style format string, followed by optional args */ void -_mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... ) +_mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... ) { static GLint debug = -1; @@ -1014,7 +1014,7 @@ _mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... ) * \param fmtString printf()-style format string, followed by optional args. */ void -_mesa_debug( const GLcontext *ctx, const char *fmtString, ... ) +_mesa_debug( const struct gl_context *ctx, const char *fmtString, ... ) { #ifdef DEBUG char s[MAXSTRING]; diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index a56e0af9b5c..30fc152389d 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -568,19 +568,19 @@ _mesa_str_checksum(const char *str); extern int _mesa_snprintf( char *str, size_t size, const char *fmt, ... ) PRINTFLIKE(3, 4); -struct __GLcontextRec; +struct gl_context; extern void -_mesa_warning( struct __GLcontextRec *gc, const char *fmtString, ... ) PRINTFLIKE(2, 3); +_mesa_warning( struct gl_context *gc, const char *fmtString, ... ) PRINTFLIKE(2, 3); extern void -_mesa_problem( const struct __GLcontextRec *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3); +_mesa_problem( const struct gl_context *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3); extern void -_mesa_error( struct __GLcontextRec *ctx, GLenum error, const char *fmtString, ... ) PRINTFLIKE(3, 4); +_mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... ) PRINTFLIKE(3, 4); extern void -_mesa_debug( const struct __GLcontextRec *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3); +_mesa_debug( const struct gl_context *ctx, const char *fmtString, ... ) PRINTFLIKE(2, 3); #if defined(_MSC_VER) && !defined(snprintf) diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index 43ae28c25ab..c27cf1dd38b 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -103,7 +103,7 @@ _mesa_ProvokingVertexEXT(GLenum mode) * Also, all error checking should have already been done. */ void -_mesa_light(GLcontext *ctx, GLuint lnum, GLenum pname, const GLfloat *params) +_mesa_light(struct gl_context *ctx, GLuint lnum, GLenum pname, const GLfloat *params) { struct gl_light *light; @@ -569,7 +569,7 @@ _mesa_LightModelf( GLenum pname, GLfloat param ) * of the targeted material values. */ GLuint -_mesa_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname, +_mesa_material_bitmask( struct gl_context *ctx, GLenum face, GLenum pname, GLuint legal, const char *where ) { GLuint bitmask = 0; @@ -643,7 +643,7 @@ _mesa_copy_materials( struct gl_material *dst, /* Update derived values following a change in ctx->Light.Material */ void -_mesa_update_material( GLcontext *ctx, GLuint bitmask ) +_mesa_update_material( struct gl_context *ctx, GLuint bitmask ) { struct gl_light *light, *list = &ctx->Light.EnabledList; GLfloat (*mat)[4] = ctx->Light.Material.Attrib; @@ -728,7 +728,7 @@ _mesa_update_material( GLcontext *ctx, GLuint bitmask ) * set by glColorMaterial(). */ void -_mesa_update_color_material( GLcontext *ctx, const GLfloat color[4] ) +_mesa_update_color_material( struct gl_context *ctx, const GLfloat color[4] ) { GLuint bitmask = ctx->Light.ColorMaterialBitmask; struct gl_material *mat = &ctx->Light.Material; @@ -972,7 +972,7 @@ validate_spot_exp_table( struct gl_light *l ) * by keeping a MRU cache of shine tables for various shine values. */ void -_mesa_invalidate_shine_table( GLcontext *ctx, GLuint side ) +_mesa_invalidate_shine_table( struct gl_context *ctx, GLuint side ) { ASSERT(side < 2); if (ctx->_ShineTable[side]) @@ -982,7 +982,7 @@ _mesa_invalidate_shine_table( GLcontext *ctx, GLuint side ) static void -validate_shine_table( GLcontext *ctx, GLuint side, GLfloat shininess ) +validate_shine_table( struct gl_context *ctx, GLuint side, GLfloat shininess ) { struct gl_shine_tab *list = ctx->_ShineTabList; struct gl_shine_tab *s; @@ -1034,7 +1034,7 @@ validate_shine_table( GLcontext *ctx, GLuint side, GLfloat shininess ) void -_mesa_validate_all_lighting_tables( GLcontext *ctx ) +_mesa_validate_all_lighting_tables( struct gl_context *ctx ) { GLuint i; GLfloat shininess; @@ -1060,7 +1060,7 @@ _mesa_validate_all_lighting_tables( GLcontext *ctx ) * source and material ambient, diffuse and specular coefficients. */ void -_mesa_update_lighting( GLcontext *ctx ) +_mesa_update_lighting( struct gl_context *ctx ) { struct gl_light *light; ctx->Light._NeedEyeCoords = GL_FALSE; @@ -1123,7 +1123,7 @@ _mesa_update_lighting( GLcontext *ctx ) * Also update on lighting space changes. */ static void -compute_light_positions( GLcontext *ctx ) +compute_light_positions( struct gl_context *ctx ) { struct gl_light *light; static const GLfloat eye_z[3] = { 0, 0, 1 }; @@ -1210,7 +1210,7 @@ compute_light_positions( GLcontext *ctx ) static void -update_modelview_scale( GLcontext *ctx ) +update_modelview_scale( struct gl_context *ctx ) { ctx->_ModelViewInvScale = 1.0F; if (!_math_matrix_is_length_preserving(ctx->ModelviewMatrixStack.Top)) { @@ -1229,7 +1229,7 @@ update_modelview_scale( GLcontext *ctx ) * Bring up to date any state that relies on _NeedEyeCoords. */ void -_mesa_update_tnl_spaces( GLcontext *ctx, GLuint new_state ) +_mesa_update_tnl_spaces( struct gl_context *ctx, GLuint new_state ) { const GLuint oldneedeyecoords = ctx->_NeedEyeCoords; @@ -1278,7 +1278,7 @@ _mesa_update_tnl_spaces( GLcontext *ctx, GLuint new_state ) * light-in-modelspace optimization. It's also useful for debugging. */ void -_mesa_allow_light_in_model( GLcontext *ctx, GLboolean flag ) +_mesa_allow_light_in_model( struct gl_context *ctx, GLboolean flag ) { ctx->_ForceEyeCoords = !flag; ctx->NewState |= _NEW_POINT; /* one of the bits from @@ -1370,7 +1370,7 @@ init_material( struct gl_material *m ) * Initialize all lighting state for the given context. */ void -_mesa_init_lighting( GLcontext *ctx ) +_mesa_init_lighting( struct gl_context *ctx ) { GLuint i; @@ -1418,7 +1418,7 @@ _mesa_init_lighting( GLcontext *ctx ) * Deallocate malloc'd lighting state attached to given context. */ void -_mesa_free_lighting_data( GLcontext *ctx ) +_mesa_free_lighting_data( struct gl_context *ctx ) { struct gl_shine_tab *s, *tmps; diff --git a/src/mesa/main/light.h b/src/mesa/main/light.h index b3436114d40..021f5ea1939 100644 --- a/src/mesa/main/light.h +++ b/src/mesa/main/light.h @@ -79,7 +79,7 @@ _mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params ); extern void -_mesa_light(GLcontext *ctx, GLuint lnum, GLenum pname, const GLfloat *params); +_mesa_light(struct gl_context *ctx, GLuint lnum, GLenum pname, const GLfloat *params); /* Lerp between adjacent values in the f(x) lookup table, giving a @@ -100,36 +100,36 @@ do { \ } while (0) -extern GLuint _mesa_material_bitmask( GLcontext *ctx, +extern GLuint _mesa_material_bitmask( struct gl_context *ctx, GLenum face, GLenum pname, GLuint legal, const char * ); extern void _mesa_invalidate_spot_exp_table( struct gl_light *l ); -extern void _mesa_invalidate_shine_table( GLcontext *ctx, GLuint i ); +extern void _mesa_invalidate_shine_table( struct gl_context *ctx, GLuint i ); -extern void _mesa_validate_all_lighting_tables( GLcontext *ctx ); +extern void _mesa_validate_all_lighting_tables( struct gl_context *ctx ); -extern void _mesa_update_lighting( GLcontext *ctx ); +extern void _mesa_update_lighting( struct gl_context *ctx ); -extern void _mesa_update_tnl_spaces( GLcontext *ctx, GLuint new_state ); +extern void _mesa_update_tnl_spaces( struct gl_context *ctx, GLuint new_state ); -extern void _mesa_update_material( GLcontext *ctx, +extern void _mesa_update_material( struct gl_context *ctx, GLuint bitmask ); extern void _mesa_copy_materials( struct gl_material *dst, const struct gl_material *src, GLuint bitmask ); -extern void _mesa_update_color_material( GLcontext *ctx, +extern void _mesa_update_color_material( struct gl_context *ctx, const GLfloat rgba[4] ); -extern void _mesa_init_lighting( GLcontext *ctx ); +extern void _mesa_init_lighting( struct gl_context *ctx ); -extern void _mesa_free_lighting_data( GLcontext *ctx ); +extern void _mesa_free_lighting_data( struct gl_context *ctx ); -extern void _mesa_allow_light_in_model( GLcontext *ctx, GLboolean flag ); +extern void _mesa_allow_light_in_model( struct gl_context *ctx, GLboolean flag ); #else #define _mesa_update_color_material( c, r ) ((void)0) diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c index cc63a759ec0..505f840ba5a 100644 --- a/src/mesa/main/lines.c +++ b/src/mesa/main/lines.c @@ -102,11 +102,11 @@ _mesa_LineStipple( GLint factor, GLushort pattern ) * * \param ctx GL context. * - * Initializes __GLcontextRec::Line and line related constants in - * __GLcontextRec::Const. + * Initializes __struct gl_contextRec::Line and line related constants in + * __struct gl_contextRec::Const. */ void GLAPIENTRY -_mesa_init_line( GLcontext * ctx ) +_mesa_init_line( struct gl_context * ctx ) { ctx->Line.SmoothFlag = GL_FALSE; ctx->Line.StippleFlag = GL_FALSE; diff --git a/src/mesa/main/lines.h b/src/mesa/main/lines.h index 5a47e9858d5..3accdd78004 100644 --- a/src/mesa/main/lines.h +++ b/src/mesa/main/lines.h @@ -43,6 +43,6 @@ extern void GLAPIENTRY _mesa_LineStipple( GLint factor, GLushort pattern ); extern void GLAPIENTRY -_mesa_init_line( GLcontext * ctx ); +_mesa_init_line( struct gl_context * ctx ); #endif diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c index 8ed718cd38e..105d4a327fb 100644 --- a/src/mesa/main/matrix.c +++ b/src/mesa/main/matrix.c @@ -59,7 +59,7 @@ * * Flushes vertices and validates parameters. Calls _math_matrix_frustum() with * the top matrix of the current matrix stack and sets - * __GLcontextRec::NewState. + * __struct gl_contextRec::NewState. */ void GLAPIENTRY _mesa_Frustum( GLdouble left, GLdouble right, @@ -101,7 +101,7 @@ _mesa_Frustum( GLdouble left, GLdouble right, * * Flushes vertices and validates parameters. Calls _math_matrix_ortho() with * the top matrix of the current matrix stack and sets - * __GLcontextRec::NewState. + * __struct gl_contextRec::NewState. */ void GLAPIENTRY _mesa_Ortho( GLdouble left, GLdouble right, @@ -139,7 +139,7 @@ _mesa_Ortho( GLdouble left, GLdouble right, * \sa glMatrixMode(). * * Flushes the vertices, validates the parameter and updates - * __GLcontextRec::CurrentStack and gl_transform_attrib::MatrixMode with the + * __struct gl_contextRec::CurrentStack and gl_transform_attrib::MatrixMode with the * specified matrix stack. */ void GLAPIENTRY @@ -231,7 +231,7 @@ _mesa_MatrixMode( GLenum mode ) * \sa glPushMatrix(). * * Verifies the current matrix stack is not full, and duplicates the top-most - * matrix in the stack. Marks __GLcontextRec::NewState with the stack dirty + * matrix in the stack. Marks __struct gl_contextRec::NewState with the stack dirty * flag. */ void GLAPIENTRY @@ -271,7 +271,7 @@ _mesa_PushMatrix( void ) * \sa glPopMatrix(). * * Flushes the vertices, verifies the current matrix stack is not empty, and - * moves the stack head down. Marks __GLcontextRec::NewState with the dirty + * moves the stack head down. Marks __struct gl_contextRec::NewState with the dirty * stack flag. */ void GLAPIENTRY @@ -309,7 +309,7 @@ _mesa_PopMatrix( void ) * \sa glLoadIdentity(). * * Flushes the vertices and calls _math_matrix_set_identity() with the top-most - * matrix in the current stack. Marks __GLcontextRec::NewState with the stack + * matrix in the current stack. Marks __struct gl_contextRec::NewState with the stack * dirty flag. */ void GLAPIENTRY @@ -334,7 +334,7 @@ _mesa_LoadIdentity( void ) * \sa glLoadMatrixf(). * * Flushes the vertices and calls _math_matrix_loadf() with the top-most matrix - * in the current stack and the given matrix. Marks __GLcontextRec::NewState + * in the current stack and the given matrix. Marks __struct gl_contextRec::NewState * with the dirty stack flag. */ void GLAPIENTRY @@ -365,7 +365,7 @@ _mesa_LoadMatrixf( const GLfloat *m ) * * Flushes the vertices and calls _math_matrix_mul_floats() with the top-most * matrix in the current stack and the given matrix. Marks - * __GLcontextRec::NewState with the dirty stack flag. + * __struct gl_contextRec::NewState with the dirty stack flag. */ void GLAPIENTRY _mesa_MultMatrixf( const GLfloat *m ) @@ -397,7 +397,7 @@ _mesa_MultMatrixf( const GLfloat *m ) * * Flushes the vertices and calls _math_matrix_rotate() with the top-most * matrix in the current stack and the given parameters. Marks - * __GLcontextRec::NewState with the dirty stack flag. + * __struct gl_contextRec::NewState with the dirty stack flag. */ void GLAPIENTRY _mesa_Rotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) @@ -422,7 +422,7 @@ _mesa_Rotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z ) * * Flushes the vertices and calls _math_matrix_scale() with the top-most * matrix in the current stack and the given parameters. Marks - * __GLcontextRec::NewState with the dirty stack flag. + * __struct gl_contextRec::NewState with the dirty stack flag. */ void GLAPIENTRY _mesa_Scalef( GLfloat x, GLfloat y, GLfloat z ) @@ -445,7 +445,7 @@ _mesa_Scalef( GLfloat x, GLfloat y, GLfloat z ) * * Flushes the vertices and calls _math_matrix_translate() with the top-most * matrix in the current stack and the given parameters. Marks - * __GLcontextRec::NewState with the dirty stack flag. + * __struct gl_contextRec::NewState with the dirty stack flag. */ void GLAPIENTRY _mesa_Translatef( GLfloat x, GLfloat y, GLfloat z ) @@ -559,13 +559,13 @@ _mesa_MultTransposeMatrixdARB( const GLdouble *m ) * Calls _math_matrix_analyse() with the top-matrix of the projection matrix * stack, and recomputes user clip positions if necessary. * - * \note This routine references __GLcontextRec::Tranform attribute values to + * \note This routine references __struct gl_contextRec::Tranform attribute values to * compute userclip positions in clip space, but is only called on * _NEW_PROJECTION. The _mesa_ClipPlane() function keeps these values up to - * date across changes to the __GLcontextRec::Transform attributes. + * date across changes to the __struct gl_contextRec::Transform attributes. */ static void -update_projection( GLcontext *ctx ) +update_projection( struct gl_context *ctx ) { _math_matrix_analyse( ctx->ProjectionMatrixStack.Top ); @@ -593,11 +593,11 @@ update_projection( GLcontext *ctx ) * \param ctx GL context. * * Multiplies the top matrices of the projection and model view stacks into - * __GLcontextRec::_ModelProjectMatrix via _math_matrix_mul_matrix() and + * __struct gl_contextRec::_ModelProjectMatrix via _math_matrix_mul_matrix() and * analyzes the resulting matrix via _math_matrix_analyse(). */ static void -calculate_model_project_matrix( GLcontext *ctx ) +calculate_model_project_matrix( struct gl_context *ctx ) { _math_matrix_mul_matrix( &ctx->_ModelProjectMatrix, ctx->ProjectionMatrixStack.Top, @@ -618,7 +618,7 @@ calculate_model_project_matrix( GLcontext *ctx ) * calculate_model_project_matrix() to recalculate the modelview-projection * matrix. */ -void _mesa_update_modelview_project( GLcontext *ctx, GLuint new_state ) +void _mesa_update_modelview_project( struct gl_context *ctx, GLuint new_state ) { if (new_state & _NEW_MODELVIEW) { _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); @@ -712,7 +712,7 @@ free_matrix_stack( struct gl_matrix_stack *stack ) * Initializes each of the matrix stacks and the combined modelview-projection * matrix. */ -void _mesa_init_matrix( GLcontext * ctx ) +void _mesa_init_matrix( struct gl_context * ctx ) { GLint i; @@ -742,7 +742,7 @@ void _mesa_init_matrix( GLcontext * ctx ) * Frees each of the matrix stacks and the combined modelview-projection * matrix. */ -void _mesa_free_matrix_data( GLcontext *ctx ) +void _mesa_free_matrix_data( struct gl_context *ctx ) { GLint i; @@ -765,7 +765,7 @@ void _mesa_free_matrix_data( GLcontext *ctx ) * * \todo Move this to a new file with other 'transform' routines. */ -void _mesa_init_transform( GLcontext *ctx ) +void _mesa_init_transform( struct gl_context *ctx ) { GLint i; diff --git a/src/mesa/main/matrix.h b/src/mesa/main/matrix.h index a53d1045c7d..38fd235b117 100644 --- a/src/mesa/main/matrix.h +++ b/src/mesa/main/matrix.h @@ -97,16 +97,16 @@ _mesa_MultTransposeMatrixdARB( const GLdouble *m ); extern void -_mesa_init_matrix( GLcontext * ctx ); +_mesa_init_matrix( struct gl_context * ctx ); extern void -_mesa_init_transform( GLcontext *ctx ); +_mesa_init_transform( struct gl_context *ctx ); extern void -_mesa_free_matrix_data( GLcontext *ctx ); +_mesa_free_matrix_data( struct gl_context *ctx ); extern void -_mesa_update_modelview_project( GLcontext *ctx, GLuint newstate ); +_mesa_update_modelview_project( struct gl_context *ctx, GLuint newstate ); #endif diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 3d1a4c49c49..d65aecdf3e5 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -1504,7 +1504,7 @@ next_mipmap_level_size(GLenum target, GLint border, * GL_TEXTURE_CUBE_MAP_POSITIVE/NEGATIVE_X/Y/Z; never GL_TEXTURE_CUBE_MAP. */ void -_mesa_generate_mipmap(GLcontext *ctx, GLenum target, +_mesa_generate_mipmap(struct gl_context *ctx, GLenum target, struct gl_texture_object *texObj) { const struct gl_texture_image *srcImage; diff --git a/src/mesa/main/mipmap.h b/src/mesa/main/mipmap.h index 22094c34372..4c7ee635aee 100644 --- a/src/mesa/main/mipmap.h +++ b/src/mesa/main/mipmap.h @@ -42,7 +42,7 @@ _mesa_generate_mipmap_level(GLenum target, extern void -_mesa_generate_mipmap(GLcontext *ctx, GLenum target, +_mesa_generate_mipmap(struct gl_context *ctx, GLenum target, struct gl_texture_object *texObj); diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 806a19d02a6..aace09d6efc 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -123,8 +123,8 @@ struct gl_program_cache; struct gl_texture_format; struct gl_texture_image; struct gl_texture_object; +struct gl_context; struct st_context; -typedef struct __GLcontextRec GLcontext; /*@}*/ @@ -2324,38 +2324,38 @@ struct gl_renderbuffer void (*Delete)(struct gl_renderbuffer *rb); /* Allocate new storage for this renderbuffer */ - GLboolean (*AllocStorage)(GLcontext *ctx, struct gl_renderbuffer *rb, + GLboolean (*AllocStorage)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLenum internalFormat, GLuint width, GLuint height); /* Lock/Unlock are called before/after calling the Get/Put functions. * Not sure this is the right place for these yet. - void (*Lock)(GLcontext *ctx, struct gl_renderbuffer *rb); - void (*Unlock)(GLcontext *ctx, struct gl_renderbuffer *rb); + void (*Lock)(struct gl_context *ctx, struct gl_renderbuffer *rb); + void (*Unlock)(struct gl_context *ctx, struct gl_renderbuffer *rb); */ /* Return a pointer to the element/pixel at (x,y). * Should return NULL if the buffer memory can't be directly addressed. */ - void *(*GetPointer)(GLcontext *ctx, struct gl_renderbuffer *rb, + void *(*GetPointer)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLint x, GLint y); /* Get/Read a row of values. * The values will be of format _BaseFormat and type DataType. */ - void (*GetRow)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, + void (*GetRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, void *values); /* Get/Read values at arbitrary locations. * The values will be of format _BaseFormat and type DataType. */ - void (*GetValues)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, + void (*GetValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], void *values); /* Put/Write a row of values. * The values will be of format _BaseFormat and type DataType. */ - void (*PutRow)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, + void (*PutRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask); /* Put/Write a row of RGB values. This is a special-case routine that's @@ -2363,26 +2363,26 @@ struct gl_renderbuffer * a common case for glDrawPixels and some triangle routines. * The values will be of format GL_RGB and type DataType. */ - void (*PutRowRGB)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, + void (*PutRowRGB)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask); /* Put/Write a row of identical values. * The values will be of format _BaseFormat and type DataType. */ - void (*PutMonoRow)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, + void (*PutMonoRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask); /* Put/Write values at arbitrary locations. * The values will be of format _BaseFormat and type DataType. */ - void (*PutValues)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, + void (*PutValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *values, const GLubyte *mask); /* Put/Write identical values at arbitrary locations. * The values will be of format _BaseFormat and type DataType. */ - void (*PutMonoValues)(GLcontext *ctx, struct gl_renderbuffer *rb, + void (*PutMonoValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask); }; @@ -2787,7 +2787,7 @@ struct gl_matrix_stack /** * \name Bits for image transfer operations - * \sa __GLcontextRec::ImageTransferState. + * \sa __struct gl_contextRec::ImageTransferState. */ /*@{*/ #define IMAGE_SCALE_BIAS_BIT 0x1 @@ -2807,34 +2807,34 @@ struct gl_matrix_stack * 4 unused flags. */ /*@{*/ -#define _NEW_MODELVIEW 0x1 /**< __GLcontextRec::ModelView */ -#define _NEW_PROJECTION 0x2 /**< __GLcontextRec::Projection */ -#define _NEW_TEXTURE_MATRIX 0x4 /**< __GLcontextRec::TextureMatrix */ -#define _NEW_ACCUM 0x10 /**< __GLcontextRec::Accum */ -#define _NEW_COLOR 0x20 /**< __GLcontextRec::Color */ -#define _NEW_DEPTH 0x40 /**< __GLcontextRec::Depth */ -#define _NEW_EVAL 0x80 /**< __GLcontextRec::Eval, __GLcontextRec::EvalMap */ -#define _NEW_FOG 0x100 /**< __GLcontextRec::Fog */ -#define _NEW_HINT 0x200 /**< __GLcontextRec::Hint */ -#define _NEW_LIGHT 0x400 /**< __GLcontextRec::Light */ -#define _NEW_LINE 0x800 /**< __GLcontextRec::Line */ -#define _NEW_PIXEL 0x1000 /**< __GLcontextRec::Pixel */ -#define _NEW_POINT 0x2000 /**< __GLcontextRec::Point */ -#define _NEW_POLYGON 0x4000 /**< __GLcontextRec::Polygon */ -#define _NEW_POLYGONSTIPPLE 0x8000 /**< __GLcontextRec::PolygonStipple */ -#define _NEW_SCISSOR 0x10000 /**< __GLcontextRec::Scissor */ -#define _NEW_STENCIL 0x20000 /**< __GLcontextRec::Stencil */ -#define _NEW_TEXTURE 0x40000 /**< __GLcontextRec::Texture */ -#define _NEW_TRANSFORM 0x80000 /**< __GLcontextRec::Transform */ -#define _NEW_VIEWPORT 0x100000 /**< __GLcontextRec::Viewport */ -#define _NEW_PACKUNPACK 0x200000 /**< __GLcontextRec::Pack, __GLcontextRec::Unpack */ -#define _NEW_ARRAY 0x400000 /**< __GLcontextRec::Array */ -#define _NEW_RENDERMODE 0x800000 /**< __GLcontextRec::RenderMode, __GLcontextRec::Feedback, __GLcontextRec::Select */ -#define _NEW_BUFFERS 0x1000000 /**< __GLcontextRec::Visual, __GLcontextRec::DrawBuffer, */ -#define _NEW_MULTISAMPLE 0x2000000 /**< __GLcontextRec::Multisample */ -#define _NEW_TRACK_MATRIX 0x4000000 /**< __GLcontextRec::VertexProgram */ -#define _NEW_PROGRAM 0x8000000 /**< __GLcontextRec::VertexProgram */ -#define _NEW_CURRENT_ATTRIB 0x10000000 /**< __GLcontextRec::Current */ +#define _NEW_MODELVIEW 0x1 /**< __struct gl_contextRec::ModelView */ +#define _NEW_PROJECTION 0x2 /**< __struct gl_contextRec::Projection */ +#define _NEW_TEXTURE_MATRIX 0x4 /**< __struct gl_contextRec::TextureMatrix */ +#define _NEW_ACCUM 0x10 /**< __struct gl_contextRec::Accum */ +#define _NEW_COLOR 0x20 /**< __struct gl_contextRec::Color */ +#define _NEW_DEPTH 0x40 /**< __struct gl_contextRec::Depth */ +#define _NEW_EVAL 0x80 /**< __struct gl_contextRec::Eval, __struct gl_contextRec::EvalMap */ +#define _NEW_FOG 0x100 /**< __struct gl_contextRec::Fog */ +#define _NEW_HINT 0x200 /**< __struct gl_contextRec::Hint */ +#define _NEW_LIGHT 0x400 /**< __struct gl_contextRec::Light */ +#define _NEW_LINE 0x800 /**< __struct gl_contextRec::Line */ +#define _NEW_PIXEL 0x1000 /**< __struct gl_contextRec::Pixel */ +#define _NEW_POINT 0x2000 /**< __struct gl_contextRec::Point */ +#define _NEW_POLYGON 0x4000 /**< __struct gl_contextRec::Polygon */ +#define _NEW_POLYGONSTIPPLE 0x8000 /**< __struct gl_contextRec::PolygonStipple */ +#define _NEW_SCISSOR 0x10000 /**< __struct gl_contextRec::Scissor */ +#define _NEW_STENCIL 0x20000 /**< __struct gl_contextRec::Stencil */ +#define _NEW_TEXTURE 0x40000 /**< __struct gl_contextRec::Texture */ +#define _NEW_TRANSFORM 0x80000 /**< __struct gl_contextRec::Transform */ +#define _NEW_VIEWPORT 0x100000 /**< __struct gl_contextRec::Viewport */ +#define _NEW_PACKUNPACK 0x200000 /**< __struct gl_contextRec::Pack, __struct gl_contextRec::Unpack */ +#define _NEW_ARRAY 0x400000 /**< __struct gl_contextRec::Array */ +#define _NEW_RENDERMODE 0x800000 /**< __struct gl_contextRec::RenderMode, __struct gl_contextRec::Feedback, __struct gl_contextRec::Select */ +#define _NEW_BUFFERS 0x1000000 /**< __struct gl_contextRec::Visual, __struct gl_contextRec::DrawBuffer, */ +#define _NEW_MULTISAMPLE 0x2000000 /**< __struct gl_contextRec::Multisample */ +#define _NEW_TRACK_MATRIX 0x4000000 /**< __struct gl_contextRec::VertexProgram */ +#define _NEW_PROGRAM 0x8000000 /**< __struct gl_contextRec::VertexProgram */ +#define _NEW_CURRENT_ATTRIB 0x10000000 /**< __struct gl_contextRec::Current */ #define _NEW_PROGRAM_CONSTANTS 0x20000000 #define _NEW_BUFFER_OBJECT 0x40000000 #define _NEW_ALL ~0 @@ -2877,7 +2877,7 @@ struct gl_matrix_stack /** * \name A bunch of flags that we think might be useful to drivers. * - * Set in the __GLcontextRec::_TriangleCaps bitfield. + * Set in the __struct gl_contextRec::_TriangleCaps bitfield. */ /*@{*/ #define DD_FLATSHADE 0x1 @@ -3045,9 +3045,9 @@ typedef enum { * Think of this as a base class from which device drivers will derive * sub classes. * - * The GLcontext typedef names this structure. + * The struct gl_context typedef names this structure. */ -struct __GLcontextRec +struct gl_context { /** State possibly shared with other contexts in the address space */ struct gl_shared_state *Shared; diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c index 01b68df7afc..5487d45f56b 100644 --- a/src/mesa/main/multisample.c +++ b/src/mesa/main/multisample.c @@ -50,7 +50,7 @@ _mesa_SampleCoverageARB(GLclampf value, GLboolean invert) * \param ctx the GL context. */ void -_mesa_init_multisample(GLcontext *ctx) +_mesa_init_multisample(struct gl_context *ctx) { ctx->Multisample.Enabled = GL_TRUE; ctx->Multisample.SampleAlphaToCoverage = GL_FALSE; diff --git a/src/mesa/main/multisample.h b/src/mesa/main/multisample.h index 998488ef420..c7cc432daac 100644 --- a/src/mesa/main/multisample.h +++ b/src/mesa/main/multisample.h @@ -33,7 +33,7 @@ _mesa_SampleCoverageARB(GLclampf value, GLboolean invert); extern void -_mesa_init_multisample(GLcontext *ctx); +_mesa_init_multisample(struct gl_context *ctx); #endif diff --git a/src/mesa/main/nvprogram.c b/src/mesa/main/nvprogram.c index 3a570b7dda6..833bf916ecf 100644 --- a/src/mesa/main/nvprogram.c +++ b/src/mesa/main/nvprogram.c @@ -511,7 +511,7 @@ _mesa_GetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid **pointer) } void -_mesa_emit_nv_temp_initialization(GLcontext *ctx, +_mesa_emit_nv_temp_initialization(struct gl_context *ctx, struct gl_program *program) { struct prog_instruction *inst; @@ -559,7 +559,7 @@ _mesa_emit_nv_temp_initialization(GLcontext *ctx, } void -_mesa_setup_nv_temporary_count(GLcontext *ctx, struct gl_program *program) +_mesa_setup_nv_temporary_count(struct gl_context *ctx, struct gl_program *program) { GLuint i; diff --git a/src/mesa/main/nvprogram.h b/src/mesa/main/nvprogram.h index 260a25ba9e9..035f2fe2426 100644 --- a/src/mesa/main/nvprogram.h +++ b/src/mesa/main/nvprogram.h @@ -106,10 +106,10 @@ _mesa_GetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); extern void -_mesa_setup_nv_temporary_count(GLcontext *ctx, struct gl_program *program); +_mesa_setup_nv_temporary_count(struct gl_context *ctx, struct gl_program *program); extern void -_mesa_emit_nv_temp_initialization(GLcontext *ctx, +_mesa_emit_nv_temp_initialization(struct gl_context *ctx, struct gl_program *program); #endif diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index 1d378e4d9f7..5f824b34294 100644 --- a/src/mesa/main/pixel.c +++ b/src/mesa/main/pixel.c @@ -69,7 +69,7 @@ _mesa_PixelZoom( GLfloat xfactor, GLfloat yfactor ) * Return pointer to a pixelmap by name. */ static struct gl_pixelmap * -get_pixelmap(GLcontext *ctx, GLenum map) +get_pixelmap(struct gl_context *ctx, GLenum map) { switch (map) { case GL_PIXEL_MAP_I_TO_I: @@ -102,7 +102,7 @@ get_pixelmap(GLcontext *ctx, GLenum map) * Helper routine used by the other _mesa_PixelMap() functions. */ static void -store_pixelmap(GLcontext *ctx, GLenum map, GLsizei mapsize, +store_pixelmap(struct gl_context *ctx, GLenum map, GLsizei mapsize, const GLfloat *values) { GLint i; @@ -143,7 +143,7 @@ store_pixelmap(GLcontext *ctx, GLenum map, GLsizei mapsize, * Convenience wrapper for _mesa_validate_pbo_access() for gl[Get]PixelMap(). */ static GLboolean -validate_pbo_access(GLcontext *ctx, struct gl_pixelstore_attrib *pack, +validate_pbo_access(struct gl_context *ctx, struct gl_pixelstore_attrib *pack, GLsizei mapsize, GLenum format, GLenum type, const GLvoid *ptr) { @@ -590,7 +590,7 @@ _mesa_PixelTransferi( GLenum pname, GLint param ) * pixel transfer operations are enabled. */ static void -update_image_transfer_state(GLcontext *ctx) +update_image_transfer_state(struct gl_context *ctx) { GLuint mask = 0; @@ -613,7 +613,7 @@ update_image_transfer_state(GLcontext *ctx) /** * Update mesa pixel transfer derived state. */ -void _mesa_update_pixel( GLcontext *ctx, GLuint new_state ) +void _mesa_update_pixel( struct gl_context *ctx, GLuint new_state ) { if (new_state & _MESA_NEW_TRANSFER_STATE) update_image_transfer_state(ctx); @@ -655,7 +655,7 @@ init_pixelmap(struct gl_pixelmap *map) * Initialize the context's PIXEL attribute group. */ void -_mesa_init_pixel( GLcontext *ctx ) +_mesa_init_pixel( struct gl_context *ctx ) { /* Pixel group */ ctx->Pixel.RedBias = 0.0; diff --git a/src/mesa/main/pixel.h b/src/mesa/main/pixel.h index f4d3f1efdb0..03560835a8c 100644 --- a/src/mesa/main/pixel.h +++ b/src/mesa/main/pixel.h @@ -39,7 +39,7 @@ #if FEATURE_pixel_transfer extern void -_mesa_update_pixel( GLcontext *ctx, GLuint newstate ); +_mesa_update_pixel( struct gl_context *ctx, GLuint newstate ); extern void _mesa_init_pixel_dispatch( struct _glapi_table * disp ); @@ -47,7 +47,7 @@ _mesa_init_pixel_dispatch( struct _glapi_table * disp ); #else /* FEATURE_pixel_transfer */ static INLINE void -_mesa_update_pixel(GLcontext *ctx, GLuint newstate) +_mesa_update_pixel(struct gl_context *ctx, GLuint newstate) { } @@ -60,7 +60,7 @@ _mesa_init_pixel_dispatch(struct _glapi_table *disp) extern void -_mesa_init_pixel( GLcontext * ctx ); +_mesa_init_pixel( struct gl_context * ctx ); /*@}*/ diff --git a/src/mesa/main/pixelstore.c b/src/mesa/main/pixelstore.c index ec585ef0cce..b16d27a4ea5 100644 --- a/src/mesa/main/pixelstore.c +++ b/src/mesa/main/pixelstore.c @@ -228,7 +228,7 @@ _mesa_PixelStoref( GLenum pname, GLfloat param ) * Initialize the context's pixel store state. */ void -_mesa_init_pixelstore( GLcontext *ctx ) +_mesa_init_pixelstore( struct gl_context *ctx ) { /* Pixel transfer */ ctx->Pack.Alignment = 4; diff --git a/src/mesa/main/pixelstore.h b/src/mesa/main/pixelstore.h index 47bff4276d1..cdef7de2613 100644 --- a/src/mesa/main/pixelstore.h +++ b/src/mesa/main/pixelstore.h @@ -45,7 +45,7 @@ _mesa_PixelStoref( GLenum pname, GLfloat param ); extern void -_mesa_init_pixelstore( GLcontext *ctx ); +_mesa_init_pixelstore( struct gl_context *ctx ); #endif diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c index eab9d13d6d9..87bfae27eba 100644 --- a/src/mesa/main/points.c +++ b/src/mesa/main/points.c @@ -245,11 +245,11 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params) * * \param ctx GL context. * - * Initializes __GLcontextRec::Point and point related constants in - * __GLcontextRec::Const. + * Initializes __struct gl_contextRec::Point and point related constants in + * __struct gl_contextRec::Const. */ void -_mesa_init_point(GLcontext *ctx) +_mesa_init_point(struct gl_context *ctx) { GLuint i; diff --git a/src/mesa/main/points.h b/src/mesa/main/points.h index 156641eab91..b222379b1b5 100644 --- a/src/mesa/main/points.h +++ b/src/mesa/main/points.h @@ -51,7 +51,7 @@ extern void GLAPIENTRY _mesa_PointParameterfv( GLenum pname, const GLfloat *params ); extern void -_mesa_init_point( GLcontext * ctx ); +_mesa_init_point( struct gl_context * ctx ); #endif diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c index 30e4a606bb7..970020048db 100644 --- a/src/mesa/main/polygon.c +++ b/src/mesa/main/polygon.c @@ -190,7 +190,7 @@ _mesa_PolygonMode( GLenum face, GLenum mode ) * too. */ void -_mesa_polygon_stipple(GLcontext *ctx, const GLubyte *pattern) +_mesa_polygon_stipple(struct gl_context *ctx, const GLubyte *pattern) { pattern = _mesa_map_validate_pbo_source(ctx, 2, &ctx->Unpack, 32, 32, 1, @@ -293,10 +293,10 @@ _mesa_PolygonOffsetEXT( GLfloat factor, GLfloat bias ) * * \param ctx GL context. * - * Initializes __GLcontextRec::Polygon and __GLcontextRec::PolygonStipple + * Initializes __struct gl_contextRec::Polygon and __struct gl_contextRec::PolygonStipple * attribute groups. */ -void _mesa_init_polygon( GLcontext * ctx ) +void _mesa_init_polygon( struct gl_context * ctx ) { /* Polygon group */ ctx->Polygon.CullFlag = GL_FALSE; diff --git a/src/mesa/main/polygon.h b/src/mesa/main/polygon.h index 78e8394d053..ad0ac4cc3a7 100644 --- a/src/mesa/main/polygon.h +++ b/src/mesa/main/polygon.h @@ -36,7 +36,7 @@ extern void -_mesa_polygon_stipple(GLcontext *ctx, const GLubyte *pattern); +_mesa_polygon_stipple(struct gl_context *ctx, const GLubyte *pattern); extern void GLAPIENTRY @@ -61,6 +61,6 @@ extern void GLAPIENTRY _mesa_GetPolygonStipple( GLubyte *mask ); extern void -_mesa_init_polygon( GLcontext * ctx ); +_mesa_init_polygon( struct gl_context * ctx ); #endif diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index a907dac836b..88743977206 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -43,7 +43,7 @@ * \return pointer to new query_object object or NULL if out of memory. */ static struct gl_query_object * -_mesa_new_query_object(GLcontext *ctx, GLuint id) +_mesa_new_query_object(struct gl_context *ctx, GLuint id) { struct gl_query_object *q = MALLOC_STRUCT(gl_query_object); (void) ctx; @@ -62,7 +62,7 @@ _mesa_new_query_object(GLcontext *ctx, GLuint id) * Called via ctx->Driver.BeginQuery(). */ static void -_mesa_begin_query(GLcontext *ctx, struct gl_query_object *q) +_mesa_begin_query(struct gl_context *ctx, struct gl_query_object *q) { /* no-op */ } @@ -73,7 +73,7 @@ _mesa_begin_query(GLcontext *ctx, struct gl_query_object *q) * Called via ctx->Driver.EndQuery(). */ static void -_mesa_end_query(GLcontext *ctx, struct gl_query_object *q) +_mesa_end_query(struct gl_context *ctx, struct gl_query_object *q) { q->Ready = GL_TRUE; } @@ -84,7 +84,7 @@ _mesa_end_query(GLcontext *ctx, struct gl_query_object *q) * Called via ctx->Driver.WaitQuery(). */ static void -_mesa_wait_query(GLcontext *ctx, struct gl_query_object *q) +_mesa_wait_query(struct gl_context *ctx, struct gl_query_object *q) { /* For software drivers, _mesa_end_query() should have completed the query. * For real hardware, implement a proper WaitQuery() driver function, @@ -99,7 +99,7 @@ _mesa_wait_query(GLcontext *ctx, struct gl_query_object *q) * Called via ctx->Driver.CheckQuery(). */ static void -_mesa_check_query(GLcontext *ctx, struct gl_query_object *q) +_mesa_check_query(struct gl_context *ctx, struct gl_query_object *q) { /* No-op for sw rendering. * HW drivers may need to flush at this time. @@ -112,7 +112,7 @@ _mesa_check_query(GLcontext *ctx, struct gl_query_object *q) * Not removed from hash table here. */ static void -_mesa_delete_query(GLcontext *ctx, struct gl_query_object *q) +_mesa_delete_query(struct gl_context *ctx, struct gl_query_object *q) { free(q); } @@ -135,7 +135,7 @@ _mesa_init_query_object_functions(struct dd_function_table *driver) * \return NULL if invalid target, else the address of binding point */ static struct gl_query_object ** -get_query_binding_point(GLcontext *ctx, GLenum target) +get_query_binding_point(struct gl_context *ctx, GLenum target) { switch (target) { case GL_SAMPLES_PASSED_ARB: @@ -535,7 +535,7 @@ _mesa_init_queryobj_dispatch(struct _glapi_table *disp) * Allocate/init the context state related to query objects. */ void -_mesa_init_queryobj(GLcontext *ctx) +_mesa_init_queryobj(struct gl_context *ctx) { ctx->Query.QueryObjects = _mesa_NewHashTable(); ctx->Query.CurrentOcclusionObject = NULL; @@ -549,7 +549,7 @@ static void delete_queryobj_cb(GLuint id, void *data, void *userData) { struct gl_query_object *q= (struct gl_query_object *) data; - GLcontext *ctx = (GLcontext *)userData; + struct gl_context *ctx = (struct gl_context *)userData; ctx->Driver.DeleteQuery(ctx, q); } @@ -558,7 +558,7 @@ delete_queryobj_cb(GLuint id, void *data, void *userData) * Free the context state related to query objects. */ void -_mesa_free_queryobj_data(GLcontext *ctx) +_mesa_free_queryobj_data(struct gl_context *ctx) { _mesa_HashDeleteAll(ctx->Query.QueryObjects, delete_queryobj_cb, ctx); _mesa_DeleteHashTable(ctx->Query.QueryObjects); diff --git a/src/mesa/main/queryobj.h b/src/mesa/main/queryobj.h index 8746ed15e99..e289625731a 100644 --- a/src/mesa/main/queryobj.h +++ b/src/mesa/main/queryobj.h @@ -34,7 +34,7 @@ #if FEATURE_queryobj static INLINE struct gl_query_object * -_mesa_lookup_query_object(GLcontext *ctx, GLuint id) +_mesa_lookup_query_object(struct gl_context *ctx, GLuint id) { return (struct gl_query_object *) _mesa_HashLookup(ctx->Query.QueryObjects, id); @@ -68,7 +68,7 @@ _mesa_init_queryobj_dispatch(struct _glapi_table *disp); #else /* FEATURE_queryobj */ static INLINE struct gl_query_object * -_mesa_lookup_query_object(GLcontext *ctx, GLuint id) +_mesa_lookup_query_object(struct gl_context *ctx, GLuint id) { return NULL; } @@ -86,10 +86,10 @@ _mesa_init_queryobj_dispatch(struct _glapi_table *disp) #endif /* FEATURE_queryobj */ extern void -_mesa_init_queryobj(GLcontext *ctx); +_mesa_init_queryobj(struct gl_context *ctx); extern void -_mesa_free_queryobj_data(GLcontext *ctx); +_mesa_free_queryobj_data(struct gl_context *ctx); #endif /* QUERYOBJ_H */ diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c index 75c67f2693e..6f52f07dfab 100644 --- a/src/mesa/main/rastpos.c +++ b/src/mesa/main/rastpos.c @@ -545,10 +545,10 @@ _mesa_init_rastpos_dispatch(struct _glapi_table *disp) * \param ctx GL context. * * Initialize the current raster position information in - * __GLcontextRec::Current, and adds the extension entry points to the + * __struct gl_contextRec::Current, and adds the extension entry points to the * dispatcher. */ -void _mesa_init_rastpos( GLcontext * ctx ) +void _mesa_init_rastpos( struct gl_context * ctx ) { int i; diff --git a/src/mesa/main/rastpos.h b/src/mesa/main/rastpos.h index 4994616d40a..9b508eaedf5 100644 --- a/src/mesa/main/rastpos.h +++ b/src/mesa/main/rastpos.h @@ -50,7 +50,7 @@ _mesa_init_rastpos_dispatch(struct _glapi_table *disp) #endif /* FEATURE_rastpos */ extern void -_mesa_init_rastpos(GLcontext *ctx); +_mesa_init_rastpos(struct gl_context *ctx); /*@}*/ diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index bb3fb9eb662..0043c8adc41 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -40,7 +40,7 @@ * \return GL_TRUE if error detected, GL_FALSE if no errors */ GLboolean -_mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type, +_mesa_error_check_format_type(struct gl_context *ctx, GLenum format, GLenum type, GLboolean drawing) { const char *readDraw = drawing ? "Draw" : "Read"; diff --git a/src/mesa/main/readpix.h b/src/mesa/main/readpix.h index 1bf02fb8e4d..0753e619fed 100644 --- a/src/mesa/main/readpix.h +++ b/src/mesa/main/readpix.h @@ -31,7 +31,7 @@ extern GLboolean -_mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type, +_mesa_error_check_format_type(struct gl_context *ctx, GLenum format, GLenum type, GLboolean drawing); extern void GLAPIENTRY diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c index 118fb52bb2e..dc8bc747874 100644 --- a/src/mesa/main/renderbuffer.c +++ b/src/mesa/main/renderbuffer.c @@ -61,7 +61,7 @@ */ static void * -get_pointer_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, +get_pointer_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb, GLint x, GLint y) { if (!rb->Data) @@ -75,7 +75,7 @@ get_pointer_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, static void -get_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +get_row_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, void *values) { const GLubyte *src = (const GLubyte *) rb->Data + y * rb->Width + x; @@ -85,7 +85,7 @@ get_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -get_values_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +get_values_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], void *values) { GLubyte *dst = (GLubyte *) values; @@ -99,7 +99,7 @@ get_values_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_row_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { const GLubyte *src = (const GLubyte *) values; @@ -120,7 +120,7 @@ put_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_mono_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_mono_row_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask) { const GLubyte val = *((const GLubyte *) value); @@ -144,7 +144,7 @@ put_mono_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_values_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_values_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *values, const GLubyte *mask) { @@ -161,7 +161,7 @@ put_values_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_mono_values_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_mono_values_ubyte(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask) { @@ -183,7 +183,7 @@ put_mono_values_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, */ static void * -get_pointer_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, +get_pointer_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb, GLint x, GLint y) { if (!rb->Data) @@ -195,7 +195,7 @@ get_pointer_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, static void -get_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +get_row_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, void *values) { const void *src = rb->GetPointer(ctx, rb, x, y); @@ -205,7 +205,7 @@ get_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -get_values_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +get_values_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], void *values) { GLushort *dst = (GLushort *) values; @@ -219,7 +219,7 @@ get_values_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_row_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { const GLushort *src = (const GLushort *) values; @@ -240,7 +240,7 @@ put_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_mono_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_mono_row_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask) { const GLushort val = *((const GLushort *) value); @@ -264,7 +264,7 @@ put_mono_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_values_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_values_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *values, const GLubyte *mask) { @@ -281,7 +281,7 @@ put_values_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_mono_values_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, +put_mono_values_ushort(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask) { @@ -312,7 +312,7 @@ put_mono_values_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, */ static void * -get_pointer_uint(GLcontext *ctx, struct gl_renderbuffer *rb, +get_pointer_uint(struct gl_context *ctx, struct gl_renderbuffer *rb, GLint x, GLint y) { if (!rb->Data) @@ -324,7 +324,7 @@ get_pointer_uint(GLcontext *ctx, struct gl_renderbuffer *rb, static void -get_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +get_row_uint(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, void *values) { const void *src = rb->GetPointer(ctx, rb, x, y); @@ -335,7 +335,7 @@ get_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -get_values_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +get_values_uint(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], void *values) { GLuint *dst = (GLuint *) values; @@ -350,7 +350,7 @@ get_values_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_row_uint(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { const GLuint *src = (const GLuint *) values; @@ -372,7 +372,7 @@ put_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_mono_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_mono_row_uint(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask) { const GLuint val = *((const GLuint *) value); @@ -397,7 +397,7 @@ put_mono_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_values_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_values_uint(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *values, const GLubyte *mask) { @@ -415,7 +415,7 @@ put_values_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_mono_values_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_mono_values_uint(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask) { @@ -440,7 +440,7 @@ put_mono_values_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, */ static void * -get_pointer_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, +get_pointer_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLint x, GLint y) { ASSERT(rb->Format == MESA_FORMAT_RGB888); @@ -452,7 +452,7 @@ get_pointer_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, static void -get_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +get_row_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, void *values) { const GLubyte *src = (const GLubyte *) rb->Data + 3 * (y * rb->Width + x); @@ -470,7 +470,7 @@ get_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -get_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +get_values_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], void *values) { GLubyte *dst = (GLubyte *) values; @@ -489,7 +489,7 @@ get_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_row_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { /* note: incoming values are RGB+A! */ @@ -509,7 +509,7 @@ put_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_row_rgb_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_row_rgb_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { /* note: incoming values are RGB+A! */ @@ -529,7 +529,7 @@ put_row_rgb_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_mono_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_mono_row_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask) { /* note: incoming value is RGB+A! */ @@ -557,7 +557,7 @@ put_mono_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_values_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *values, const GLubyte *mask) { @@ -578,7 +578,7 @@ put_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_mono_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, +put_mono_values_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask) { @@ -606,7 +606,7 @@ put_mono_values_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, */ static void * -get_pointer_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, +get_pointer_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLint x, GLint y) { if (!rb->Data) @@ -618,7 +618,7 @@ get_pointer_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, static void -get_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +get_row_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, void *values) { const GLubyte *src = (const GLubyte *) rb->Data + 4 * (y * rb->Width + x); @@ -629,7 +629,7 @@ get_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -get_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +get_values_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], void *values) { /* treat 4*GLubyte as 1*GLuint */ @@ -645,7 +645,7 @@ get_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_row_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { /* treat 4*GLubyte as 1*GLuint */ @@ -668,7 +668,7 @@ put_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_row_rgb_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_row_rgb_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { /* Store RGB values in RGBA buffer */ @@ -689,7 +689,7 @@ put_row_rgb_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_mono_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_mono_row_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask) { /* treat 4*GLubyte as 1*GLuint */ @@ -722,7 +722,7 @@ put_mono_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_values_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *values, const GLubyte *mask) { @@ -741,7 +741,7 @@ put_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_mono_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, +put_mono_values_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask) { @@ -765,7 +765,7 @@ put_mono_values_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, */ static void * -get_pointer_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, +get_pointer_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLint x, GLint y) { if (!rb->Data) @@ -776,7 +776,7 @@ get_pointer_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, static void -get_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +get_row_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, void *values) { const GLshort *src = (const GLshort *) rb->Data + 4 * (y * rb->Width + x); @@ -786,7 +786,7 @@ get_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -get_values_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +get_values_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], void *values) { GLushort *dst = (GLushort *) values; @@ -801,7 +801,7 @@ get_values_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_row_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { const GLushort *src = (const GLushort *) values; @@ -825,7 +825,7 @@ put_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_row_rgb_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_row_rgb_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { /* Put RGB values in RGBA buffer */ @@ -850,7 +850,7 @@ put_row_rgb_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_mono_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_mono_row_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask) { const GLushort val0 = ((const GLushort *) value)[0]; @@ -878,7 +878,7 @@ put_mono_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_values_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +put_values_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *values, const GLubyte *mask) { @@ -898,7 +898,7 @@ put_values_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -put_mono_values_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, +put_mono_values_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask) { @@ -936,7 +936,7 @@ put_mono_values_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, * Get/PutValues functions. */ GLboolean -_mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb, +_mesa_soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, GLenum internalFormat, GLuint width, GLuint height) { @@ -1145,7 +1145,7 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb, static GLboolean -alloc_storage_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, +alloc_storage_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLenum internalFormat, GLuint width, GLuint height) { ASSERT(arb != arb->Wrapped); @@ -1195,7 +1195,7 @@ delete_renderbuffer_alpha8(struct gl_renderbuffer *arb) static void * -get_pointer_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, +get_pointer_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLint x, GLint y) { return NULL; /* don't allow direct access! */ @@ -1203,7 +1203,7 @@ get_pointer_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, static void -get_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, +get_row_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLuint count, GLint x, GLint y, void *values) { /* NOTE: 'values' is RGBA format! */ @@ -1222,7 +1222,7 @@ get_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, static void -get_values_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, +get_values_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLuint count, const GLint x[], const GLint y[], void *values) { GLubyte *dst = (GLubyte *) values; @@ -1240,7 +1240,7 @@ get_values_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, static void -put_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, +put_row_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { const GLubyte *src = (const GLubyte *) values; @@ -1260,7 +1260,7 @@ put_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, static void -put_row_rgb_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, +put_row_rgb_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { const GLubyte *src = (const GLubyte *) values; @@ -1280,7 +1280,7 @@ put_row_rgb_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, static void -put_mono_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, +put_mono_row_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask) { const GLubyte val = ((const GLubyte *) value)[3]; @@ -1305,7 +1305,7 @@ put_mono_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, static void -put_values_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, +put_values_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLuint count, const GLint x[], const GLint y[], const void *values, const GLubyte *mask) { @@ -1326,7 +1326,7 @@ put_values_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, static void -put_mono_values_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, +put_mono_values_alpha8(struct gl_context *ctx, struct gl_renderbuffer *arb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask) { @@ -1368,7 +1368,7 @@ copy_buffer_alpha8(struct gl_renderbuffer* dst, struct gl_renderbuffer* src) * direct buffer access is not supported. */ static void * -nop_get_pointer(GLcontext *ctx, struct gl_renderbuffer *rb, GLint x, GLint y) +nop_get_pointer(struct gl_context *ctx, struct gl_renderbuffer *rb, GLint x, GLint y) { return NULL; } @@ -1422,7 +1422,7 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name) * renderbuffers or window-system renderbuffers. */ struct gl_renderbuffer * -_mesa_new_renderbuffer(GLcontext *ctx, GLuint name) +_mesa_new_renderbuffer(struct gl_context *ctx, GLuint name) { struct gl_renderbuffer *rb = CALLOC_STRUCT(gl_renderbuffer); if (rb) { @@ -1453,7 +1453,7 @@ _mesa_delete_renderbuffer(struct gl_renderbuffer *rb) * This would not be used for hardware-based renderbuffers. */ struct gl_renderbuffer * -_mesa_new_soft_renderbuffer(GLcontext *ctx, GLuint name) +_mesa_new_soft_renderbuffer(struct gl_context *ctx, GLuint name) { struct gl_renderbuffer *rb = _mesa_new_renderbuffer(ctx, name); if (rb) { @@ -1476,7 +1476,7 @@ _mesa_new_soft_renderbuffer(GLcontext *ctx, GLuint name) * rendering! */ GLboolean -_mesa_add_color_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_add_color_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint rgbBits, GLuint alphaBits, GLboolean frontLeft, GLboolean backLeft, GLboolean frontRight, GLboolean backRight) @@ -1540,7 +1540,7 @@ _mesa_add_color_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, * rendering! */ GLboolean -_mesa_add_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_add_alpha_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint alphaBits, GLboolean frontLeft, GLboolean backLeft, GLboolean frontRight, GLboolean backRight) @@ -1624,7 +1624,7 @@ _mesa_add_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, * copy the back buffer alpha channel into the front buffer alpha channel. */ void -_mesa_copy_soft_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb) +_mesa_copy_soft_alpha_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb) { if (fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer && fb->Attachment[BUFFER_BACK_LEFT].Renderbuffer) @@ -1648,7 +1648,7 @@ _mesa_copy_soft_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb) * rendering! */ GLboolean -_mesa_add_depth_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_add_depth_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint depthBits) { struct gl_renderbuffer *rb; @@ -1696,7 +1696,7 @@ _mesa_add_depth_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, * rendering! */ GLboolean -_mesa_add_stencil_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_add_stencil_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint stencilBits) { struct gl_renderbuffer *rb; @@ -1735,7 +1735,7 @@ _mesa_add_stencil_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, * rendering! */ GLboolean -_mesa_add_accum_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_add_accum_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint redBits, GLuint greenBits, GLuint blueBits, GLuint alphaBits) { @@ -1776,7 +1776,7 @@ _mesa_add_accum_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, * NOTE: color-index aux buffers not supported. */ GLboolean -_mesa_add_aux_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_add_aux_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint colorBits, GLuint numBuffers) { GLuint i; @@ -1990,7 +1990,7 @@ _mesa_reference_renderbuffer(struct gl_renderbuffer **ptr, * \return new depth/stencil renderbuffer */ struct gl_renderbuffer * -_mesa_new_depthstencil_renderbuffer(GLcontext *ctx, GLuint name) +_mesa_new_depthstencil_renderbuffer(struct gl_context *ctx, GLuint name) { struct gl_renderbuffer *dsrb; diff --git a/src/mesa/main/renderbuffer.h b/src/mesa/main/renderbuffer.h index bc92b269821..8791369dbee 100644 --- a/src/mesa/main/renderbuffer.h +++ b/src/mesa/main/renderbuffer.h @@ -36,52 +36,52 @@ extern void _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name); extern struct gl_renderbuffer * -_mesa_new_renderbuffer(GLcontext *ctx, GLuint name); +_mesa_new_renderbuffer(struct gl_context *ctx, GLuint name); extern void _mesa_delete_renderbuffer(struct gl_renderbuffer *rb); extern struct gl_renderbuffer * -_mesa_new_soft_renderbuffer(GLcontext *ctx, GLuint name); +_mesa_new_soft_renderbuffer(struct gl_context *ctx, GLuint name); extern GLboolean -_mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb, +_mesa_soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, GLenum internalFormat, GLuint width, GLuint height); extern GLboolean -_mesa_add_color_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_add_color_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint rgbBits, GLuint alphaBits, GLboolean frontLeft, GLboolean backLeft, GLboolean frontRight, GLboolean backRight); extern GLboolean -_mesa_add_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_add_alpha_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint alphaBits, GLboolean frontLeft, GLboolean backLeft, GLboolean frontRight, GLboolean backRight); extern void -_mesa_copy_soft_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb); +_mesa_copy_soft_alpha_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb); extern GLboolean -_mesa_add_depth_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_add_depth_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint depthBits); extern GLboolean -_mesa_add_stencil_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_add_stencil_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint stencilBits); extern GLboolean -_mesa_add_accum_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_add_accum_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint redBits, GLuint greenBits, GLuint blueBits, GLuint alphaBits); extern GLboolean -_mesa_add_aux_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, +_mesa_add_aux_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint bits, GLuint numBuffers); extern void @@ -105,7 +105,7 @@ _mesa_reference_renderbuffer(struct gl_renderbuffer **ptr, struct gl_renderbuffer *rb); extern struct gl_renderbuffer * -_mesa_new_depthstencil_renderbuffer(GLcontext *ctx, GLuint name); +_mesa_new_depthstencil_renderbuffer(struct gl_context *ctx, GLuint name); #endif /* RENDERBUFFER_H */ diff --git a/src/mesa/main/scissor.c b/src/mesa/main/scissor.c index 523f3c3ab83..4cf0bc2528c 100644 --- a/src/mesa/main/scissor.c +++ b/src/mesa/main/scissor.c @@ -58,12 +58,12 @@ _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ) * * \sa glScissor(). * - * Verifies the parameters and updates __GLcontextRec::Scissor. On a + * Verifies the parameters and updates __struct gl_contextRec::Scissor. On a * change flushes the vertices and notifies the driver via * the dd_function_table::Scissor callback. */ void -_mesa_set_scissor(GLcontext *ctx, +_mesa_set_scissor(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height) { if (x == ctx->Scissor.X && @@ -88,7 +88,7 @@ _mesa_set_scissor(GLcontext *ctx, * \param ctx the GL context. */ void -_mesa_init_scissor(GLcontext *ctx) +_mesa_init_scissor(struct gl_context *ctx) { /* Scissor group */ ctx->Scissor.Enabled = GL_FALSE; diff --git a/src/mesa/main/scissor.h b/src/mesa/main/scissor.h index b852a2122d0..bd909019db2 100644 --- a/src/mesa/main/scissor.h +++ b/src/mesa/main/scissor.h @@ -35,12 +35,12 @@ _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ); extern void -_mesa_set_scissor(GLcontext *ctx, +_mesa_set_scissor(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height); extern void -_mesa_init_scissor(GLcontext *ctx); +_mesa_init_scissor(struct gl_context *ctx); #endif diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index c25d2a19747..9a2a42e50e4 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -89,7 +89,7 @@ get_shader_flags(void) * Initialize context's shader state. */ void -_mesa_init_shader_state(GLcontext *ctx) +_mesa_init_shader_state(struct gl_context *ctx) { /* Device drivers may override these to control what kind of instructions * are generated by the GLSL compiler. @@ -114,7 +114,7 @@ _mesa_init_shader_state(GLcontext *ctx) * Free the per-context shader-related state. */ void -_mesa_free_shader_state(GLcontext *ctx) +_mesa_free_shader_state(struct gl_context *ctx) { _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentProgram, NULL); } @@ -221,7 +221,7 @@ longest_feedback_varying_name(const struct gl_shader_program *shProg) static GLboolean -is_program(GLcontext *ctx, GLuint name) +is_program(struct gl_context *ctx, GLuint name) { struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, name); return shProg ? GL_TRUE : GL_FALSE; @@ -229,7 +229,7 @@ is_program(GLcontext *ctx, GLuint name) static GLboolean -is_shader(GLcontext *ctx, GLuint name) +is_shader(struct gl_context *ctx, GLuint name) { struct gl_shader *shader = _mesa_lookup_shader(ctx, name); return shader ? GL_TRUE : GL_FALSE; @@ -240,7 +240,7 @@ is_shader(GLcontext *ctx, GLuint name) * Attach shader to a shader program. */ static void -attach_shader(GLcontext *ctx, GLuint program, GLuint shader) +attach_shader(struct gl_context *ctx, GLuint program, GLuint shader) { struct gl_shader_program *shProg; struct gl_shader *sh; @@ -287,7 +287,7 @@ attach_shader(GLcontext *ctx, GLuint program, GLuint shader) static GLint -get_attrib_location(GLcontext *ctx, GLuint program, const GLchar *name) +get_attrib_location(struct gl_context *ctx, GLuint program, const GLchar *name) { struct gl_shader_program *shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetAttribLocation"); @@ -320,7 +320,7 @@ get_attrib_location(GLcontext *ctx, GLuint program, const GLchar *name) static void -bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, +bind_attrib_location(struct gl_context *ctx, GLuint program, GLuint index, const GLchar *name) { struct gl_shader_program *shProg; @@ -371,7 +371,7 @@ bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, static GLuint -create_shader(GLcontext *ctx, GLenum type) +create_shader(struct gl_context *ctx, GLenum type) { struct gl_shader *sh; GLuint name; @@ -396,7 +396,7 @@ create_shader(GLcontext *ctx, GLenum type) static GLuint -create_shader_program(GLcontext *ctx) +create_shader_program(struct gl_context *ctx) { GLuint name; struct gl_shader_program *shProg; @@ -418,7 +418,7 @@ create_shader_program(GLcontext *ctx) * DeleteProgramARB. */ static void -delete_shader_program(GLcontext *ctx, GLuint name) +delete_shader_program(struct gl_context *ctx, GLuint name) { /* * NOTE: deleting shaders/programs works a bit differently than @@ -442,7 +442,7 @@ delete_shader_program(GLcontext *ctx, GLuint name) static void -delete_shader(GLcontext *ctx, GLuint shader) +delete_shader(struct gl_context *ctx, GLuint shader) { struct gl_shader *sh; @@ -458,7 +458,7 @@ delete_shader(GLcontext *ctx, GLuint shader) static void -detach_shader(GLcontext *ctx, GLuint program, GLuint shader) +detach_shader(struct gl_context *ctx, GLuint program, GLuint shader) { struct gl_shader_program *shProg; GLuint n; @@ -526,7 +526,7 @@ detach_shader(GLcontext *ctx, GLuint program, GLuint shader) static void -get_active_attrib(GLcontext *ctx, GLuint program, GLuint index, +get_active_attrib(struct gl_context *ctx, GLuint program, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLchar *nameOut) { @@ -561,7 +561,7 @@ get_active_attrib(GLcontext *ctx, GLuint program, GLuint index, * Return list of shaders attached to shader program. */ static void -get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount, +get_attached_shaders(struct gl_context *ctx, GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj) { struct gl_shader_program *shProg = @@ -581,7 +581,7 @@ get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount, * glGetHandleARB() - return ID/name of currently bound shader program. */ static GLuint -get_handle(GLcontext *ctx, GLenum pname) +get_handle(struct gl_context *ctx, GLenum pname) { if (pname == GL_PROGRAM_OBJECT_ARB) { if (ctx->Shader.CurrentProgram) @@ -602,7 +602,7 @@ get_handle(GLcontext *ctx, GLenum pname) * programs (see glGetProgramivARB). */ static void -get_programiv(GLcontext *ctx, GLuint program, GLenum pname, GLint *params) +get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *params) { const struct gl_program_parameter_list *attribs; struct gl_shader_program *shProg @@ -684,7 +684,7 @@ get_programiv(GLcontext *ctx, GLuint program, GLenum pname, GLint *params) * glGetShaderiv() - get GLSL shader state */ static void -get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params) +get_shaderiv(struct gl_context *ctx, GLuint name, GLenum pname, GLint *params) { struct gl_shader *shader = _mesa_lookup_shader_err(ctx, name, "glGetShaderiv"); @@ -717,7 +717,7 @@ get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params) static void -get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize, +get_program_info_log(struct gl_context *ctx, GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog) { struct gl_shader_program *shProg @@ -731,7 +731,7 @@ get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize, static void -get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize, +get_shader_info_log(struct gl_context *ctx, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) { struct gl_shader *sh = _mesa_lookup_shader(ctx, shader); @@ -747,7 +747,7 @@ get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize, * Return shader source code. */ static void -get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength, +get_shader_source(struct gl_context *ctx, GLuint shader, GLsizei maxLength, GLsizei *length, GLchar *sourceOut) { struct gl_shader *sh; @@ -763,7 +763,7 @@ get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength, * Set/replace shader source code. */ static void -shader_source(GLcontext *ctx, GLuint shader, const GLchar *source) +shader_source(struct gl_context *ctx, GLuint shader, const GLchar *source) { struct gl_shader *sh; @@ -787,7 +787,7 @@ shader_source(GLcontext *ctx, GLuint shader, const GLchar *source) * Compile a shader. */ static void -compile_shader(GLcontext *ctx, GLuint shaderObj) +compile_shader(struct gl_context *ctx, GLuint shaderObj) { struct gl_shader *sh; struct gl_shader_compiler_options *options; @@ -812,7 +812,7 @@ compile_shader(GLcontext *ctx, GLuint shaderObj) * Link a program's shaders. */ static void -link_program(GLcontext *ctx, GLuint program) +link_program(struct gl_context *ctx, GLuint program) { struct gl_shader_program *shProg; struct gl_transform_feedback_object *obj = @@ -888,7 +888,7 @@ print_shader_info(const struct gl_shader_program *shProg) * Use the named shader program for subsequent rendering. */ void -_mesa_use_program(GLcontext *ctx, GLuint program) +_mesa_use_program(struct gl_context *ctx, GLuint program) { struct gl_shader_program *shProg; struct gl_transform_feedback_object *obj = @@ -943,7 +943,7 @@ _mesa_use_program(GLcontext *ctx, GLuint program) * \return GL_TRUE if valid, GL_FALSE if invalid */ static GLboolean -validate_samplers(GLcontext *ctx, const struct gl_program *prog, char *errMsg) +validate_samplers(struct gl_context *ctx, const struct gl_program *prog, char *errMsg) { static const char *targetName[] = { "TEXTURE_2D_ARRAY", @@ -995,7 +995,7 @@ validate_samplers(GLcontext *ctx, const struct gl_program *prog, char *errMsg) * \return GL_TRUE if valid, GL_FALSE if invalid (and set errMsg) */ static GLboolean -validate_shader_program(GLcontext *ctx, +validate_shader_program(struct gl_context *ctx, const struct gl_shader_program *shProg, char *errMsg) { @@ -1041,7 +1041,7 @@ validate_shader_program(GLcontext *ctx, * Called via glValidateProgram() */ static void -validate_program(GLcontext *ctx, GLuint program) +validate_program(struct gl_context *ctx, GLuint program) { struct gl_shader_program *shProg; char errMsg[100]; diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h index 16e22530de5..b55d7ca8b25 100644 --- a/src/mesa/main/shaderapi.h +++ b/src/mesa/main/shaderapi.h @@ -39,7 +39,7 @@ _mesa_copy_string(GLchar *dst, GLsizei maxLength, GLsizei *length, const GLchar *src); extern void -_mesa_use_program(GLcontext *ctx, GLuint program); +_mesa_use_program(struct gl_context *ctx, GLuint program); extern void diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index 2de8f279818..e0ffa2f289d 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -50,7 +50,7 @@ * Then set ptr to point to sh, incrementing its refcount. */ void -_mesa_reference_shader(GLcontext *ctx, struct gl_shader **ptr, +_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr, struct gl_shader *sh) { assert(ptr); @@ -88,7 +88,7 @@ _mesa_reference_shader(GLcontext *ctx, struct gl_shader **ptr, } void -_mesa_init_shader(GLcontext *ctx, struct gl_shader *shader) +_mesa_init_shader(struct gl_context *ctx, struct gl_shader *shader) { shader->RefCount = 1; } @@ -98,7 +98,7 @@ _mesa_init_shader(GLcontext *ctx, struct gl_shader *shader) * Called via ctx->Driver.NewShader() */ struct gl_shader * -_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type) +_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type) { struct gl_shader *shader; assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER || @@ -118,7 +118,7 @@ _mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type) * Called via ctx->Driver.DeleteShader(). */ static void -_mesa_delete_shader(GLcontext *ctx, struct gl_shader *sh) +_mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh) { if (sh->Source) free((void *) sh->Source); @@ -131,7 +131,7 @@ _mesa_delete_shader(GLcontext *ctx, struct gl_shader *sh) * Lookup a GLSL shader object. */ struct gl_shader * -_mesa_lookup_shader(GLcontext *ctx, GLuint name) +_mesa_lookup_shader(struct gl_context *ctx, GLuint name) { if (name) { struct gl_shader *sh = (struct gl_shader *) @@ -153,7 +153,7 @@ _mesa_lookup_shader(GLcontext *ctx, GLuint name) * As above, but record an error if shader is not found. */ struct gl_shader * -_mesa_lookup_shader_err(GLcontext *ctx, GLuint name, const char *caller) +_mesa_lookup_shader_err(struct gl_context *ctx, GLuint name, const char *caller) { if (!name) { _mesa_error(ctx, GL_INVALID_VALUE, "%s", caller); @@ -188,7 +188,7 @@ _mesa_lookup_shader_err(GLcontext *ctx, GLuint name, const char *caller) * Then set ptr to point to shProg, incrementing its refcount. */ void -_mesa_reference_shader_program(GLcontext *ctx, +_mesa_reference_shader_program(struct gl_context *ctx, struct gl_shader_program **ptr, struct gl_shader_program *shProg) { @@ -230,7 +230,7 @@ _mesa_reference_shader_program(GLcontext *ctx, } void -_mesa_init_shader_program(GLcontext *ctx, struct gl_shader_program *prog) +_mesa_init_shader_program(struct gl_context *ctx, struct gl_shader_program *prog) { prog->Type = GL_SHADER_PROGRAM_MESA; prog->RefCount = 1; @@ -247,7 +247,7 @@ _mesa_init_shader_program(GLcontext *ctx, struct gl_shader_program *prog) * Called via ctx->Driver.NewShaderProgram() */ static struct gl_shader_program * -_mesa_new_shader_program(GLcontext *ctx, GLuint name) +_mesa_new_shader_program(struct gl_context *ctx, GLuint name) { struct gl_shader_program *shProg; shProg = talloc_zero(NULL, struct gl_shader_program); @@ -263,7 +263,7 @@ _mesa_new_shader_program(GLcontext *ctx, GLuint name) * Clear (free) the shader program state that gets produced by linking. */ void -_mesa_clear_shader_program_data(GLcontext *ctx, +_mesa_clear_shader_program_data(struct gl_context *ctx, struct gl_shader_program *shProg) { _mesa_reference_vertprog(ctx, &shProg->VertexProgram, NULL); @@ -287,7 +287,7 @@ _mesa_clear_shader_program_data(GLcontext *ctx, * object itself. */ void -_mesa_free_shader_program_data(GLcontext *ctx, +_mesa_free_shader_program_data(struct gl_context *ctx, struct gl_shader_program *shProg) { GLuint i; @@ -338,7 +338,7 @@ _mesa_free_shader_program_data(GLcontext *ctx, * Called via ctx->Driver.DeleteShaderProgram(). */ static void -_mesa_delete_shader_program(GLcontext *ctx, struct gl_shader_program *shProg) +_mesa_delete_shader_program(struct gl_context *ctx, struct gl_shader_program *shProg) { _mesa_free_shader_program_data(ctx, shProg); @@ -350,7 +350,7 @@ _mesa_delete_shader_program(GLcontext *ctx, struct gl_shader_program *shProg) * Lookup a GLSL program object. */ struct gl_shader_program * -_mesa_lookup_shader_program(GLcontext *ctx, GLuint name) +_mesa_lookup_shader_program(struct gl_context *ctx, GLuint name) { struct gl_shader_program *shProg; if (name) { @@ -373,7 +373,7 @@ _mesa_lookup_shader_program(GLcontext *ctx, GLuint name) * As above, but record an error if program is not found. */ struct gl_shader_program * -_mesa_lookup_shader_program_err(GLcontext *ctx, GLuint name, +_mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name, const char *caller) { if (!name) { diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h index cbe7ae7b068..cf1b4c27bd5 100644 --- a/src/mesa/main/shaderobj.h +++ b/src/mesa/main/shaderobj.h @@ -39,50 +39,50 @@ extern "C" { */ extern void -_mesa_init_shader_state(GLcontext * ctx); +_mesa_init_shader_state(struct gl_context * ctx); extern void -_mesa_free_shader_state(GLcontext *ctx); +_mesa_free_shader_state(struct gl_context *ctx); extern void -_mesa_reference_shader(GLcontext *ctx, struct gl_shader **ptr, +_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr, struct gl_shader *sh); extern struct gl_shader * -_mesa_lookup_shader(GLcontext *ctx, GLuint name); +_mesa_lookup_shader(struct gl_context *ctx, GLuint name); extern struct gl_shader * -_mesa_lookup_shader_err(GLcontext *ctx, GLuint name, const char *caller); +_mesa_lookup_shader_err(struct gl_context *ctx, GLuint name, const char *caller); extern void -_mesa_reference_shader_program(GLcontext *ctx, +_mesa_reference_shader_program(struct gl_context *ctx, struct gl_shader_program **ptr, struct gl_shader_program *shProg); extern void -_mesa_init_shader(GLcontext *ctx, struct gl_shader *shader); +_mesa_init_shader(struct gl_context *ctx, struct gl_shader *shader); extern struct gl_shader * -_mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type); +_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type); extern void -_mesa_init_shader_program(GLcontext *ctx, struct gl_shader_program *prog); +_mesa_init_shader_program(struct gl_context *ctx, struct gl_shader_program *prog); extern struct gl_shader_program * -_mesa_lookup_shader_program(GLcontext *ctx, GLuint name); +_mesa_lookup_shader_program(struct gl_context *ctx, GLuint name); extern struct gl_shader_program * -_mesa_lookup_shader_program_err(GLcontext *ctx, GLuint name, +_mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name, const char *caller); extern void -_mesa_clear_shader_program_data(GLcontext *ctx, +_mesa_clear_shader_program_data(struct gl_context *ctx, struct gl_shader_program *shProg); extern void -_mesa_free_shader_program_data(GLcontext *ctx, +_mesa_free_shader_program_data(struct gl_context *ctx, struct gl_shader_program *shProg); @@ -91,10 +91,10 @@ extern void _mesa_init_shader_object_functions(struct dd_function_table *driver); extern void -_mesa_init_shader_state(GLcontext *ctx); +_mesa_init_shader_state(struct gl_context *ctx); extern void -_mesa_free_shader_state(GLcontext *ctx); +_mesa_free_shader_state(struct gl_context *ctx); static INLINE GLuint _mesa_shader_type_to_index(GLenum v) diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c index a56c70fa7f6..3abee0178eb 100644 --- a/src/mesa/main/shared.c +++ b/src/mesa/main/shared.c @@ -52,7 +52,7 @@ * failure. */ struct gl_shared_state * -_mesa_alloc_shared_state(GLcontext *ctx) +_mesa_alloc_shared_state(struct gl_context *ctx) { struct gl_shared_state *shared; GLuint i; @@ -133,7 +133,7 @@ static void delete_displaylist_cb(GLuint id, void *data, void *userData) { struct gl_display_list *list = (struct gl_display_list *) data; - GLcontext *ctx = (GLcontext *) userData; + struct gl_context *ctx = (struct gl_context *) userData; _mesa_delete_list(ctx, list); } @@ -145,7 +145,7 @@ static void delete_texture_cb(GLuint id, void *data, void *userData) { struct gl_texture_object *texObj = (struct gl_texture_object *) data; - GLcontext *ctx = (GLcontext *) userData; + struct gl_context *ctx = (struct gl_context *) userData; ctx->Driver.DeleteTexture(ctx, texObj); } @@ -157,7 +157,7 @@ static void delete_program_cb(GLuint id, void *data, void *userData) { struct gl_program *prog = (struct gl_program *) data; - GLcontext *ctx = (GLcontext *) userData; + struct gl_context *ctx = (struct gl_context *) userData; if(prog != &_mesa_DummyProgram) { ASSERT(prog->RefCount == 1); /* should only be referenced by hash table */ prog->RefCount = 0; /* now going away */ @@ -175,7 +175,7 @@ static void delete_fragshader_cb(GLuint id, void *data, void *userData) { struct ati_fragment_shader *shader = (struct ati_fragment_shader *) data; - GLcontext *ctx = (GLcontext *) userData; + struct gl_context *ctx = (struct gl_context *) userData; _mesa_delete_ati_fragment_shader(ctx, shader); } #endif @@ -188,7 +188,7 @@ static void delete_bufferobj_cb(GLuint id, void *data, void *userData) { struct gl_buffer_object *bufObj = (struct gl_buffer_object *) data; - GLcontext *ctx = (GLcontext *) userData; + struct gl_context *ctx = (struct gl_context *) userData; if (_mesa_bufferobj_mapped(bufObj)) { ctx->Driver.UnmapBuffer(ctx, 0, bufObj); bufObj->Pointer = NULL; @@ -204,7 +204,7 @@ delete_bufferobj_cb(GLuint id, void *data, void *userData) static void free_shader_program_data_cb(GLuint id, void *data, void *userData) { - GLcontext *ctx = (GLcontext *) userData; + struct gl_context *ctx = (struct gl_context *) userData; struct gl_shader_program *shProg = (struct gl_shader_program *) data; if (shProg->Type == GL_SHADER_PROGRAM_MESA) { @@ -220,7 +220,7 @@ free_shader_program_data_cb(GLuint id, void *data, void *userData) static void delete_shader_cb(GLuint id, void *data, void *userData) { - GLcontext *ctx = (GLcontext *) userData; + struct gl_context *ctx = (struct gl_context *) userData; struct gl_shader *sh = (struct gl_shader *) data; if (sh->Type == GL_FRAGMENT_SHADER || sh->Type == GL_VERTEX_SHADER) { ctx->Driver.DeleteShader(ctx, sh); @@ -280,7 +280,7 @@ delete_renderbuffer_cb(GLuint id, void *data, void *userData) * \sa alloc_shared_state(). */ static void -free_shared_state(GLcontext *ctx, struct gl_shared_state *shared) +free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared) { GLuint i; @@ -373,7 +373,7 @@ free_shared_state(GLcontext *ctx, struct gl_shared_state *shared) * \sa free_shared_state(). */ void -_mesa_release_shared_state(GLcontext *ctx, struct gl_shared_state *shared) +_mesa_release_shared_state(struct gl_context *ctx, struct gl_shared_state *shared) { GLint RefCount; diff --git a/src/mesa/main/shared.h b/src/mesa/main/shared.h index 5166a0ce51f..43f8a388e6f 100644 --- a/src/mesa/main/shared.h +++ b/src/mesa/main/shared.h @@ -28,11 +28,11 @@ #include "mtypes.h" struct gl_shared_state * -_mesa_alloc_shared_state(GLcontext *ctx); +_mesa_alloc_shared_state(struct gl_context *ctx); void -_mesa_release_shared_state(GLcontext *ctx, struct gl_shared_state *shared); +_mesa_release_shared_state(struct gl_context *ctx, struct gl_shared_state *shared); #endif diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 4a3dffe4cf8..5529732de07 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -27,7 +27,7 @@ * \file state.c * State management. * - * This file manages recalculation of derived values in GLcontext. + * This file manages recalculation of derived values in struct gl_context. */ @@ -51,7 +51,7 @@ static void -update_separate_specular(GLcontext *ctx) +update_separate_specular(struct gl_context *ctx) { if (NEED_SECONDARY_COLOR(ctx)) ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR; @@ -107,7 +107,7 @@ update_min(GLuint min, struct gl_client_array *array) * Need to do this upon new array state or new buffer object state. */ static void -update_arrays( GLcontext *ctx ) +update_arrays( struct gl_context *ctx ) { struct gl_array_object *arrayObj = ctx->Array.ArrayObj; GLuint i, min = ~0; @@ -219,7 +219,7 @@ update_arrays( GLcontext *ctx ) * This needs to be done before texture state validation. */ static void -update_program_enables(GLcontext *ctx) +update_program_enables(struct gl_context *ctx) { /* These _Enabled flags indicate if the program is enabled AND valid. */ ctx->VertexProgram._Enabled = ctx->VertexProgram.Enabled @@ -245,7 +245,7 @@ update_program_enables(GLcontext *ctx) * or fragment program is being used. */ static GLbitfield -update_program(GLcontext *ctx) +update_program(struct gl_context *ctx) { const struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current; @@ -362,7 +362,7 @@ update_program(GLcontext *ctx) * Examine shader constants and return either _NEW_PROGRAM_CONSTANTS or 0. */ static GLbitfield -update_program_constants(GLcontext *ctx) +update_program_constants(struct gl_context *ctx) { GLbitfield new_state = 0x0; @@ -399,7 +399,7 @@ update_program_constants(GLcontext *ctx) static void -update_viewport_matrix(GLcontext *ctx) +update_viewport_matrix(struct gl_context *ctx) { const GLfloat depthMax = ctx->DrawBuffer->_DepthMaxF; @@ -421,7 +421,7 @@ update_viewport_matrix(GLcontext *ctx) * Update derived multisample state. */ static void -update_multisample(GLcontext *ctx) +update_multisample(struct gl_context *ctx) { ctx->Multisample._Enabled = GL_FALSE; if (ctx->Multisample.Enabled && @@ -435,7 +435,7 @@ update_multisample(GLcontext *ctx) * Update derived color/blend/logicop state. */ static void -update_color(GLcontext *ctx) +update_color(struct gl_context *ctx) { /* This is needed to support 1.1's RGB logic ops AND * 1.0's blending logicops. @@ -449,7 +449,7 @@ update_color(GLcontext *ctx) * in ctx->_TriangleCaps if needed. */ static void -update_polygon(GLcontext *ctx) +update_polygon(struct gl_context *ctx) { ctx->_TriangleCaps &= ~(DD_TRI_CULL_FRONT_BACK | DD_TRI_OFFSET); @@ -471,7 +471,7 @@ update_polygon(GLcontext *ctx) */ #if 0 static void -update_tricaps(GLcontext *ctx, GLbitfield new_state) +update_tricaps(struct gl_context *ctx, GLbitfield new_state) { ctx->_TriangleCaps = 0; @@ -540,7 +540,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state) /** * Compute derived GL state. - * If __GLcontextRec::NewState is non-zero then this function \b must + * If __struct gl_contextRec::NewState is non-zero then this function \b must * be called before rendering anything. * * Calls dd_function_table::UpdateState to perform any internal state @@ -551,7 +551,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state) * _mesa_update_lighting() and _mesa_update_tnl_spaces(). */ void -_mesa_update_state_locked( GLcontext *ctx ) +_mesa_update_state_locked( struct gl_context *ctx ) { GLbitfield new_state = ctx->NewState; GLbitfield prog_flags = _NEW_PROGRAM; @@ -670,7 +670,7 @@ _mesa_update_state_locked( GLcontext *ctx ) /* This is the usual entrypoint for state updates: */ void -_mesa_update_state( GLcontext *ctx ) +_mesa_update_state( struct gl_context *ctx ) { _mesa_lock_context_textures(ctx); _mesa_update_state_locked(ctx); @@ -703,7 +703,7 @@ _mesa_update_state( GLcontext *ctx ) * Otherwise, the fp should track them as state values instead. */ void -_mesa_set_varying_vp_inputs( GLcontext *ctx, +_mesa_set_varying_vp_inputs( struct gl_context *ctx, GLbitfield varying_inputs ) { if (ctx->varying_vp_inputs != varying_inputs) { @@ -721,7 +721,7 @@ _mesa_set_varying_vp_inputs( GLcontext *ctx, * of ordinary varyings/inputs. */ void -_mesa_set_vp_override(GLcontext *ctx, GLboolean flag) +_mesa_set_vp_override(struct gl_context *ctx, GLboolean flag) { if (ctx->VertexProgram._Overriden != flag) { ctx->VertexProgram._Overriden = flag; diff --git a/src/mesa/main/state.h b/src/mesa/main/state.h index 29db08a0b95..f0eb43d8ee3 100644 --- a/src/mesa/main/state.h +++ b/src/mesa/main/state.h @@ -29,21 +29,21 @@ #include "mtypes.h" extern void -_mesa_update_state(GLcontext *ctx); +_mesa_update_state(struct gl_context *ctx); /* As above but can only be called between _mesa_lock_context_textures() and * _mesa_unlock_context_textures(). */ extern void -_mesa_update_state_locked(GLcontext *ctx); +_mesa_update_state_locked(struct gl_context *ctx); extern void -_mesa_set_varying_vp_inputs(GLcontext *ctx, GLbitfield varying_inputs); +_mesa_set_varying_vp_inputs(struct gl_context *ctx, GLbitfield varying_inputs); extern void -_mesa_set_vp_override(GLcontext *ctx, GLboolean flag); +_mesa_set_vp_override(struct gl_context *ctx, GLboolean flag); #endif diff --git a/src/mesa/main/stencil.c b/src/mesa/main/stencil.c index 15c98e20156..93e2e97ce0c 100644 --- a/src/mesa/main/stencil.c +++ b/src/mesa/main/stencil.c @@ -56,7 +56,7 @@ static GLboolean -validate_stencil_op(GLcontext *ctx, GLenum op) +validate_stencil_op(struct gl_context *ctx, GLenum op) { switch (op) { case GL_KEEP: @@ -79,7 +79,7 @@ validate_stencil_op(GLcontext *ctx, GLenum op) static GLboolean -validate_stencil_func(GLcontext *ctx, GLenum func) +validate_stencil_func(struct gl_context *ctx, GLenum func) { switch (func) { case GL_NEVER: @@ -137,7 +137,7 @@ _mesa_ClearStencil( GLint s ) * \sa glStencilFunc(). * * Verifies the parameters and updates the respective values in - * __GLcontextRec::Stencil. On change flushes the vertices and notifies the + * __struct gl_contextRec::Stencil. On change flushes the vertices and notifies the * driver via the dd_function_table::StencilFunc callback. */ void GLAPIENTRY @@ -192,7 +192,7 @@ _mesa_StencilFuncSeparateATI( GLenum frontfunc, GLenum backfunc, GLint ref, GLui * \sa glStencilFunc(). * * Verifies the parameters and updates the respective values in - * __GLcontextRec::Stencil. On change flushes the vertices and notifies the + * __struct gl_contextRec::Stencil. On change flushes the vertices and notifies the * driver via the dd_function_table::StencilFunc callback. */ void GLAPIENTRY @@ -312,7 +312,7 @@ _mesa_StencilMask( GLuint mask ) * \sa glStencilOp(). * * Verifies the parameters and updates the respective fields in - * __GLcontextRec::Stencil. On change flushes the vertices and notifies the + * __struct gl_contextRec::Stencil. On change flushes the vertices and notifies the * driver via the dd_function_table::StencilOp callback. */ void GLAPIENTRY @@ -532,7 +532,7 @@ _mesa_StencilMaskSeparate(GLenum face, GLuint mask) * Update derived stencil state. */ void -_mesa_update_stencil(GLcontext *ctx) +_mesa_update_stencil(struct gl_context *ctx) { const GLint face = ctx->Stencil._BackFace; @@ -556,10 +556,10 @@ _mesa_update_stencil(GLcontext *ctx) * * \param ctx GL context. * - * Initializes __GLcontextRec::Stencil attribute group. + * Initializes __struct gl_contextRec::Stencil attribute group. */ void -_mesa_init_stencil(GLcontext *ctx) +_mesa_init_stencil(struct gl_context *ctx) { ctx->Stencil.Enabled = GL_FALSE; ctx->Stencil.TestTwoSide = GL_FALSE; diff --git a/src/mesa/main/stencil.h b/src/mesa/main/stencil.h index 252ac932acd..38a7183a811 100644 --- a/src/mesa/main/stencil.h +++ b/src/mesa/main/stencil.h @@ -71,10 +71,10 @@ _mesa_StencilMaskSeparate(GLenum face, GLuint mask); extern void -_mesa_update_stencil(GLcontext *ctx); +_mesa_update_stencil(struct gl_context *ctx); extern void -_mesa_init_stencil( GLcontext * ctx ); +_mesa_init_stencil( struct gl_context * ctx ); #endif diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c index ac948cc1efe..2c8bcbeaf7c 100644 --- a/src/mesa/main/syncobj.c +++ b/src/mesa/main/syncobj.c @@ -66,7 +66,7 @@ #include "syncobj.h" static struct gl_sync_object * -_mesa_new_sync_object(GLcontext *ctx, GLenum type) +_mesa_new_sync_object(struct gl_context *ctx, GLenum type) { struct gl_sync_object *s = MALLOC_STRUCT(gl_sync_object); (void) ctx; @@ -77,7 +77,7 @@ _mesa_new_sync_object(GLcontext *ctx, GLenum type) static void -_mesa_delete_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj) +_mesa_delete_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) { (void) ctx; free(syncObj); @@ -85,7 +85,7 @@ _mesa_delete_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj) static void -_mesa_fence_sync(GLcontext *ctx, struct gl_sync_object *syncObj, +_mesa_fence_sync(struct gl_context *ctx, struct gl_sync_object *syncObj, GLenum condition, GLbitfield flags) { (void) ctx; @@ -97,7 +97,7 @@ _mesa_fence_sync(GLcontext *ctx, struct gl_sync_object *syncObj, static void -_mesa_check_sync(GLcontext *ctx, struct gl_sync_object *syncObj) +_mesa_check_sync(struct gl_context *ctx, struct gl_sync_object *syncObj) { (void) ctx; (void) syncObj; @@ -109,7 +109,7 @@ _mesa_check_sync(GLcontext *ctx, struct gl_sync_object *syncObj) static void -_mesa_wait_sync(GLcontext *ctx, struct gl_sync_object *syncObj, +_mesa_wait_sync(struct gl_context *ctx, struct gl_sync_object *syncObj, GLbitfield flags, GLuint64 timeout) { (void) ctx; @@ -155,7 +155,7 @@ _mesa_init_sync_dispatch(struct _glapi_table *disp) * Allocate/init the context state related to sync objects. */ void -_mesa_init_sync(GLcontext *ctx) +_mesa_init_sync(struct gl_context *ctx) { (void) ctx; } @@ -165,7 +165,7 @@ _mesa_init_sync(GLcontext *ctx) * Free the context state related to sync objects. */ void -_mesa_free_sync_data(GLcontext *ctx) +_mesa_free_sync_data(struct gl_context *ctx) { (void) ctx; } @@ -181,7 +181,7 @@ _mesa_validate_sync(struct gl_sync_object *syncObj) void -_mesa_ref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj) +_mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) { _glthread_LOCK_MUTEX(ctx->Shared->Mutex); syncObj->RefCount++; @@ -190,7 +190,7 @@ _mesa_ref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj) void -_mesa_unref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj) +_mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) { _glthread_LOCK_MUTEX(ctx->Shared->Mutex); syncObj->RefCount--; diff --git a/src/mesa/main/syncobj.h b/src/mesa/main/syncobj.h index 82e141d408b..f3c0046cf3d 100644 --- a/src/mesa/main/syncobj.h +++ b/src/mesa/main/syncobj.h @@ -44,16 +44,16 @@ extern void _mesa_init_sync_dispatch(struct _glapi_table *disp); extern void -_mesa_init_sync(GLcontext *); +_mesa_init_sync(struct gl_context *); extern void -_mesa_free_sync_data(GLcontext *); +_mesa_free_sync_data(struct gl_context *); extern void -_mesa_ref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj); +_mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj); extern void -_mesa_unref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj); +_mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj); extern GLboolean GLAPIENTRY _mesa_IsSync(GLsync sync); @@ -89,23 +89,23 @@ _mesa_init_sync_dispatch(struct _glapi_table *disp) } static INLINE void -_mesa_init_sync(GLcontext *ctx) +_mesa_init_sync(struct gl_context *ctx) { } static INLINE void -_mesa_free_sync_data(GLcontext *ctx) +_mesa_free_sync_data(struct gl_context *ctx) { } static INLINE void -_mesa_ref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj) +_mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) { ASSERT_NO_FEATURE(); } static INLINE void -_mesa_unref_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj) +_mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) { ASSERT_NO_FEATURE(); } diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c index e911524cbc5..e3d2a786b3e 100644 --- a/src/mesa/main/texcompress.c +++ b/src/mesa/main/texcompress.c @@ -50,7 +50,7 @@ * \return number of formats. */ GLuint -_mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all) +_mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats, GLboolean all) { GLuint n = 0; if (ctx->Extensions.TDFX_texture_compression_FXT1) { @@ -178,7 +178,7 @@ _mesa_glenum_to_compressed_format(GLenum format) * internal format unchanged. */ GLenum -_mesa_compressed_format_to_glenum(GLcontext *ctx, GLuint mesaFormat) +_mesa_compressed_format_to_glenum(struct gl_context *ctx, GLuint mesaFormat) { switch (mesaFormat) { #if FEATURE_texture_fxt1 diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h index 5e73a3149bd..83856429c54 100644 --- a/src/mesa/main/texcompress.h +++ b/src/mesa/main/texcompress.h @@ -31,13 +31,13 @@ #if _HAVE_FULL_GL extern GLuint -_mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all); +_mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats, GLboolean all); extern gl_format _mesa_glenum_to_compressed_format(GLenum format); extern GLenum -_mesa_compressed_format_to_glenum(GLcontext *ctx, GLuint mesaFormat); +_mesa_compressed_format_to_glenum(struct gl_context *ctx, GLuint mesaFormat); extern GLubyte * _mesa_compressed_image_address(GLint col, GLint row, GLint img, diff --git a/src/mesa/main/texcompress_s3tc.c b/src/mesa/main/texcompress_s3tc.c index 534a4247cf2..0e893a59fa3 100644 --- a/src/mesa/main/texcompress_s3tc.c +++ b/src/mesa/main/texcompress_s3tc.c @@ -104,7 +104,7 @@ static void *dxtlibhandle = NULL; void -_mesa_init_texture_s3tc( GLcontext *ctx ) +_mesa_init_texture_s3tc( struct gl_context *ctx ) { /* called during context initialization */ ctx->Mesa_DXTn = GL_FALSE; diff --git a/src/mesa/main/texcompress_s3tc.h b/src/mesa/main/texcompress_s3tc.h index 2e7688d3669..d0a5b186b71 100644 --- a/src/mesa/main/texcompress_s3tc.h +++ b/src/mesa/main/texcompress_s3tc.h @@ -76,7 +76,7 @@ _mesa_fetch_texel_2d_f_srgba_dxt5(const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel); extern void -_mesa_init_texture_s3tc(GLcontext *ctx); +_mesa_init_texture_s3tc(struct gl_context *ctx); #else /* FEATURE_texture_s3tc */ @@ -97,7 +97,7 @@ _mesa_init_texture_s3tc(GLcontext *ctx); #define _mesa_fetch_texel_2d_f_srgba_dxt5 NULL static INLINE void -_mesa_init_texture_s3tc(GLcontext *ctx) +_mesa_init_texture_s3tc(struct gl_context *ctx) { } diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c index 3a55128c736..508dbf4887d 100644 --- a/src/mesa/main/texenv.c +++ b/src/mesa/main/texenv.c @@ -44,7 +44,7 @@ /** Set texture env mode */ static void -set_env_mode(GLcontext *ctx, +set_env_mode(struct gl_context *ctx, struct gl_texture_unit *texUnit, GLenum mode) { @@ -89,7 +89,7 @@ set_env_mode(GLcontext *ctx, static void -set_env_color(GLcontext *ctx, +set_env_color(struct gl_context *ctx, struct gl_texture_unit *texUnit, const GLfloat *color) { @@ -107,7 +107,7 @@ set_env_color(GLcontext *ctx, /** Set an RGB or A combiner mode/function */ static void -set_combiner_mode(GLcontext *ctx, +set_combiner_mode(struct gl_context *ctx, struct gl_texture_unit *texUnit, GLenum pname, GLenum mode) { @@ -181,7 +181,7 @@ set_combiner_mode(GLcontext *ctx, /** Set an RGB or A combiner source term */ static void -set_combiner_source(GLcontext *ctx, +set_combiner_source(struct gl_context *ctx, struct gl_texture_unit *texUnit, GLenum pname, GLenum param) { @@ -274,7 +274,7 @@ set_combiner_source(GLcontext *ctx, /** Set an RGB or A combiner operand term */ static void -set_combiner_operand(GLcontext *ctx, +set_combiner_operand(struct gl_context *ctx, struct gl_texture_unit *texUnit, GLenum pname, GLenum param) { @@ -360,7 +360,7 @@ set_combiner_operand(GLcontext *ctx, static void -set_combiner_scale(GLcontext *ctx, +set_combiner_scale(struct gl_context *ctx, struct gl_texture_unit *texUnit, GLenum pname, GLfloat scale) { @@ -595,7 +595,7 @@ _mesa_TexEnviv( GLenum target, GLenum pname, const GLint *param ) * \return value of queried pname or -1 if error. */ static GLint -get_texenvi(GLcontext *ctx, const struct gl_texture_unit *texUnit, +get_texenvi(struct gl_context *ctx, const struct gl_texture_unit *texUnit, GLenum pname) { switch (pname) { diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index 20f02cefe94..4647a9c4405 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -62,7 +62,7 @@ struct texenvprog_cache_item }; static GLboolean -texenv_doing_secondary_color(GLcontext *ctx) +texenv_doing_secondary_color(struct gl_context *ctx) { if (ctx->Light.Enabled && (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)) @@ -307,7 +307,7 @@ static GLuint translate_tex_src_bit( GLbitfield bit ) * has access to. The bitmask is later reduced to just those which * are actually referenced. */ -static GLbitfield get_fp_input_mask( GLcontext *ctx ) +static GLbitfield get_fp_input_mask( struct gl_context *ctx ) { /* _NEW_PROGRAM */ const GLboolean vertexShader = (ctx->Shader.CurrentProgram && @@ -407,7 +407,7 @@ static GLbitfield get_fp_input_mask( GLcontext *ctx ) * Examine current texture environment state and generate a unique * key to identify it. */ -static GLuint make_state_key( GLcontext *ctx, struct state_key *key ) +static GLuint make_state_key( struct gl_context *ctx, struct state_key *key ) { GLuint i, j; GLbitfield inputs_referenced = FRAG_BIT_COL0; @@ -663,7 +663,7 @@ static void reserve_temp( struct texenv_fragment_program *p, struct ureg r ) } -static void release_temps(GLcontext *ctx, struct texenv_fragment_program *p ) +static void release_temps(struct gl_context *ctx, struct texenv_fragment_program *p ) { GLuint max_temp = ctx->Const.FragmentProgram.MaxTemps; @@ -1415,7 +1415,7 @@ load_texunit_bumpmap( struct texenv_fragment_program *p, GLuint unit ) * current texture env/combine mode. */ static void -create_new_program(GLcontext *ctx, struct state_key *key, +create_new_program(struct gl_context *ctx, struct state_key *key, struct gl_fragment_program *program) { struct prog_instruction instBuffer[MAX_INSTRUCTIONS]; @@ -1526,7 +1526,7 @@ create_new_program(GLcontext *ctx, struct state_key *key, emit_arith( &p, OPCODE_END, undef, WRITEMASK_XYZW, 0, undef, undef, undef); if (key->fog_enabled) { - /* Pull fog mode from GLcontext, the value in the state key is + /* Pull fog mode from struct gl_context, the value in the state key is * a reduced value and not what is expected in FogOption */ p.program->FogOption = ctx->Fog.Mode; @@ -1590,7 +1590,7 @@ create_new_program(GLcontext *ctx, struct state_key *key, * fixed-function texture, fog and color-sum operations. */ struct gl_fragment_program * -_mesa_get_fixed_func_fragment_program(GLcontext *ctx) +_mesa_get_fixed_func_fragment_program(struct gl_context *ctx) { struct gl_fragment_program *prog; struct state_key key; diff --git a/src/mesa/main/texenvprogram.h b/src/mesa/main/texenvprogram.h index 0a162d2e7a2..abfb916d21b 100644 --- a/src/mesa/main/texenvprogram.h +++ b/src/mesa/main/texenvprogram.h @@ -30,6 +30,6 @@ #include "mtypes.h" extern struct gl_fragment_program * -_mesa_get_fixed_func_fragment_program(GLcontext *ctx); +_mesa_get_fixed_func_fragment_program(struct gl_context *ctx); #endif diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c index 24efb108bb6..894c0130b47 100644 --- a/src/mesa/main/texformat.c +++ b/src/mesa/main/texformat.c @@ -54,7 +54,7 @@ * will typically override this function with a specialized version. */ gl_format -_mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat, +_mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat, GLenum format, GLenum type ) { (void) format; diff --git a/src/mesa/main/texformat.h b/src/mesa/main/texformat.h index bda5fd6d8ce..8bd15076753 100644 --- a/src/mesa/main/texformat.h +++ b/src/mesa/main/texformat.h @@ -32,7 +32,7 @@ extern gl_format -_mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat, +_mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat, GLenum format, GLenum type ); diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 00134ea9ffb..30d1062a415 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -63,7 +63,7 @@ type_with_negative_values(GLenum type) * glGetTexImage for color index pixels. */ static void -get_tex_color_index(GLcontext *ctx, GLuint dimensions, +get_tex_color_index(struct gl_context *ctx, GLuint dimensions, GLenum format, GLenum type, GLvoid *pixels, const struct gl_texture_image *texImage) { @@ -111,7 +111,7 @@ get_tex_color_index(GLcontext *ctx, GLuint dimensions, * glGetTexImage for depth/Z pixels. */ static void -get_tex_depth(GLcontext *ctx, GLuint dimensions, +get_tex_depth(struct gl_context *ctx, GLuint dimensions, GLenum format, GLenum type, GLvoid *pixels, const struct gl_texture_image *texImage) { @@ -141,7 +141,7 @@ get_tex_depth(GLcontext *ctx, GLuint dimensions, * glGetTexImage for depth/stencil pixels. */ static void -get_tex_depth_stencil(GLcontext *ctx, GLuint dimensions, +get_tex_depth_stencil(struct gl_context *ctx, GLuint dimensions, GLenum format, GLenum type, GLvoid *pixels, const struct gl_texture_image *texImage) { @@ -171,7 +171,7 @@ get_tex_depth_stencil(GLcontext *ctx, GLuint dimensions, * glGetTexImage for YCbCr pixels. */ static void -get_tex_ycbcr(GLcontext *ctx, GLuint dimensions, +get_tex_ycbcr(struct gl_context *ctx, GLuint dimensions, GLenum format, GLenum type, GLvoid *pixels, const struct gl_texture_image *texImage) { @@ -234,7 +234,7 @@ linear_to_nonlinear(GLfloat cl) * glGetTexImagefor sRGB pixels; */ static void -get_tex_srgb(GLcontext *ctx, GLuint dimensions, +get_tex_srgb(struct gl_context *ctx, GLuint dimensions, GLenum format, GLenum type, GLvoid *pixels, const struct gl_texture_image *texImage) { @@ -285,7 +285,7 @@ get_tex_srgb(GLcontext *ctx, GLuint dimensions, static INLINE void -get_tex_srgb(GLcontext *ctx, GLuint dimensions, +get_tex_srgb(struct gl_context *ctx, GLuint dimensions, GLenum format, GLenum type, GLvoid *pixels, const struct gl_texture_image *texImage) { @@ -301,7 +301,7 @@ get_tex_srgb(GLcontext *ctx, GLuint dimensions, * This is the slow way since we use texture sampling. */ static void -get_tex_rgba(GLcontext *ctx, GLuint dimensions, +get_tex_rgba(struct gl_context *ctx, GLuint dimensions, GLenum format, GLenum type, GLvoid *pixels, const struct gl_texture_image *texImage) { @@ -371,7 +371,7 @@ get_tex_rgba(GLcontext *ctx, GLuint dimensions, * \return GL_TRUE if done, GL_FALSE otherwise */ static GLboolean -get_tex_memcpy(GLcontext *ctx, GLenum format, GLenum type, GLvoid *pixels, +get_tex_memcpy(struct gl_context *ctx, GLenum format, GLenum type, GLvoid *pixels, const struct gl_texture_object *texObj, const struct gl_texture_image *texImage) { @@ -451,7 +451,7 @@ get_tex_memcpy(GLcontext *ctx, GLenum format, GLenum type, GLvoid *pixels, * The texture image must be mapped. */ void -_mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level, +_mesa_get_teximage(struct gl_context *ctx, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels, struct gl_texture_object *texObj, struct gl_texture_image *texImage) @@ -528,7 +528,7 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level, * All error checking will have been done before this routine is called. */ void -_mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level, +_mesa_get_compressed_teximage(struct gl_context *ctx, GLenum target, GLint level, GLvoid *img, struct gl_texture_object *texObj, struct gl_texture_image *texImage) @@ -585,7 +585,7 @@ _mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level, * \return GL_TRUE if any error, GL_FALSE if no errors. */ static GLboolean -getteximage_error_check(GLcontext *ctx, GLenum target, GLint level, +getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels ) { struct gl_texture_object *texObj; @@ -771,7 +771,7 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format, * \return GL_TRUE if any error, GL_FALSE if no errors. */ static GLboolean -getcompressedteximage_error_check(GLcontext *ctx, GLenum target, GLint level, +getcompressedteximage_error_check(struct gl_context *ctx, GLenum target, GLint level, GLvoid *img) { struct gl_texture_object *texObj; diff --git a/src/mesa/main/texgetimage.h b/src/mesa/main/texgetimage.h index 866ab704945..81a3bbbd9a7 100644 --- a/src/mesa/main/texgetimage.h +++ b/src/mesa/main/texgetimage.h @@ -30,14 +30,14 @@ #include "mtypes.h" extern void -_mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level, +_mesa_get_teximage(struct gl_context *ctx, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels, struct gl_texture_object *texObj, struct gl_texture_image *texImage); extern void -_mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level, +_mesa_get_compressed_teximage(struct gl_context *ctx, GLenum target, GLint level, GLvoid *img, struct gl_texture_object *texObj, struct gl_texture_image *texImage); diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 6c3f49f667b..08f9f5f3f85 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -127,7 +127,7 @@ logbase2( int n ) * XXX this could be static */ GLint -_mesa_base_tex_format( GLcontext *ctx, GLint internalFormat ) +_mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) { switch (internalFormat) { case GL_ALPHA: @@ -558,7 +558,7 @@ _mesa_set_tex_image(struct gl_texture_object *tObj, * zero. */ struct gl_texture_image * -_mesa_new_texture_image( GLcontext *ctx ) +_mesa_new_texture_image( struct gl_context *ctx ) { (void) ctx; return CALLOC_STRUCT(gl_texture_image); @@ -574,7 +574,7 @@ _mesa_new_texture_image( GLcontext *ctx ) * Free the texture image data if it's not marked as client data. */ void -_mesa_free_texture_image_data(GLcontext *ctx, +_mesa_free_texture_image_data(struct gl_context *ctx, struct gl_texture_image *texImage) { (void) ctx; @@ -596,7 +596,7 @@ _mesa_free_texture_image_data(GLcontext *ctx, * Free the texture image structure and the associated image data. */ void -_mesa_delete_texture_image( GLcontext *ctx, struct gl_texture_image *texImage ) +_mesa_delete_texture_image( struct gl_context *ctx, struct gl_texture_image *texImage ) { /* Free texImage->Data and/or any other driver-specific texture * image storage. @@ -646,7 +646,7 @@ _mesa_is_proxy_texture(GLenum target) * \sa gl_texture_unit. */ struct gl_texture_object * -_mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit, +_mesa_select_tex_object(struct gl_context *ctx, const struct gl_texture_unit *texUnit, GLenum target) { switch (target) { @@ -703,7 +703,7 @@ _mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit, * Return pointer to texture object for given target on current texture unit. */ struct gl_texture_object * -_mesa_get_current_tex_object(GLcontext *ctx, GLenum target) +_mesa_get_current_tex_object(struct gl_context *ctx, GLenum target) { struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx); return _mesa_select_tex_object(ctx, texUnit, target); @@ -723,7 +723,7 @@ _mesa_get_current_tex_object(GLcontext *ctx, GLenum target) * \return pointer to the texture image structure, or NULL on failure. */ struct gl_texture_image * -_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_object *texObj, +_mesa_select_tex_image(struct gl_context *ctx, const struct gl_texture_object *texObj, GLenum target, GLint level) { const GLuint face = _mesa_tex_target_to_face(target); @@ -742,7 +742,7 @@ _mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_object *texObj, * out of memory. */ struct gl_texture_image * -_mesa_get_tex_image(GLcontext *ctx, struct gl_texture_object *texObj, +_mesa_get_tex_image(struct gl_context *ctx, struct gl_texture_object *texObj, GLenum target, GLint level) { struct gl_texture_image *texImage; @@ -772,7 +772,7 @@ _mesa_get_tex_image(GLcontext *ctx, struct gl_texture_object *texObj, * level, or out of memory. */ struct gl_texture_image * -_mesa_get_proxy_tex_image(GLcontext *ctx, GLenum target, GLint level) +_mesa_get_proxy_tex_image(struct gl_context *ctx, GLenum target, GLint level) { struct gl_texture_image *texImage; GLuint texIndex; @@ -847,7 +847,7 @@ _mesa_get_proxy_tex_image(GLcontext *ctx, GLenum target, GLint level) * \sa gl_constants. */ GLint -_mesa_max_texture_levels(GLcontext *ctx, GLenum target) +_mesa_max_texture_levels(struct gl_context *ctx, GLenum target) { switch (target) { case GL_TEXTURE_1D: @@ -993,7 +993,7 @@ clear_teximage_fields(struct gl_texture_image *img) * Note: width, height and depth include the border. */ void -_mesa_init_teximage_fields(GLcontext *ctx, GLenum target, +_mesa_init_teximage_fields(struct gl_context *ctx, GLenum target, struct gl_texture_image *img, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum internalFormat) @@ -1084,7 +1084,7 @@ _mesa_init_teximage_fields(GLcontext *ctx, GLenum target, * fields are cleared so that its parent object will test incomplete. */ void -_mesa_clear_texture_image(GLcontext *ctx, struct gl_texture_image *texImage) +_mesa_clear_texture_image(struct gl_context *ctx, struct gl_texture_image *texImage) { ctx->Driver.FreeTexImageData(ctx, texImage); clear_teximage_fields(texImage); @@ -1116,7 +1116,7 @@ _mesa_clear_texture_image(GLcontext *ctx, struct gl_texture_image *texImage) * \return GL_TRUE if the image is acceptable, GL_FALSE if not acceptable. */ GLboolean -_mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level, +_mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLenum format, GLenum type, GLint width, GLint height, GLint depth, GLint border) { @@ -1228,7 +1228,7 @@ _mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level, * Helper function to determine whether a target supports compressed textures */ static GLboolean -target_can_be_compressed(GLcontext *ctx, GLenum target) +target_can_be_compressed(struct gl_context *ctx, GLenum target) { return (((target == GL_TEXTURE_2D || target == GL_PROXY_TEXTURE_2D)) || ((ctx->Extensions.ARB_texture_cube_map && @@ -1259,11 +1259,11 @@ target_can_be_compressed(GLcontext *ctx, GLenum target) * \return GL_TRUE if an error was detected, or GL_FALSE if no errors. * * Verifies each of the parameters against the constants specified in - * __GLcontextRec::Const and the supported extensions, and according to the + * __struct gl_contextRec::Const and the supported extensions, and according to the * OpenGL specification. */ static GLboolean -texture_error_check( GLcontext *ctx, GLenum target, +texture_error_check( struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLenum format, GLenum type, GLuint dimensions, @@ -1506,11 +1506,11 @@ texture_error_check( GLcontext *ctx, GLenum target, * \return GL_TRUE if an error was detected, or GL_FALSE if no errors. * * Verifies each of the parameters against the constants specified in - * __GLcontextRec::Const and the supported extensions, and according to the + * __struct gl_contextRec::Const and the supported extensions, and according to the * OpenGL specification. */ static GLboolean -subtexture_error_check( GLcontext *ctx, GLuint dimensions, +subtexture_error_check( struct gl_context *ctx, GLuint dimensions, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint width, GLint height, GLint depth, @@ -1603,7 +1603,7 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions, * \return GL_TRUE if error recorded, GL_FALSE otherwise */ static GLboolean -subtexture_error_check2( GLcontext *ctx, GLuint dimensions, +subtexture_error_check2( struct gl_context *ctx, GLuint dimensions, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint width, GLint height, GLint depth, @@ -1701,11 +1701,11 @@ subtexture_error_check2( GLcontext *ctx, GLuint dimensions, * \return GL_TRUE if an error was detected, or GL_FALSE if no errors. * * Verifies each of the parameters against the constants specified in - * __GLcontextRec::Const and the supported extensions, and according to the + * __struct gl_contextRec::Const and the supported extensions, and according to the * OpenGL specification. */ static GLboolean -copytexture_error_check( GLcontext *ctx, GLuint dimensions, +copytexture_error_check( struct gl_context *ctx, GLuint dimensions, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint border ) { @@ -1880,7 +1880,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions, * \return GL_TRUE if an error was detected, or GL_FALSE if no errors. */ static GLboolean -copytexsubimage_error_check1( GLcontext *ctx, GLuint dimensions, +copytexsubimage_error_check1( struct gl_context *ctx, GLuint dimensions, GLenum target, GLint level) { /* Check that the source buffer is complete */ @@ -1954,7 +1954,7 @@ copytexsubimage_error_check1( GLcontext *ctx, GLuint dimensions, * \param height image height given by the user. */ static GLboolean -copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions, +copytexsubimage_error_check2( struct gl_context *ctx, GLuint dimensions, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, @@ -2081,7 +2081,7 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions, /** Callback info for walking over FBO hash table */ struct cb_info { - GLcontext *ctx; + struct gl_context *ctx; struct gl_texture_object *texObj; GLuint level, face; }; @@ -2095,7 +2095,7 @@ check_rtt_cb(GLuint key, void *data, void *userData) { struct gl_framebuffer *fb = (struct gl_framebuffer *) data; const struct cb_info *info = (struct cb_info *) userData; - GLcontext *ctx = info->ctx; + struct gl_context *ctx = info->ctx; const struct gl_texture_object *texObj = info->texObj; const GLuint level = info->level, face = info->face; @@ -2127,7 +2127,7 @@ check_rtt_cb(GLuint key, void *data, void *userData) * Any FBOs rendering into the texture must be re-validated. */ static void -update_fbo_texture(GLcontext *ctx, struct gl_texture_object *texObj, +update_fbo_texture(struct gl_context *ctx, struct gl_texture_object *texObj, GLuint face, GLuint level) { /* Only check this texture if it's been marked as RenderToTexture */ @@ -2148,7 +2148,7 @@ update_fbo_texture(GLcontext *ctx, struct gl_texture_object *texObj, * mipmap levels now. */ static INLINE void -check_gen_mipmap(GLcontext *ctx, GLenum target, +check_gen_mipmap(struct gl_context *ctx, GLenum target, struct gl_texture_object *texObj, GLint level) { ASSERT(target != GL_TEXTURE_CUBE_MAP); @@ -2214,7 +2214,7 @@ override_internal_format(GLenum internalFormat, GLint width, GLint height) * comes up during automatic mipmap generation. */ void -_mesa_choose_texture_format(GLcontext *ctx, +_mesa_choose_texture_format(struct gl_context *ctx, struct gl_texture_object *texObj, struct gl_texture_image *texImage, GLenum target, GLint level, @@ -3158,7 +3158,7 @@ get_compressed_block_size(GLenum glformat, GLuint *bw, GLuint *bh) * \return error code or GL_NO_ERROR. */ static GLenum -compressed_texture_error_check(GLcontext *ctx, GLint dimensions, +compressed_texture_error_check(struct gl_context *ctx, GLint dimensions, GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, @@ -3265,7 +3265,7 @@ compressed_texture_error_check(GLcontext *ctx, GLint dimensions, * \return error code or GL_NO_ERROR. */ static GLenum -compressed_subtexture_error_check(GLcontext *ctx, GLint dimensions, +compressed_subtexture_error_check(struct gl_context *ctx, GLint dimensions, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, @@ -3349,7 +3349,7 @@ compressed_subtexture_error_check(GLcontext *ctx, GLint dimensions, * \return GL_TRUE if error found, GL_FALSE otherwise. */ static GLboolean -compressed_subtexture_error_check2(GLcontext *ctx, GLuint dims, +compressed_subtexture_error_check2(struct gl_context *ctx, GLuint dims, GLsizei width, GLsizei height, GLsizei depth, GLenum format, struct gl_texture_image *texImage) diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h index 0dcacab3cd0..d4317c301b7 100644 --- a/src/mesa/main/teximage.h +++ b/src/mesa/main/teximage.h @@ -46,7 +46,7 @@ _mesa_free_texmemory(void *m); /*@{*/ extern GLint -_mesa_base_tex_format( GLcontext *ctx, GLint internalFormat ); +_mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ); extern GLboolean @@ -54,26 +54,26 @@ _mesa_is_proxy_texture(GLenum target); extern struct gl_texture_image * -_mesa_new_texture_image( GLcontext *ctx ); +_mesa_new_texture_image( struct gl_context *ctx ); extern void -_mesa_delete_texture_image( GLcontext *ctx, struct gl_texture_image *teximage ); +_mesa_delete_texture_image( struct gl_context *ctx, struct gl_texture_image *teximage ); extern void -_mesa_free_texture_image_data( GLcontext *ctx, +_mesa_free_texture_image_data( struct gl_context *ctx, struct gl_texture_image *texImage ); extern void -_mesa_init_teximage_fields(GLcontext *ctx, GLenum target, +_mesa_init_teximage_fields(struct gl_context *ctx, GLenum target, struct gl_texture_image *img, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum internalFormat); extern void -_mesa_choose_texture_format(GLcontext *ctx, +_mesa_choose_texture_format(struct gl_context *ctx, struct gl_texture_object *texObj, struct gl_texture_image *texImage, GLenum target, GLint level, @@ -81,7 +81,7 @@ _mesa_choose_texture_format(GLcontext *ctx, extern void -_mesa_clear_texture_image(GLcontext *ctx, struct gl_texture_image *texImage); +_mesa_clear_texture_image(struct gl_context *ctx, struct gl_texture_image *texImage); extern void @@ -91,33 +91,33 @@ _mesa_set_tex_image(struct gl_texture_object *tObj, extern struct gl_texture_object * -_mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit, +_mesa_select_tex_object(struct gl_context *ctx, const struct gl_texture_unit *texUnit, GLenum target); extern struct gl_texture_object * -_mesa_get_current_tex_object(GLcontext *ctx, GLenum target); +_mesa_get_current_tex_object(struct gl_context *ctx, GLenum target); extern struct gl_texture_image * -_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_object *texObj, +_mesa_select_tex_image(struct gl_context *ctx, const struct gl_texture_object *texObj, GLenum target, GLint level); extern struct gl_texture_image * -_mesa_get_tex_image(GLcontext *ctx, struct gl_texture_object *texObj, +_mesa_get_tex_image(struct gl_context *ctx, struct gl_texture_object *texObj, GLenum target, GLint level); extern struct gl_texture_image * -_mesa_get_proxy_tex_image(GLcontext *ctx, GLenum target, GLint level); +_mesa_get_proxy_tex_image(struct gl_context *ctx, GLenum target, GLint level); extern GLint -_mesa_max_texture_levels(GLcontext *ctx, GLenum target); +_mesa_max_texture_levels(struct gl_context *ctx, GLenum target); extern GLboolean -_mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level, +_mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLenum format, GLenum type, GLint width, GLint height, GLint depth, GLint border); @@ -130,7 +130,7 @@ _mesa_tex_target_to_face(GLenum target); * Lock a texture for updating. See also _mesa_lock_context_textures(). */ static INLINE void -_mesa_lock_texture(GLcontext *ctx, struct gl_texture_object *texObj) +_mesa_lock_texture(struct gl_context *ctx, struct gl_texture_object *texObj) { _glthread_LOCK_MUTEX(ctx->Shared->TexMutex); ctx->Shared->TextureStateStamp++; @@ -138,7 +138,7 @@ _mesa_lock_texture(GLcontext *ctx, struct gl_texture_object *texObj) } static INLINE void -_mesa_unlock_texture(GLcontext *ctx, struct gl_texture_object *texObj) +_mesa_unlock_texture(struct gl_context *ctx, struct gl_texture_object *texObj) { _glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex); } diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 1fedc870285..e08df0f7fed 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -53,7 +53,7 @@ * Return the gl_texture_object for a given ID. */ struct gl_texture_object * -_mesa_lookup_texture(GLcontext *ctx, GLuint id) +_mesa_lookup_texture(struct gl_context *ctx, GLuint id) { return (struct gl_texture_object *) _mesa_HashLookup(ctx->Shared->TexObjects, id); @@ -77,7 +77,7 @@ _mesa_lookup_texture(GLcontext *ctx, GLuint id) * \return pointer to new texture object. */ struct gl_texture_object * -_mesa_new_texture_object( GLcontext *ctx, GLuint name, GLenum target ) +_mesa_new_texture_object( struct gl_context *ctx, GLuint name, GLenum target ) { struct gl_texture_object *obj; (void) ctx; @@ -149,7 +149,7 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj, * target it's getting bound to (GL_TEXTURE_1D/2D/etc). */ static void -finish_texture_init(GLcontext *ctx, GLenum target, +finish_texture_init(struct gl_context *ctx, GLenum target, struct gl_texture_object *obj) { assert(obj->Target == 0); @@ -181,7 +181,7 @@ finish_texture_init(GLcontext *ctx, GLenum target, * \param texObj the texture object to delete. */ void -_mesa_delete_texture_object( GLcontext *ctx, struct gl_texture_object *texObj ) +_mesa_delete_texture_object( struct gl_context *ctx, struct gl_texture_object *texObj ) { GLuint i, face; @@ -265,7 +265,7 @@ _mesa_copy_texture_object( struct gl_texture_object *dest, * \sa _mesa_clear_texture_image(). */ void -_mesa_clear_texture_object(GLcontext *ctx, struct gl_texture_object *texObj) +_mesa_clear_texture_object(struct gl_context *ctx, struct gl_texture_object *texObj) { GLuint i, j; @@ -404,7 +404,7 @@ incomplete(const struct gl_texture_object *t, const char *why) * present and has the expected size. */ void -_mesa_test_texobj_completeness( const GLcontext *ctx, +_mesa_test_texobj_completeness( const struct gl_context *ctx, struct gl_texture_object *t ) { const GLint baseLevel = t->BaseLevel; @@ -696,7 +696,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx, * \param invalidate_state also invalidate context state. */ void -_mesa_dirty_texobj(GLcontext *ctx, struct gl_texture_object *texObj, +_mesa_dirty_texobj(struct gl_context *ctx, struct gl_texture_object *texObj, GLboolean invalidate_state) { texObj->_Complete = GL_FALSE; @@ -712,7 +712,7 @@ _mesa_dirty_texobj(GLcontext *ctx, struct gl_texture_object *texObj, * incomplete texture. */ struct gl_texture_object * -_mesa_get_fallback_texture(GLcontext *ctx) +_mesa_get_fallback_texture(struct gl_context *ctx) { if (!ctx->Shared->FallbackTex) { /* create fallback texture now */ @@ -830,7 +830,7 @@ _mesa_GenTextures( GLsizei n, GLuint *textures ) * read framebuffer. If so, Unbind it. */ static void -unbind_texobj_from_fbo(GLcontext *ctx, struct gl_texture_object *texObj) +unbind_texobj_from_fbo(struct gl_context *ctx, struct gl_texture_object *texObj) { const GLuint n = (ctx->DrawBuffer == ctx->ReadBuffer) ? 1 : 2; GLuint i; @@ -855,7 +855,7 @@ unbind_texobj_from_fbo(GLcontext *ctx, struct gl_texture_object *texObj) * unbind it if so (revert to default textures). */ static void -unbind_texobj_from_texunits(GLcontext *ctx, struct gl_texture_object *texObj) +unbind_texobj_from_texunits(struct gl_context *ctx, struct gl_texture_object *texObj) { GLuint u, tex; @@ -1214,7 +1214,7 @@ _mesa_IsTexture( GLuint texture ) * See also _mesa_lock/unlock_texture() in teximage.h */ void -_mesa_lock_context_textures( GLcontext *ctx ) +_mesa_lock_context_textures( struct gl_context *ctx ) { _glthread_LOCK_MUTEX(ctx->Shared->TexMutex); @@ -1226,7 +1226,7 @@ _mesa_lock_context_textures( GLcontext *ctx ) void -_mesa_unlock_context_textures( GLcontext *ctx ) +_mesa_unlock_context_textures( struct gl_context *ctx ) { assert(ctx->Shared->TextureStateStamp == ctx->TextureStateTimestamp); _glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex); diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h index 9bfebd45c81..821b35caa36 100644 --- a/src/mesa/main/texobj.h +++ b/src/mesa/main/texobj.h @@ -41,45 +41,45 @@ /*@{*/ extern struct gl_texture_object * -_mesa_lookup_texture(GLcontext *ctx, GLuint id); +_mesa_lookup_texture(struct gl_context *ctx, GLuint id); extern struct gl_texture_object * -_mesa_new_texture_object( GLcontext *ctx, GLuint name, GLenum target ); +_mesa_new_texture_object( struct gl_context *ctx, GLuint name, GLenum target ); extern void _mesa_initialize_texture_object( struct gl_texture_object *obj, GLuint name, GLenum target ); extern void -_mesa_delete_texture_object( GLcontext *ctx, struct gl_texture_object *obj ); +_mesa_delete_texture_object( struct gl_context *ctx, struct gl_texture_object *obj ); extern void _mesa_copy_texture_object( struct gl_texture_object *dest, const struct gl_texture_object *src ); extern void -_mesa_clear_texture_object(GLcontext *ctx, struct gl_texture_object *obj); +_mesa_clear_texture_object(struct gl_context *ctx, struct gl_texture_object *obj); extern void _mesa_reference_texobj(struct gl_texture_object **ptr, struct gl_texture_object *tex); extern void -_mesa_test_texobj_completeness( const GLcontext *ctx, +_mesa_test_texobj_completeness( const struct gl_context *ctx, struct gl_texture_object *obj ); extern void -_mesa_dirty_texobj(GLcontext *ctx, struct gl_texture_object *texObj, +_mesa_dirty_texobj(struct gl_context *ctx, struct gl_texture_object *texObj, GLboolean invalidate_state); extern struct gl_texture_object * -_mesa_get_fallback_texture(GLcontext *ctx); +_mesa_get_fallback_texture(struct gl_context *ctx); extern void -_mesa_unlock_context_textures( GLcontext *ctx ); +_mesa_unlock_context_textures( struct gl_context *ctx ); extern void -_mesa_lock_context_textures( GLcontext *ctx ); +_mesa_lock_context_textures( struct gl_context *ctx ); /*@}*/ diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index e96ace73403..d5c83de97f7 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -47,7 +47,7 @@ * \return GL_TRUE if legal, GL_FALSE otherwise */ static GLboolean -validate_texture_wrap_mode(GLcontext * ctx, GLenum target, GLenum wrap) +validate_texture_wrap_mode(struct gl_context * ctx, GLenum target, GLenum wrap) { const struct gl_extensions * const e = & ctx->Extensions; @@ -83,7 +83,7 @@ validate_texture_wrap_mode(GLcontext * ctx, GLenum target, GLenum wrap) * Only the glGetTexLevelParameter() functions accept proxy targets. */ static struct gl_texture_object * -get_texobj(GLcontext *ctx, GLenum target, GLboolean get) +get_texobj(struct gl_context *ctx, GLenum target, GLboolean get) { struct gl_texture_unit *texUnit; @@ -178,7 +178,7 @@ set_swizzle_component(GLuint *swizzle, GLuint comp, GLuint swz) * per-texture derived state gets recomputed. */ static INLINE void -flush(GLcontext *ctx, struct gl_texture_object *texObj) +flush(struct gl_context *ctx, struct gl_texture_object *texObj) { FLUSH_VERTICES(ctx, _NEW_TEXTURE); texObj->_Complete = GL_FALSE; @@ -190,7 +190,7 @@ flush(GLcontext *ctx, struct gl_texture_object *texObj) * \return GL_TRUE if legal AND the value changed, GL_FALSE otherwise */ static GLboolean -set_tex_parameteri(GLcontext *ctx, +set_tex_parameteri(struct gl_context *ctx, struct gl_texture_object *texObj, GLenum pname, const GLint *params) { @@ -430,7 +430,7 @@ set_tex_parameteri(GLcontext *ctx, * \return GL_TRUE if legal AND the value changed, GL_FALSE otherwise */ static GLboolean -set_tex_parameterf(GLcontext *ctx, +set_tex_parameterf(struct gl_context *ctx, struct gl_texture_object *texObj, GLenum pname, const GLfloat *params) { diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c index c68105b3951..8961b926487 100644 --- a/src/mesa/main/texrender.c +++ b/src/mesa/main/texrender.c @@ -31,7 +31,7 @@ struct texture_renderbuffer * Get row of values from the renderbuffer that wraps a texture image. */ static void -texture_get_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, void *values) { const struct texture_renderbuffer *trb @@ -100,7 +100,7 @@ texture_get_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -texture_get_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], void *values) { const struct texture_renderbuffer *trb @@ -167,7 +167,7 @@ texture_get_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, * Put row of values into a renderbuffer that wraps a texture image. */ static void -texture_put_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +texture_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { const struct texture_renderbuffer *trb @@ -229,7 +229,7 @@ texture_put_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, * Put row of RGB values into a renderbuffer that wraps a texture image. */ static void -texture_put_row_rgb(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +texture_put_row_rgb(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { const struct texture_renderbuffer *trb @@ -289,7 +289,7 @@ texture_put_row_rgb(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -texture_put_mono_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +texture_put_mono_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask) { const struct texture_renderbuffer *trb @@ -348,7 +348,7 @@ texture_put_mono_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -texture_put_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, +texture_put_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *values, const GLubyte *mask) { @@ -407,7 +407,7 @@ texture_put_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, static void -texture_put_mono_values(GLcontext *ctx, struct gl_renderbuffer *rb, +texture_put_mono_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask) { @@ -486,7 +486,7 @@ delete_texture_wrapper(struct gl_renderbuffer *rb) * This allows rendering into the texture as if it were a renderbuffer. */ static void -wrap_texture(GLcontext *ctx, struct gl_renderbuffer_attachment *att) +wrap_texture(struct gl_context *ctx, struct gl_renderbuffer_attachment *att) { struct texture_renderbuffer *trb; const GLuint name = 0; @@ -525,7 +525,7 @@ wrap_texture(GLcontext *ctx, struct gl_renderbuffer_attachment *att) * update the internal format info, etc. */ static void -update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att) +update_wrapper(struct gl_context *ctx, const struct gl_renderbuffer_attachment *att) { struct texture_renderbuffer *trb = (struct texture_renderbuffer *) att->Renderbuffer; @@ -609,7 +609,7 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att) * \sa _mesa_framebuffer_renderbuffer */ void -_mesa_render_texture(GLcontext *ctx, +_mesa_render_texture(struct gl_context *ctx, struct gl_framebuffer *fb, struct gl_renderbuffer_attachment *att) { @@ -623,7 +623,7 @@ _mesa_render_texture(GLcontext *ctx, void -_mesa_finish_render_texture(GLcontext *ctx, +_mesa_finish_render_texture(struct gl_context *ctx, struct gl_renderbuffer_attachment *att) { /* do nothing */ diff --git a/src/mesa/main/texrender.h b/src/mesa/main/texrender.h index 1e87d594a28..5e68fb03b57 100644 --- a/src/mesa/main/texrender.h +++ b/src/mesa/main/texrender.h @@ -4,12 +4,12 @@ #include "mtypes.h" extern void -_mesa_render_texture(GLcontext *ctx, +_mesa_render_texture(struct gl_context *ctx, struct gl_framebuffer *fb, struct gl_renderbuffer_attachment *att); extern void -_mesa_finish_render_texture(GLcontext *ctx, +_mesa_finish_render_texture(struct gl_context *ctx, struct gl_renderbuffer_attachment *att); diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 30c978c1cdd..1b0d760fae5 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -63,7 +63,7 @@ static const struct gl_tex_env_combine_state default_combine_state = { * Used by glXCopyContext to copy texture state from one context to another. */ void -_mesa_copy_texture_state( const GLcontext *src, GLcontext *dst ) +_mesa_copy_texture_state( const struct gl_context *src, struct gl_context *dst ) { GLuint u, tex; @@ -119,7 +119,7 @@ _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst ) * For debugging */ void -_mesa_print_texunit_state( GLcontext *ctx, GLuint unit ) +_mesa_print_texunit_state( struct gl_context *ctx, GLuint unit ) { const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit; printf("Texture Unit %d\n", unit); @@ -363,7 +363,7 @@ _mesa_ClientActiveTextureARB(GLenum texture) * \param ctx GL context. */ static void -update_texture_matrices( GLcontext *ctx ) +update_texture_matrices( struct gl_context *ctx ) { GLuint u; @@ -386,7 +386,7 @@ update_texture_matrices( GLcontext *ctx ) * Examine texture unit's combine/env state to update derived state. */ static void -update_tex_combine(GLcontext *ctx, struct gl_texture_unit *texUnit) +update_tex_combine(struct gl_context *ctx, struct gl_texture_unit *texUnit) { struct gl_tex_env_combine_state *combine; @@ -489,7 +489,7 @@ update_tex_combine(GLcontext *ctx, struct gl_texture_unit *texUnit) * \param ctx GL context. */ static void -update_texture_state( GLcontext *ctx ) +update_texture_state( struct gl_context *ctx ) { GLuint unit; struct gl_fragment_program *fprog = NULL; @@ -653,7 +653,7 @@ update_texture_state( GLcontext *ctx ) * Update texture-related derived state. */ void -_mesa_update_texture( GLcontext *ctx, GLuint new_state ) +_mesa_update_texture( struct gl_context *ctx, GLuint new_state ) { if (new_state & _NEW_TEXTURE_MATRIX) update_texture_matrices( ctx ); @@ -678,7 +678,7 @@ _mesa_update_texture( GLcontext *ctx, GLuint new_state ) * GL_FALSE. */ static GLboolean -alloc_proxy_textures( GLcontext *ctx ) +alloc_proxy_textures( struct gl_context *ctx ) { static const GLenum targets[] = { GL_TEXTURE_1D, @@ -716,7 +716,7 @@ alloc_proxy_textures( GLcontext *ctx ) * \param unit texture unit number to be initialized. */ static void -init_texture_unit( GLcontext *ctx, GLuint unit ) +init_texture_unit( struct gl_context *ctx, GLuint unit ) { struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; GLuint tex; @@ -764,7 +764,7 @@ init_texture_unit( GLcontext *ctx, GLuint unit ) * Initialize texture state for the given context. */ GLboolean -_mesa_init_texture(GLcontext *ctx) +_mesa_init_texture(struct gl_context *ctx) { GLuint u; @@ -796,7 +796,7 @@ _mesa_init_texture(GLcontext *ctx) * Free dynamically-allocted texture data attached to the given context. */ void -_mesa_free_texture_data(GLcontext *ctx) +_mesa_free_texture_data(struct gl_context *ctx) { GLuint u, tgt; @@ -825,7 +825,7 @@ _mesa_free_texture_data(GLcontext *ctx) * shared state. */ void -_mesa_update_default_objects_texture(GLcontext *ctx) +_mesa_update_default_objects_texture(struct gl_context *ctx) { GLuint u, tex; diff --git a/src/mesa/main/texstate.h b/src/mesa/main/texstate.h index 912cb677985..987123036a6 100644 --- a/src/mesa/main/texstate.h +++ b/src/mesa/main/texstate.h @@ -41,7 +41,7 @@ * This the texture unit set by glActiveTexture(), not glClientActiveTexture(). */ static INLINE struct gl_texture_unit * -_mesa_get_current_tex_unit(GLcontext *ctx) +_mesa_get_current_tex_unit(struct gl_context *ctx) { ASSERT(ctx->Texture.CurrentUnit < Elements(ctx->Texture.Unit)); return &(ctx->Texture.Unit[ctx->Texture.CurrentUnit]); @@ -49,10 +49,10 @@ _mesa_get_current_tex_unit(GLcontext *ctx) extern void -_mesa_copy_texture_state( const GLcontext *src, GLcontext *dst ); +_mesa_copy_texture_state( const struct gl_context *src, struct gl_context *dst ); extern void -_mesa_print_texunit_state( GLcontext *ctx, GLuint unit ); +_mesa_print_texunit_state( struct gl_context *ctx, GLuint unit ); @@ -76,16 +76,16 @@ _mesa_ClientActiveTextureARB( GLenum target ); /*@{*/ extern void -_mesa_update_texture( GLcontext *ctx, GLuint new_state ); +_mesa_update_texture( struct gl_context *ctx, GLuint new_state ); extern GLboolean -_mesa_init_texture( GLcontext *ctx ); +_mesa_init_texture( struct gl_context *ctx ); extern void -_mesa_free_texture_data( GLcontext *ctx ); +_mesa_free_texture_data( struct gl_context *ctx ); extern void -_mesa_update_default_objects_texture(GLcontext *ctx); +_mesa_update_default_objects_texture(struct gl_context *ctx); /*@}*/ diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index cc902bcb1a6..f5f94bbf1a4 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -307,7 +307,7 @@ compute_component_mapping(GLenum inFormat, GLenum outFormat, * \return resulting image with format = textureBaseFormat and type = GLfloat. */ static GLfloat * -make_temp_float_image(GLcontext *ctx, GLuint dims, +make_temp_float_image(struct gl_context *ctx, GLuint dims, GLenum logicalBaseFormat, GLenum textureBaseFormat, GLint srcWidth, GLint srcHeight, GLint srcDepth, @@ -440,7 +440,7 @@ make_temp_float_image(GLcontext *ctx, GLuint dims, * \return resulting image with format = textureBaseFormat and type = GLchan. */ GLchan * -_mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims, +_mesa_make_temp_chan_image(struct gl_context *ctx, GLuint dims, GLenum logicalBaseFormat, GLenum textureBaseFormat, GLint srcWidth, GLint srcHeight, GLint srcDepth, @@ -725,7 +725,7 @@ byteswap_mapping( GLboolean swapBytes, * Transfer a GLubyte texture image with component swizzling. */ static void -_mesa_swizzle_ubyte_image(GLcontext *ctx, +_mesa_swizzle_ubyte_image(struct gl_context *ctx, GLuint dimensions, GLenum srcFormat, GLenum srcType, @@ -812,7 +812,7 @@ _mesa_swizzle_ubyte_image(GLcontext *ctx, * 1D, 2D and 3D images supported. */ static void -memcpy_texture(GLcontext *ctx, +memcpy_texture(struct gl_context *ctx, GLuint dimensions, gl_format dstFormat, GLvoid *dstAddr, @@ -3939,7 +3939,7 @@ _mesa_texstore(TEXSTORE_PARAMS) * The caller _must_ call _mesa_unmap_teximage_pbo() too! */ const GLvoid * -_mesa_validate_pbo_teximage(GLcontext *ctx, GLuint dimensions, +_mesa_validate_pbo_teximage(struct gl_context *ctx, GLuint dimensions, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *unpack, @@ -3976,7 +3976,7 @@ _mesa_validate_pbo_teximage(GLcontext *ctx, GLuint dimensions, * The caller _must_ call _mesa_unmap_teximage_pbo() too! */ const GLvoid * -_mesa_validate_pbo_compressed_teximage(GLcontext *ctx, +_mesa_validate_pbo_compressed_teximage(struct gl_context *ctx, GLsizei imageSize, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, const char *funcName) @@ -4010,7 +4010,7 @@ _mesa_validate_pbo_compressed_teximage(GLcontext *ctx, * functions. It unmaps the PBO buffer if it was mapped earlier. */ void -_mesa_unmap_teximage_pbo(GLcontext *ctx, +_mesa_unmap_teximage_pbo(struct gl_context *ctx, const struct gl_pixelstore_attrib *unpack) { if (_mesa_is_bufferobj(unpack->BufferObj)) { @@ -4047,7 +4047,7 @@ texture_row_stride(const struct gl_texture_image *texImage) * \sa _mesa_store_teximage2d() */ void -_mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_teximage1d(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint border, GLenum format, GLenum type, const GLvoid *pixels, @@ -4101,7 +4101,7 @@ _mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level, * than VRAM. Device driver's can easily plug in their own replacement. */ void -_mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_teximage2d(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint border, GLenum format, GLenum type, const void *pixels, @@ -4154,7 +4154,7 @@ _mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level, * \sa _mesa_store_teximage2d() */ void -_mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_teximage3d(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint depth, GLint border, GLenum format, GLenum type, const void *pixels, @@ -4207,7 +4207,7 @@ _mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level, * and Driver.CopyTexSubImage1D(). */ void -_mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_texsubimage1d(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint width, GLenum format, GLenum type, const void *pixels, const struct gl_pixelstore_attrib *packing, @@ -4245,7 +4245,7 @@ _mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level, * and Driver.CopyTexSubImage2D(). */ void -_mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_texsubimage2d(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint width, GLint height, GLenum format, GLenum type, const void *pixels, @@ -4283,7 +4283,7 @@ _mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level, * and Driver.CopyTexSubImage3D(). */ void -_mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_texsubimage3d(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint width, GLint height, GLint depth, GLenum format, GLenum type, const void *pixels, @@ -4321,7 +4321,7 @@ _mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level, * Fallback for Driver.CompressedTexImage1D() */ void -_mesa_store_compressed_teximage1d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_compressed_teximage1d(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint border, GLsizei imageSize, const GLvoid *data, @@ -4344,7 +4344,7 @@ _mesa_store_compressed_teximage1d(GLcontext *ctx, GLenum target, GLint level, * Fallback for Driver.CompressedTexImage2D() */ void -_mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_compressed_teximage2d(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint border, GLsizei imageSize, const GLvoid *data, @@ -4388,7 +4388,7 @@ _mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level, * Fallback for Driver.CompressedTexImage3D() */ void -_mesa_store_compressed_teximage3d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_compressed_teximage3d(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint depth, GLint border, @@ -4413,7 +4413,7 @@ _mesa_store_compressed_teximage3d(GLcontext *ctx, GLenum target, GLint level, * Fallback for Driver.CompressedTexSubImage1D() */ void -_mesa_store_compressed_texsubimage1d(GLcontext *ctx, GLenum target, +_mesa_store_compressed_texsubimage1d(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, @@ -4436,7 +4436,7 @@ _mesa_store_compressed_texsubimage1d(GLcontext *ctx, GLenum target, * Fallback for Driver.CompressedTexSubImage2D() */ void -_mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target, +_mesa_store_compressed_texsubimage2d(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, @@ -4497,7 +4497,7 @@ _mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target, * Fallback for Driver.CompressedTexSubImage3D() */ void -_mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target, +_mesa_store_compressed_texsubimage3d(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h index 3211086dd63..177ede423f5 100644 --- a/src/mesa/main/texstore.h +++ b/src/mesa/main/texstore.h @@ -56,7 +56,7 @@ * \param srcPacking source image packing parameters */ #define TEXSTORE_PARAMS \ - GLcontext *ctx, GLuint dims, \ + struct gl_context *ctx, GLuint dims, \ GLenum baseInternalFormat, \ gl_format dstFormat, \ GLvoid *dstAddr, \ @@ -73,7 +73,7 @@ _mesa_texstore(TEXSTORE_PARAMS); extern GLchan * -_mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims, +_mesa_make_temp_chan_image(struct gl_context *ctx, GLuint dims, GLenum logicalBaseFormat, GLenum textureBaseFormat, GLint srcWidth, GLint srcHeight, GLint srcDepth, @@ -83,7 +83,7 @@ _mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims, extern void -_mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_teximage1d(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint border, GLenum format, GLenum type, const GLvoid *pixels, @@ -93,7 +93,7 @@ _mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level, extern void -_mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_teximage2d(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint border, GLenum format, GLenum type, const GLvoid *pixels, @@ -103,7 +103,7 @@ _mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level, extern void -_mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_teximage3d(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels, @@ -113,7 +113,7 @@ _mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level, extern void -_mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_texsubimage1d(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint width, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, @@ -122,7 +122,7 @@ _mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level, extern void -_mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_texsubimage2d(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint width, GLint height, GLenum format, GLenum type, const GLvoid *pixels, @@ -132,7 +132,7 @@ _mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level, extern void -_mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_texsubimage3d(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint width, GLint height, GLint depth, GLenum format, GLenum type, const GLvoid *pixels, @@ -142,7 +142,7 @@ _mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level, extern void -_mesa_store_compressed_teximage1d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_compressed_teximage1d(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint border, GLsizei imageSize, const GLvoid *data, @@ -150,7 +150,7 @@ _mesa_store_compressed_teximage1d(GLcontext *ctx, GLenum target, GLint level, struct gl_texture_image *texImage); extern void -_mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_compressed_teximage2d(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint border, GLsizei imageSize, const GLvoid *data, @@ -158,7 +158,7 @@ _mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level, struct gl_texture_image *texImage); extern void -_mesa_store_compressed_teximage3d(GLcontext *ctx, GLenum target, GLint level, +_mesa_store_compressed_teximage3d(struct gl_context *ctx, GLenum target, GLint level, GLint internalFormat, GLint width, GLint height, GLint depth, GLint border, @@ -168,7 +168,7 @@ _mesa_store_compressed_teximage3d(GLcontext *ctx, GLenum target, GLint level, extern void -_mesa_store_compressed_texsubimage1d(GLcontext *ctx, GLenum target, +_mesa_store_compressed_texsubimage1d(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, @@ -177,7 +177,7 @@ _mesa_store_compressed_texsubimage1d(GLcontext *ctx, GLenum target, struct gl_texture_image *texImage); extern void -_mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target, +_mesa_store_compressed_texsubimage2d(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, @@ -187,7 +187,7 @@ _mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target, struct gl_texture_image *texImage); extern void -_mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target, +_mesa_store_compressed_texsubimage3d(struct gl_context *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, @@ -198,20 +198,20 @@ _mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target, extern const GLvoid * -_mesa_validate_pbo_teximage(GLcontext *ctx, GLuint dimensions, +_mesa_validate_pbo_teximage(struct gl_context *ctx, GLuint dimensions, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *unpack, const char *funcName); extern const GLvoid * -_mesa_validate_pbo_compressed_teximage(GLcontext *ctx, +_mesa_validate_pbo_compressed_teximage(struct gl_context *ctx, GLsizei imageSize, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing, const char *funcName); extern void -_mesa_unmap_teximage_pbo(GLcontext *ctx, +_mesa_unmap_teximage_pbo(struct gl_context *ctx, const struct gl_pixelstore_attrib *unpack); diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index 5c8c1fd225f..d297b5ed712 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -95,7 +95,7 @@ reference_transform_feedback_object(struct gl_transform_feedback_object **ptr, * \return GL_TRUE if the mode is OK, GL_FALSE otherwise. */ GLboolean -_mesa_validate_primitive_mode(GLcontext *ctx, GLenum mode) +_mesa_validate_primitive_mode(struct gl_context *ctx, GLenum mode) { if (ctx->TransformFeedback.CurrentObject->Active) { switch (mode) { @@ -120,7 +120,7 @@ _mesa_validate_primitive_mode(GLcontext *ctx, GLenum mode) * \return GL_TRUE for success, GL_FALSE if error */ GLboolean -_mesa_validate_transform_feedback_buffers(GLcontext *ctx) +_mesa_validate_transform_feedback_buffers(struct gl_context *ctx) { /* XXX to do */ return GL_TRUE; @@ -132,7 +132,7 @@ _mesa_validate_transform_feedback_buffers(GLcontext *ctx) * Per-context init for transform feedback. */ void -_mesa_init_transform_feedback(GLcontext *ctx) +_mesa_init_transform_feedback(struct gl_context *ctx) { /* core mesa expects this, even a dummy one, to be available */ ASSERT(ctx->Driver.NewTransformFeedback); @@ -162,7 +162,7 @@ _mesa_init_transform_feedback(GLcontext *ctx) static void delete_cb(GLuint key, void *data, void *userData) { - GLcontext *ctx = (GLcontext *) userData; + struct gl_context *ctx = (struct gl_context *) userData; struct gl_transform_feedback_object *obj = (struct gl_transform_feedback_object *) data; @@ -174,7 +174,7 @@ delete_cb(GLuint key, void *data, void *userData) * Per-context free/clean-up for transform feedback. */ void -_mesa_free_transform_feedback(GLcontext *ctx) +_mesa_free_transform_feedback(struct gl_context *ctx) { /* core mesa expects this, even a dummy one, to be available */ ASSERT(ctx->Driver.NewTransformFeedback); @@ -200,15 +200,15 @@ _mesa_free_transform_feedback(GLcontext *ctx) /* forward declarations */ static struct gl_transform_feedback_object * -new_transform_feedback(GLcontext *ctx, GLuint name); +new_transform_feedback(struct gl_context *ctx, GLuint name); static void -delete_transform_feedback(GLcontext *ctx, +delete_transform_feedback(struct gl_context *ctx, struct gl_transform_feedback_object *obj); /* dummy per-context init/clean-up for transform feedback */ void -_mesa_init_transform_feedback(GLcontext *ctx) +_mesa_init_transform_feedback(struct gl_context *ctx) { ctx->TransformFeedback.DefaultObject = new_transform_feedback(ctx, 0); ctx->TransformFeedback.CurrentObject = ctx->TransformFeedback.DefaultObject; @@ -218,7 +218,7 @@ _mesa_init_transform_feedback(GLcontext *ctx) } void -_mesa_free_transform_feedback(GLcontext *ctx) +_mesa_free_transform_feedback(struct gl_context *ctx) { _mesa_reference_buffer_object(ctx, &ctx->TransformFeedback.CurrentBuffer, @@ -232,7 +232,7 @@ _mesa_free_transform_feedback(GLcontext *ctx) /** Default fallback for ctx->Driver.NewTransformFeedback() */ static struct gl_transform_feedback_object * -new_transform_feedback(GLcontext *ctx, GLuint name) +new_transform_feedback(struct gl_context *ctx, GLuint name) { struct gl_transform_feedback_object *obj; obj = CALLOC_STRUCT(gl_transform_feedback_object); @@ -245,7 +245,7 @@ new_transform_feedback(GLcontext *ctx, GLuint name) /** Default fallback for ctx->Driver.DeleteTransformFeedback() */ static void -delete_transform_feedback(GLcontext *ctx, +delete_transform_feedback(struct gl_context *ctx, struct gl_transform_feedback_object *obj) { GLuint i; @@ -263,7 +263,7 @@ delete_transform_feedback(GLcontext *ctx, /** Default fallback for ctx->Driver.BeginTransformFeedback() */ static void -begin_transform_feedback(GLcontext *ctx, GLenum mode, +begin_transform_feedback(struct gl_context *ctx, GLenum mode, struct gl_transform_feedback_object *obj) { /* nop */ @@ -271,7 +271,7 @@ begin_transform_feedback(GLcontext *ctx, GLenum mode, /** Default fallback for ctx->Driver.EndTransformFeedback() */ static void -end_transform_feedback(GLcontext *ctx, +end_transform_feedback(struct gl_context *ctx, struct gl_transform_feedback_object *obj) { /* nop */ @@ -279,7 +279,7 @@ end_transform_feedback(GLcontext *ctx, /** Default fallback for ctx->Driver.PauseTransformFeedback() */ static void -pause_transform_feedback(GLcontext *ctx, +pause_transform_feedback(struct gl_context *ctx, struct gl_transform_feedback_object *obj) { /* nop */ @@ -287,7 +287,7 @@ pause_transform_feedback(GLcontext *ctx, /** Default fallback for ctx->Driver.ResumeTransformFeedback() */ static void -resume_transform_feedback(GLcontext *ctx, +resume_transform_feedback(struct gl_context *ctx, struct gl_transform_feedback_object *obj) { /* nop */ @@ -295,7 +295,7 @@ resume_transform_feedback(GLcontext *ctx, /** Default fallback for ctx->Driver.DrawTransformFeedback() */ static void -draw_transform_feedback(GLcontext *ctx, GLenum mode, +draw_transform_feedback(struct gl_context *ctx, GLenum mode, struct gl_transform_feedback_object *obj) { /* XXX to do */ @@ -399,7 +399,7 @@ _mesa_EndTransformFeedback(void) * Helper used by BindBufferRange() and BindBufferBase(). */ static void -bind_buffer_range(GLcontext *ctx, GLuint index, +bind_buffer_range(struct gl_context *ctx, GLuint index, struct gl_buffer_object *bufObj, GLintptr offset, GLsizeiptr size) { @@ -698,7 +698,7 @@ _mesa_GetTransformFeedbackVarying(GLuint program, GLuint index, static struct gl_transform_feedback_object * -lookup_transform_feedback_object(GLcontext *ctx, GLuint name) +lookup_transform_feedback_object(struct gl_context *ctx, GLuint name) { if (name == 0) { return ctx->TransformFeedback.DefaultObject; diff --git a/src/mesa/main/transformfeedback.h b/src/mesa/main/transformfeedback.h index 4d38522d6d9..752cd4e201f 100644 --- a/src/mesa/main/transformfeedback.h +++ b/src/mesa/main/transformfeedback.h @@ -29,18 +29,18 @@ extern void -_mesa_init_transform_feedback(GLcontext *ctx); +_mesa_init_transform_feedback(struct gl_context *ctx); extern void -_mesa_free_transform_feedback(GLcontext *ctx); +_mesa_free_transform_feedback(struct gl_context *ctx); #if FEATURE_EXT_transform_feedback extern GLboolean -_mesa_validate_primitive_mode(GLcontext *ctx, GLenum mode); +_mesa_validate_primitive_mode(struct gl_context *ctx, GLenum mode); extern GLboolean -_mesa_validate_transform_feedback_buffers(GLcontext *ctx); +_mesa_validate_transform_feedback_buffers(struct gl_context *ctx); extern void @@ -106,13 +106,13 @@ _mesa_DrawTransformFeedback(GLenum mode, GLuint name); #else /* FEATURE_EXT_transform_feedback */ static INLINE GLboolean -_mesa_validate_primitive_mode(GLcontext *ctx, GLenum mode) +_mesa_validate_primitive_mode(struct gl_context *ctx, GLenum mode) { return GL_TRUE; } static INLINE GLboolean -_mesa_validate_transform_feedback_buffers(GLcontext *ctx) +_mesa_validate_transform_feedback_buffers(struct gl_context *ctx) { return GL_TRUE; } diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 87ce6e49388..9359db18929 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -384,7 +384,7 @@ get_uniform_parameter(const struct gl_shader_program *shProg, GLuint index) * Called by glGetActiveUniform(). */ static void -_mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index, +_mesa_get_active_uniform(struct gl_context *ctx, GLuint program, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLchar *nameOut) { @@ -527,7 +527,7 @@ get_uniform_rows_cols(const struct gl_program_parameter *p, * to the shader program and return the program parameter position. */ static void -lookup_uniform_parameter(GLcontext *ctx, GLuint program, GLint location, +lookup_uniform_parameter(struct gl_context *ctx, GLuint program, GLint location, struct gl_program **progOut, GLint *paramPosOut) { struct gl_shader_program *shProg @@ -620,7 +620,7 @@ split_location_offset(GLint *location, GLint *offset) * Called via glGetUniformfv(). */ static void -_mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, +_mesa_get_uniformfv(struct gl_context *ctx, GLuint program, GLint location, GLfloat *params) { struct gl_program *prog; @@ -653,7 +653,7 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location, * \sa _mesa_get_uniformfv, only difference is a cast. */ static void -_mesa_get_uniformiv(GLcontext *ctx, GLuint program, GLint location, +_mesa_get_uniformiv(struct gl_context *ctx, GLuint program, GLint location, GLint *params) { struct gl_program *prog; @@ -688,7 +688,7 @@ _mesa_get_uniformiv(GLcontext *ctx, GLuint program, GLint location, * offset (used for arrays, structs). */ GLint -_mesa_get_uniform_location(GLcontext *ctx, struct gl_shader_program *shProg, +_mesa_get_uniform_location(struct gl_context *ctx, struct gl_shader_program *shProg, const GLchar *name) { GLint offset = 0, location = -1; @@ -837,7 +837,7 @@ compatible_types(GLenum userType, GLenum targetType) * \param values the new values, of datatype 'type' */ static void -set_program_uniform(GLcontext *ctx, struct gl_program *program, +set_program_uniform(struct gl_context *ctx, struct gl_program *program, GLint index, GLint offset, GLenum type, GLsizei count, GLint elems, const void *values) @@ -980,7 +980,7 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program, * Called via glUniform*() functions. */ void -_mesa_uniform(GLcontext *ctx, struct gl_shader_program *shProg, +_mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg, GLint location, GLsizei count, const GLvoid *values, GLenum type) { @@ -1084,7 +1084,7 @@ _mesa_uniform(GLcontext *ctx, struct gl_shader_program *shProg, * Set a matrix-valued program parameter. */ static void -set_program_uniform_matrix(GLcontext *ctx, struct gl_program *program, +set_program_uniform_matrix(struct gl_context *ctx, struct gl_program *program, GLuint index, GLuint offset, GLuint count, GLuint rows, GLuint cols, GLboolean transpose, const GLfloat *values) @@ -1152,7 +1152,7 @@ set_program_uniform_matrix(GLcontext *ctx, struct gl_program *program, * Note: cols=2, rows=4 ==> array[2] of vec4 */ void -_mesa_uniform_matrix(GLcontext *ctx, struct gl_shader_program *shProg, +_mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg, GLint cols, GLint rows, GLint location, GLsizei count, GLboolean transpose, const GLfloat *values) diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h index ac2cf30d97e..64474363051 100644 --- a/src/mesa/main/uniforms.h +++ b/src/mesa/main/uniforms.h @@ -152,16 +152,16 @@ extern GLint GLAPIENTRY _mesa_GetUniformLocationARB(GLhandleARB, const GLcharARB *); GLint -_mesa_get_uniform_location(GLcontext *ctx, struct gl_shader_program *shProg, +_mesa_get_uniform_location(struct gl_context *ctx, struct gl_shader_program *shProg, const GLchar *name); void -_mesa_uniform(GLcontext *ctx, struct gl_shader_program *shader_program, +_mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shader_program, GLint location, GLsizei count, const GLvoid *values, GLenum type); void -_mesa_uniform_matrix(GLcontext *ctx, struct gl_shader_program *shProg, +_mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg, GLint cols, GLint rows, GLint location, GLsizei count, GLboolean transpose, const GLfloat *values); diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index d19de7ff62a..acab9e0e924 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -54,7 +54,7 @@ * \param ptr the address (or offset inside VBO) of the array data */ static void -update_array(GLcontext *ctx, struct gl_client_array *array, +update_array(struct gl_context *ctx, struct gl_client_array *array, GLbitfield dirtyBit, GLsizei elementSize, GLint size, GLenum type, GLenum format, GLsizei stride, GLboolean normalized, const GLvoid *ptr) @@ -778,7 +778,7 @@ _mesa_DisableVertexAttribArrayARB(GLuint index) * not handle the 4-element GL_CURRENT_VERTEX_ATTRIB_ARB query. */ static GLuint -get_vertex_array_attrib(GLcontext *ctx, GLuint index, GLenum pname, +get_vertex_array_attrib(struct gl_context *ctx, GLuint index, GLenum pname, const char *caller) { const struct gl_client_array *array; @@ -1339,7 +1339,7 @@ _mesa_PrimitiveRestartIndex(GLuint index) * Copy one client vertex array to another. */ void -_mesa_copy_client_array(GLcontext *ctx, +_mesa_copy_client_array(struct gl_context *ctx, struct gl_client_array *dst, struct gl_client_array *src) { @@ -1380,7 +1380,7 @@ print_array(const char *name, GLint index, const struct gl_client_array *array) * Print current vertex object/array info. For debug. */ void -_mesa_print_arrays(GLcontext *ctx) +_mesa_print_arrays(struct gl_context *ctx) { struct gl_array_object *arrayObj = ctx->Array.ArrayObj; GLuint i; @@ -1408,7 +1408,7 @@ _mesa_print_arrays(GLcontext *ctx) * Initialize vertex array state for given context. */ void -_mesa_init_varray(GLcontext *ctx) +_mesa_init_varray(struct gl_context *ctx) { ctx->Array.DefaultArrayObj = _mesa_new_array_object(ctx, 0); _mesa_reference_array_object(ctx, &ctx->Array.ArrayObj, @@ -1426,7 +1426,7 @@ static void delete_arrayobj_cb(GLuint id, void *data, void *userData) { struct gl_array_object *arrayObj = (struct gl_array_object *) data; - GLcontext *ctx = (GLcontext *) userData; + struct gl_context *ctx = (struct gl_context *) userData; _mesa_delete_array_object(ctx, arrayObj); } @@ -1435,7 +1435,7 @@ delete_arrayobj_cb(GLuint id, void *data, void *userData) * Free vertex array state for given context. */ void -_mesa_free_varray_data(GLcontext *ctx) +_mesa_free_varray_data(struct gl_context *ctx) { _mesa_HashDeleteAll(ctx->Array.Objects, delete_arrayobj_cb, ctx); _mesa_DeleteHashTable(ctx->Array.Objects); diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h index c7c3e3ec70c..a5fa33fa00e 100644 --- a/src/mesa/main/varray.h +++ b/src/mesa/main/varray.h @@ -216,19 +216,19 @@ _mesa_PrimitiveRestartIndex(GLuint index); extern void -_mesa_copy_client_array(GLcontext *ctx, +_mesa_copy_client_array(struct gl_context *ctx, struct gl_client_array *dst, struct gl_client_array *src); extern void -_mesa_print_arrays(GLcontext *ctx); +_mesa_print_arrays(struct gl_context *ctx); extern void -_mesa_init_varray( GLcontext * ctx ); +_mesa_init_varray( struct gl_context * ctx ); extern void -_mesa_free_varray_data(GLcontext *ctx); +_mesa_free_varray_data(struct gl_context *ctx); #else diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c index 692e8733c60..69a28da84c6 100644 --- a/src/mesa/main/version.c +++ b/src/mesa/main/version.c @@ -32,7 +32,7 @@ * Return major and minor version numbers. */ static void -compute_version(GLcontext *ctx) +compute_version(struct gl_context *ctx) { GLuint major, minor; static const int max = 100; @@ -187,7 +187,7 @@ compute_version(GLcontext *ctx) } static void -compute_version_es1(GLcontext *ctx) +compute_version_es1(struct gl_context *ctx) { static const int max = 100; @@ -223,7 +223,7 @@ compute_version_es1(GLcontext *ctx) } static void -compute_version_es2(GLcontext *ctx) +compute_version_es2(struct gl_context *ctx) { static const int max = 100; @@ -264,7 +264,7 @@ compute_version_es2(GLcontext *ctx) * or to perform version check for GLX_ARB_create_context_profile. */ void -_mesa_compute_version(GLcontext *ctx) +_mesa_compute_version(struct gl_context *ctx) { if (ctx->VersionMajor) return; diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h index 004036de98d..6552a3a7843 100644 --- a/src/mesa/main/version.h +++ b/src/mesa/main/version.h @@ -54,7 +54,7 @@ extern void -_mesa_compute_version(GLcontext *ctx); +_mesa_compute_version(struct gl_context *ctx); #endif /* VERSION_H */ diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c index 309308c983b..4747022d0b4 100644 --- a/src/mesa/main/viewport.c +++ b/src/mesa/main/viewport.c @@ -60,7 +60,7 @@ _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height) * \param height height of the viewport rectangle. */ void -_mesa_set_viewport(GLcontext *ctx, GLint x, GLint y, +_mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height) { if (MESA_VERBOSE & VERBOSE_API) @@ -151,7 +151,7 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval) * Initialize the context viewport attribute group. * \param ctx the GL context. */ -void _mesa_init_viewport(GLcontext *ctx) +void _mesa_init_viewport(struct gl_context *ctx) { GLfloat depthMax = 65535.0F; /* sorf of arbitrary */ @@ -173,7 +173,7 @@ void _mesa_init_viewport(GLcontext *ctx) * Free the context viewport attribute group data. * \param ctx the GL context. */ -void _mesa_free_viewport_data(GLcontext *ctx) +void _mesa_free_viewport_data(struct gl_context *ctx) { _math_matrix_dtr(&ctx->Viewport._WindowMap); } diff --git a/src/mesa/main/viewport.h b/src/mesa/main/viewport.h index ec054a7c597..ccfa37588b8 100644 --- a/src/mesa/main/viewport.h +++ b/src/mesa/main/viewport.h @@ -35,7 +35,7 @@ _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height); extern void -_mesa_set_viewport(GLcontext *ctx, GLint x, GLint y, +_mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height); @@ -44,11 +44,11 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval); extern void -_mesa_init_viewport(GLcontext *ctx); +_mesa_init_viewport(struct gl_context *ctx); extern void -_mesa_free_viewport_data(GLcontext *ctx); +_mesa_free_viewport_data(struct gl_context *ctx); #endif diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index ca352e88e6b..284e77798c7 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -165,27 +165,27 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt ) } -void _mesa_init_exec_vtxfmt( GLcontext *ctx ) +void _mesa_init_exec_vtxfmt( struct gl_context *ctx ) { install_vtxfmt( ctx->Exec, &neutral_vtxfmt ); ctx->TnlModule.SwapCount = 0; } -void _mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ) +void _mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt ) { ctx->TnlModule.Current = vfmt; _mesa_restore_exec_vtxfmt( ctx ); } -void _mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ) +void _mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt ) { install_vtxfmt( ctx->Save, vfmt ); } -void _mesa_restore_exec_vtxfmt( GLcontext *ctx ) +void _mesa_restore_exec_vtxfmt( struct gl_context *ctx ) { struct gl_tnl_module *tnl = &(ctx->TnlModule); GLuint i; diff --git a/src/mesa/main/vtxfmt.h b/src/mesa/main/vtxfmt.h index aad38b87c35..401eb80a0ad 100644 --- a/src/mesa/main/vtxfmt.h +++ b/src/mesa/main/vtxfmt.h @@ -38,32 +38,32 @@ #if FEATURE_beginend -extern void _mesa_init_exec_vtxfmt( GLcontext *ctx ); +extern void _mesa_init_exec_vtxfmt( struct gl_context *ctx ); -extern void _mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ); -extern void _mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ); +extern void _mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt ); +extern void _mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt ); -extern void _mesa_restore_exec_vtxfmt( GLcontext *ctx ); +extern void _mesa_restore_exec_vtxfmt( struct gl_context *ctx ); #else /* FEATURE_beginend */ static INLINE void -_mesa_init_exec_vtxfmt( GLcontext *ctx ) +_mesa_init_exec_vtxfmt( struct gl_context *ctx ) { } static INLINE void -_mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ) +_mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt ) { } static INLINE void -_mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt ) +_mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt ) { } static INLINE void -_mesa_restore_exec_vtxfmt( GLcontext *ctx ) +_mesa_restore_exec_vtxfmt( struct gl_context *ctx ) { } -- cgit v1.2.3