diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/api_arrayelt.c | 2 | ||||
-rw-r--r-- | src/mesa/main/arrayobj.c | 32 | ||||
-rw-r--r-- | src/mesa/main/arrayobj.h | 30 | ||||
-rw-r--r-- | src/mesa/main/attrib.c | 4 | ||||
-rw-r--r-- | src/mesa/main/context.c | 4 | ||||
-rw-r--r-- | src/mesa/main/state.c | 4 | ||||
-rw-r--r-- | src/mesa/main/varray.c | 7 |
7 files changed, 41 insertions, 42 deletions
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index 981231cf2ec..fdda1dc46c9 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1475,7 +1475,7 @@ update_derived_client_arrays(struct gl_context *ctx) struct gl_vertex_array_object *vao = ctx->Array.VAO; if (vao->NewArrays) { - _mesa_update_array_object_client_arrays(ctx, vao); + _mesa_update_vao_client_arrays(ctx, vao); vao->NewArrays = 0; } } diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index ca85bc3d3a5..dde9cf956c3 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -96,11 +96,11 @@ unbind_array_object_vbos(struct gl_context *ctx, struct gl_vertex_array_object * * \c dd_function_table::NewArrayObject. */ struct gl_vertex_array_object * -_mesa_new_array_object( struct gl_context *ctx, GLuint name ) +_mesa_new_vao(struct gl_context *ctx, GLuint name) { struct gl_vertex_array_object *obj = CALLOC_STRUCT(gl_vertex_array_object); if (obj) - _mesa_initialize_array_object(ctx, obj, name); + _mesa_initialize_vao(ctx, obj, name); return obj; } @@ -112,7 +112,7 @@ _mesa_new_array_object( struct gl_context *ctx, GLuint name ) * \c dd_function_table::DeleteArrayObject. */ void -_mesa_delete_array_object( struct gl_context *ctx, struct gl_vertex_array_object *obj ) +_mesa_delete_vao(struct gl_context *ctx, struct gl_vertex_array_object *obj) { (void) ctx; unbind_array_object_vbos(ctx, obj); @@ -125,13 +125,13 @@ _mesa_delete_array_object( struct gl_context *ctx, struct gl_vertex_array_object /** * Set ptr to vao w/ reference counting. - * Note: this should only be called from the _mesa_reference_array_object() + * Note: this should only be called from the _mesa_reference_vao() * inline function. */ void -_mesa_reference_array_object_(struct gl_context *ctx, - struct gl_vertex_array_object **ptr, - struct gl_vertex_array_object *vao) +_mesa_reference_vao_(struct gl_context *ctx, + struct gl_vertex_array_object **ptr, + struct gl_vertex_array_object *vao) { assert(*ptr != vao); @@ -216,9 +216,9 @@ init_array(struct gl_context *ctx, * Initialize a gl_vertex_array_object's arrays. */ void -_mesa_initialize_array_object( struct gl_context *ctx, - struct gl_vertex_array_object *obj, - GLuint name ) +_mesa_initialize_vao(struct gl_context *ctx, + struct gl_vertex_array_object *obj, + GLuint name) { GLuint i; @@ -291,7 +291,7 @@ remove_array_object( struct gl_context *ctx, struct gl_vertex_array_object *obj /** - * Helper for _mesa_update_array_object_max_element(). + * Helper for _mesa_update_vao_max_element(). * \return min(vao->_VertexAttrib[*]._MaxElement). */ static GLuint @@ -318,7 +318,7 @@ compute_max_element(struct gl_vertex_array_object *vao, GLbitfield64 enabled) * Examine vertex arrays to update the gl_vertex_array_object::_MaxElement field. */ void -_mesa_update_array_object_max_element(struct gl_context *ctx, +_mesa_update_vao_max_element(struct gl_context *ctx, struct gl_vertex_array_object *vao) { GLbitfield64 enabled; @@ -340,8 +340,8 @@ _mesa_update_array_object_max_element(struct gl_context *ctx, * or a gl_vertex_buffer_binding has changed. */ void -_mesa_update_array_object_client_arrays(struct gl_context *ctx, - struct gl_vertex_array_object *vao) +_mesa_update_vao_client_arrays(struct gl_context *ctx, + struct gl_vertex_array_object *vao) { GLbitfield64 arrays = vao->NewArrays; @@ -426,7 +426,7 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired) } ctx->NewState |= _NEW_ARRAY; - _mesa_reference_array_object(ctx, &ctx->Array.VAO, newObj); + _mesa_reference_vao(ctx, &ctx->Array.VAO, newObj); /* Pass BindVertexArray call to device driver */ if (ctx->Driver.BindArrayObject && newObj) @@ -501,7 +501,7 @@ _mesa_DeleteVertexArrays(GLsizei n, const GLuint *ids) /* Unreference the array object. * If refcount hits zero, the object will be deleted. */ - _mesa_reference_array_object(ctx, &obj, NULL); + _mesa_reference_vao(ctx, &obj, NULL); } } } diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h index 722708eed25..6511e0810ab 100644 --- a/src/mesa/main/arrayobj.h +++ b/src/mesa/main/arrayobj.h @@ -49,38 +49,38 @@ extern struct gl_vertex_array_object * _mesa_lookup_arrayobj(struct gl_context *ctx, GLuint id); extern struct gl_vertex_array_object * -_mesa_new_array_object( struct gl_context *ctx, GLuint name ); +_mesa_new_vao(struct gl_context *ctx, GLuint name); extern void -_mesa_delete_array_object( struct gl_context *ctx, struct gl_vertex_array_object *obj ); +_mesa_delete_vao(struct gl_context *ctx, struct gl_vertex_array_object *obj); extern void -_mesa_reference_array_object_(struct gl_context *ctx, - struct gl_vertex_array_object **ptr, - struct gl_vertex_array_object *vao); +_mesa_reference_vao_(struct gl_context *ctx, + struct gl_vertex_array_object **ptr, + struct gl_vertex_array_object *vao); static inline void -_mesa_reference_array_object(struct gl_context *ctx, - struct gl_vertex_array_object **ptr, - struct gl_vertex_array_object *vao) +_mesa_reference_vao(struct gl_context *ctx, + struct gl_vertex_array_object **ptr, + struct gl_vertex_array_object *vao) { if (*ptr != vao) - _mesa_reference_array_object_(ctx, ptr, vao); + _mesa_reference_vao_(ctx, ptr, vao); } extern void -_mesa_initialize_array_object( struct gl_context *ctx, - struct gl_vertex_array_object *obj, GLuint name ); +_mesa_initialize_vao(struct gl_context *ctx, + struct gl_vertex_array_object *obj, GLuint name); extern void -_mesa_update_array_object_max_element(struct gl_context *ctx, - struct gl_vertex_array_object *vao); +_mesa_update_vao_max_element(struct gl_context *ctx, + struct gl_vertex_array_object *vao); extern void -_mesa_update_array_object_client_arrays(struct gl_context *ctx, - struct gl_vertex_array_object *vao); +_mesa_update_vao_client_arrays(struct gl_context *ctx, + struct gl_vertex_array_object *vao); /** Returns the bitmask of all enabled arrays in fixed function mode. diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 5c31379056c..5b5c48dbdab 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1574,7 +1574,7 @@ init_array_attrib_data(struct gl_context *ctx, return false; } - _mesa_initialize_array_object(ctx, attrib->VAO, 0); + _mesa_initialize_vao(ctx, attrib->VAO, 0); return true; } @@ -1589,7 +1589,7 @@ free_array_attrib_data(struct gl_context *ctx, { /* We use a non driver array object, so don't just unref since we would * end up using the drivers DeleteArrayObject function for deletion. */ - _mesa_delete_array_object(ctx, attrib->VAO); + _mesa_delete_vao(ctx, attrib->VAO); attrib->VAO = 0; _mesa_reference_buffer_object(ctx, &attrib->ArrayBufferObj, NULL); } diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index b8c02d01dfa..d0a14493ab5 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1188,8 +1188,8 @@ _mesa_free_context_data( struct gl_context *ctx ) _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL); _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram, NULL); - _mesa_reference_array_object(ctx, &ctx->Array.VAO, NULL); - _mesa_reference_array_object(ctx, &ctx->Array.DefaultVAO, NULL); + _mesa_reference_vao(ctx, &ctx->Array.VAO, NULL); + _mesa_reference_vao(ctx, &ctx->Array.DefaultVAO, NULL); _mesa_free_attrib_data(ctx); _mesa_free_buffer_objects(ctx); diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index b6593dd1a0b..0866a140f49 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -417,11 +417,11 @@ _mesa_update_state_locked( struct gl_context *ctx ) } if (new_state & _NEW_ARRAY) - _mesa_update_array_object_client_arrays(ctx, ctx->Array.VAO); + _mesa_update_vao_client_arrays(ctx, ctx->Array.VAO); if (ctx->Const.CheckArrayBounds && new_state & (_NEW_ARRAY | _NEW_PROGRAM | _NEW_BUFFER_OBJECT)) { - _mesa_update_array_object_max_element(ctx, ctx->Array.VAO); + _mesa_update_vao_max_element(ctx, ctx->Array.VAO); } out: diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 068200c846f..44db2cbcd47 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -1761,7 +1761,7 @@ _mesa_print_arrays(struct gl_context *ctx) struct gl_vertex_array_object *vao = ctx->Array.VAO; GLuint i; - _mesa_update_array_object_max_element(ctx, vao); + _mesa_update_vao_max_element(ctx, vao); printf("Array Object %u\n", vao->Name); if (vao->_VertexAttrib[VERT_ATTRIB_POS].Enabled) @@ -1787,8 +1787,7 @@ void _mesa_init_varray(struct gl_context *ctx) { ctx->Array.DefaultVAO = ctx->Driver.NewArrayObject(ctx, 0); - _mesa_reference_array_object(ctx, &ctx->Array.VAO, - ctx->Array.DefaultVAO); + _mesa_reference_vao(ctx, &ctx->Array.VAO, ctx->Array.DefaultVAO); ctx->Array.ActiveTexture = 0; /* GL_ARB_multitexture */ ctx->Array.Objects = _mesa_NewHashTable(); @@ -1803,7 +1802,7 @@ delete_arrayobj_cb(GLuint id, void *data, void *userData) { struct gl_vertex_array_object *vao = (struct gl_vertex_array_object *) data; struct gl_context *ctx = (struct gl_context *) userData; - _mesa_delete_array_object(ctx, vao); + _mesa_delete_vao(ctx, vao); } |