aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/arrayobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/arrayobj.c')
-rw-r--r--mesalib/src/mesa/main/arrayobj.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mesalib/src/mesa/main/arrayobj.c b/mesalib/src/mesa/main/arrayobj.c
index 6440ea670..3c8ffb5a4 100644
--- a/mesalib/src/mesa/main/arrayobj.c
+++ b/mesalib/src/mesa/main/arrayobj.c
@@ -84,10 +84,10 @@ unbind_array_object_vbos(struct gl_context *ctx, struct gl_vertex_array_object *
{
GLuint i;
- for (i = 0; i < Elements(obj->VertexBinding); i++)
+ for (i = 0; i < ARRAY_SIZE(obj->VertexBinding); i++)
_mesa_reference_buffer_object(ctx, &obj->VertexBinding[i].BufferObj, NULL);
- for (i = 0; i < Elements(obj->_VertexAttrib); i++)
+ for (i = 0; i < ARRAY_SIZE(obj->_VertexAttrib); i++)
_mesa_reference_buffer_object(ctx, &obj->_VertexAttrib[i].BufferObj, NULL);
}
@@ -143,7 +143,7 @@ _mesa_reference_vao_(struct gl_context *ctx,
struct gl_vertex_array_object *oldObj = *ptr;
mtx_lock(&oldObj->Mutex);
- ASSERT(oldObj->RefCount > 0);
+ assert(oldObj->RefCount > 0);
oldObj->RefCount--;
#if 0
printf("ArrayObj %p %d DECR to %d\n",
@@ -153,13 +153,13 @@ _mesa_reference_vao_(struct gl_context *ctx,
mtx_unlock(&oldObj->Mutex);
if (deleteFlag) {
- ASSERT(ctx->Driver.DeleteArrayObject);
+ assert(ctx->Driver.DeleteArrayObject);
ctx->Driver.DeleteArrayObject(ctx, oldObj);
}
*ptr = NULL;
}
- ASSERT(!*ptr);
+ assert(!*ptr);
if (vao) {
/* reference new array object */
@@ -230,7 +230,7 @@ _mesa_initialize_vao(struct gl_context *ctx,
obj->RefCount = 1;
/* Init the individual arrays */
- for (i = 0; i < Elements(obj->VertexAttrib); i++) {
+ for (i = 0; i < ARRAY_SIZE(obj->VertexAttrib); i++) {
switch (i) {
case VERT_ATTRIB_WEIGHT:
init_array(ctx, obj, VERT_ATTRIB_WEIGHT, 1, GL_FLOAT);
@@ -335,7 +335,7 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
struct gl_vertex_array_object * const oldObj = ctx->Array.VAO;
struct gl_vertex_array_object *newObj = NULL;
- ASSERT(oldObj != NULL);
+ assert(oldObj != NULL);
if ( oldObj->Name == id )
return; /* rebinding the same array object- no change */
@@ -456,7 +456,7 @@ _mesa_DeleteVertexArrays(GLsizei n, const GLuint *ids)
struct gl_vertex_array_object *obj = _mesa_lookup_vao(ctx, ids[i]);
if ( obj != NULL ) {
- ASSERT( obj->Name == ids[i] );
+ assert( obj->Name == ids[i] );
/* If the array object is currently bound, the spec says "the binding
* for that object reverts to zero and the default vertex array