mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 21:20:12 +01:00
mesa: Rename _mesa_..._array_obj functions to _mesa_..._vao.
_mesa_update_vao_client_arrays() is less of a mouthful than _mesa_update_array_object_client_arrays(), and generally clearer. Generated by: $ find . -type f -print0 | xargs -0 sed -i \ 's/_mesa_\([^_]*\)_array_object/_mesa_\1_vao/g' with manual whitespace and indentation fixes applied. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
aac1415b66
commit
de47fd2668
10 changed files with 47 additions and 48 deletions
|
|
@ -180,8 +180,8 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
|
|||
_mesa_init_texture_barrier_functions(driver);
|
||||
|
||||
/* APPLE_vertex_array_object */
|
||||
driver->NewArrayObject = _mesa_new_array_object;
|
||||
driver->DeleteArrayObject = _mesa_delete_array_object;
|
||||
driver->NewArrayObject = _mesa_new_vao;
|
||||
driver->DeleteArrayObject = _mesa_delete_vao;
|
||||
driver->BindArrayObject = NULL;
|
||||
|
||||
_mesa_init_shader_object_functions(driver);
|
||||
|
|
|
|||
|
|
@ -729,7 +729,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
|
|||
|
||||
if (state & MESA_META_VERTEX) {
|
||||
/* save vertex array object state */
|
||||
_mesa_reference_array_object(ctx, &save->VAO,
|
||||
_mesa_reference_vao(ctx, &save->VAO,
|
||||
ctx->Array.VAO);
|
||||
_mesa_reference_buffer_object(ctx, &save->ArrayBufferObj,
|
||||
ctx->Array.ArrayBufferObj);
|
||||
|
|
@ -1096,7 +1096,7 @@ _mesa_meta_end(struct gl_context *ctx)
|
|||
|
||||
/* restore vertex array object */
|
||||
_mesa_BindVertexArray(save->VAO->Name);
|
||||
_mesa_reference_array_object(ctx, &save->VAO, NULL);
|
||||
_mesa_reference_vao(ctx, &save->VAO, NULL);
|
||||
}
|
||||
|
||||
if (state & MESA_META_VIEWPORT) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -436,6 +436,6 @@ st_init_bufferobject_functions(struct dd_function_table *functions)
|
|||
functions->CopyBufferSubData = st_copy_buffer_subdata;
|
||||
|
||||
/* For GL_APPLE_vertex_array_object */
|
||||
functions->NewArrayObject = _mesa_new_array_object;
|
||||
functions->DeleteArrayObject = _mesa_delete_array_object;
|
||||
functions->NewArrayObject = _mesa_new_vao;
|
||||
functions->DeleteArrayObject = _mesa_delete_vao;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue