From 12cbe995edbbf2791459579918486413965d4bf0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fredrik=20H=C3=B6glund?= Date: Wed, 3 Apr 2013 22:08:47 +0200 Subject: [PATCH] mesa: Rename gl_array_object::VertexAttrib to _VertexAttrib This will become derived state as part of the ARB_vertex_attrib_binding support. Reviewed-by: Eric Anholt Reviewed-by: Ian Romanick --- src/mesa/main/api_arrayelt.c | 36 ++++++++--------- src/mesa/main/api_validate.c | 6 +-- src/mesa/main/arrayobj.c | 26 ++++++------- src/mesa/main/attrib.c | 4 +- src/mesa/main/bufferobj.c | 4 +- src/mesa/main/enable.c | 36 ++++++++--------- src/mesa/main/ffvertex_prog.c | 2 +- src/mesa/main/get.c | 6 +-- src/mesa/main/get_hash_params.py | 66 ++++++++++++++++---------------- src/mesa/main/getstring.c | 18 ++++----- src/mesa/main/mtypes.h | 2 +- src/mesa/main/varray.c | 50 ++++++++++++------------ src/mesa/vbo/vbo_exec_array.c | 12 +++--- 13 files changed, 134 insertions(+), 134 deletions(-) diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index ea0923837a3..5a316f0c168 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1486,45 +1486,45 @@ _ae_update_state(struct gl_context *ctx) actx->nr_vbos = 0; /* conventional vertex arrays */ - if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) { - aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX]; + if (arrayObj->_VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) { + aa->array = &arrayObj->_VertexAttrib[VERT_ATTRIB_COLOR_INDEX]; aa->offset = IndexFuncs[TYPE_IDX(aa->array->Type)]; check_vbo(actx, aa->array->BufferObj); aa++; } - if (arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled) { - aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG]; + if (arrayObj->_VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled) { + aa->array = &arrayObj->_VertexAttrib[VERT_ATTRIB_EDGEFLAG]; aa->offset = _gloffset_EdgeFlagv; check_vbo(actx, aa->array->BufferObj); aa++; } - if (arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) { - aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL]; + if (arrayObj->_VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) { + aa->array = &arrayObj->_VertexAttrib[VERT_ATTRIB_NORMAL]; aa->offset = NormalFuncs[TYPE_IDX(aa->array->Type)]; check_vbo(actx, aa->array->BufferObj); aa++; } - if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled) { - aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0]; + if (arrayObj->_VertexAttrib[VERT_ATTRIB_COLOR0].Enabled) { + aa->array = &arrayObj->_VertexAttrib[VERT_ATTRIB_COLOR0]; aa->offset = ColorFuncs[aa->array->Size-3][TYPE_IDX(aa->array->Type)]; check_vbo(actx, aa->array->BufferObj); aa++; } - if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled) { - aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR1]; + if (arrayObj->_VertexAttrib[VERT_ATTRIB_COLOR1].Enabled) { + aa->array = &arrayObj->_VertexAttrib[VERT_ATTRIB_COLOR1]; aa->offset = SecondaryColorFuncs[TYPE_IDX(aa->array->Type)]; check_vbo(actx, aa->array->BufferObj); aa++; } - if (arrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled) { - aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_FOG]; + if (arrayObj->_VertexAttrib[VERT_ATTRIB_FOG].Enabled) { + aa->array = &arrayObj->_VertexAttrib[VERT_ATTRIB_FOG]; aa->offset = FogCoordFuncs[TYPE_IDX(aa->array->Type)]; check_vbo(actx, aa->array->BufferObj); aa++; } for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { struct gl_client_array *attribArray = - &arrayObj->VertexAttrib[VERT_ATTRIB_TEX(i)]; + &arrayObj->_VertexAttrib[VERT_ATTRIB_TEX(i)]; if (attribArray->Enabled) { /* NOTE: we use generic glVertexAttribNV functions here. * If we ever remove GL_NV_vertex_program this will have to change. @@ -1543,7 +1543,7 @@ _ae_update_state(struct gl_context *ctx) /* generic vertex attribute arrays */ for (i = 1; i < VERT_ATTRIB_GENERIC_MAX; i++) { /* skip zero! */ struct gl_client_array *attribArray = - &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(i)]; + &arrayObj->_VertexAttrib[VERT_ATTRIB_GENERIC(i)]; if (attribArray->Enabled) { GLint intOrNorm; at->array = attribArray; @@ -1570,18 +1570,18 @@ _ae_update_state(struct gl_context *ctx) } /* finally, vertex position */ - if (arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0].Enabled) { + if (arrayObj->_VertexAttrib[VERT_ATTRIB_GENERIC0].Enabled) { /* Use glVertex(v) instead of glVertexAttrib(0, v) to be sure it's * issued as the last (provoking) attribute). */ - aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0]; + aa->array = &arrayObj->_VertexAttrib[VERT_ATTRIB_GENERIC0]; assert(aa->array->Size >= 2); /* XXX fix someday? */ aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)]; check_vbo(actx, aa->array->BufferObj); aa++; } - else if (arrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) { - aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_POS]; + else if (arrayObj->_VertexAttrib[VERT_ATTRIB_POS].Enabled) { + aa->array = &arrayObj->_VertexAttrib[VERT_ATTRIB_POS]; aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)]; check_vbo(actx, aa->array->BufferObj); aa++; diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index f285c9748ed..d31f5936147 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -120,7 +120,7 @@ check_valid_to_render(struct gl_context *ctx, const char *function) case API_OPENGLES: /* For OpenGL ES, only draw if we have vertex positions */ - if (!ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) + if (!ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_POS].Enabled) return GL_FALSE; break; @@ -141,8 +141,8 @@ check_valid_to_render(struct gl_context *ctx, const char *function) /* Draw if we have vertex positions (GL_VERTEX_ARRAY or generic * array [0]). */ - return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled || - ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0].Enabled); + return (ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_POS].Enabled || + ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_GENERIC0].Enabled); } } break; diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 5d50d29f8f6..79a54fa68be 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -81,8 +81,8 @@ unbind_array_object_vbos(struct gl_context *ctx, struct gl_array_object *obj) { GLuint i; - for (i = 0; i < Elements(obj->VertexAttrib); i++) - _mesa_reference_buffer_object(ctx, &obj->VertexAttrib[i].BufferObj, NULL); + for (i = 0; i < Elements(obj->_VertexAttrib); i++) + _mesa_reference_buffer_object(ctx, &obj->_VertexAttrib[i].BufferObj, NULL); } @@ -215,31 +215,31 @@ _mesa_initialize_array_object( struct gl_context *ctx, obj->RefCount = 1; /* Init the individual arrays */ - for (i = 0; i < Elements(obj->VertexAttrib); i++) { + for (i = 0; i < Elements(obj->_VertexAttrib); i++) { switch (i) { case VERT_ATTRIB_WEIGHT: - init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_WEIGHT], 1, GL_FLOAT); + init_array(ctx, &obj->_VertexAttrib[VERT_ATTRIB_WEIGHT], 1, GL_FLOAT); break; case VERT_ATTRIB_NORMAL: - init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_NORMAL], 3, GL_FLOAT); + init_array(ctx, &obj->_VertexAttrib[VERT_ATTRIB_NORMAL], 3, GL_FLOAT); break; case VERT_ATTRIB_COLOR1: - init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_COLOR1], 3, GL_FLOAT); + init_array(ctx, &obj->_VertexAttrib[VERT_ATTRIB_COLOR1], 3, GL_FLOAT); break; case VERT_ATTRIB_FOG: - init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_FOG], 1, GL_FLOAT); + init_array(ctx, &obj->_VertexAttrib[VERT_ATTRIB_FOG], 1, GL_FLOAT); break; case VERT_ATTRIB_COLOR_INDEX: - init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX], 1, GL_FLOAT); + init_array(ctx, &obj->_VertexAttrib[VERT_ATTRIB_COLOR_INDEX], 1, GL_FLOAT); break; case VERT_ATTRIB_EDGEFLAG: - init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_EDGEFLAG], 1, GL_BOOL); + init_array(ctx, &obj->_VertexAttrib[VERT_ATTRIB_EDGEFLAG], 1, GL_BOOL); break; case VERT_ATTRIB_POINT_SIZE: - init_array(ctx, &obj->VertexAttrib[VERT_ATTRIB_POINT_SIZE], 1, GL_FLOAT); + init_array(ctx, &obj->_VertexAttrib[VERT_ATTRIB_POINT_SIZE], 1, GL_FLOAT); break; default: - init_array(ctx, &obj->VertexAttrib[i], 4, GL_FLOAT); + init_array(ctx, &obj->_VertexAttrib[i], 4, GL_FLOAT); break; } } @@ -279,7 +279,7 @@ remove_array_object( struct gl_context *ctx, struct gl_array_object *obj ) /** * Helper for _mesa_update_array_object_max_element(). - * \return min(arrayObj->VertexAttrib[*]._MaxElement). + * \return min(arrayObj->_VertexAttrib[*]._MaxElement). */ static GLuint compute_max_element(struct gl_array_object *arrayObj, GLbitfield64 enabled) @@ -291,7 +291,7 @@ compute_max_element(struct gl_array_object *arrayObj, GLbitfield64 enabled) GLint attrib = ffsll(enabled) - 1; enabled ^= BITFIELD64_BIT(attrib); - client_array = &arrayObj->VertexAttrib[attrib]; + client_array = &arrayObj->_VertexAttrib[attrib]; assert(client_array->Enabled); _mesa_update_array_max_element(client_array); min = MIN2(min, client_array->_MaxElement); diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index ca617f7446b..87c7f66eb11 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1369,8 +1369,8 @@ copy_array_object(struct gl_context *ctx, /* In theory must be the same anyway, but on recreate make sure it matches */ dest->ARBsemantics = src->ARBsemantics; - for (i = 0; i < Elements(src->VertexAttrib); i++) - _mesa_copy_client_array(ctx, &dest->VertexAttrib[i], &src->VertexAttrib[i]); + for (i = 0; i < Elements(src->_VertexAttrib); i++) + _mesa_copy_client_array(ctx, &dest->_VertexAttrib[i], &src->_VertexAttrib[i]); /* _Enabled must be the same than on push */ dest->_Enabled = src->_Enabled; diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 1f5506157ca..54bba1aade7 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -862,8 +862,8 @@ _mesa_DeleteBuffers(GLsizei n, const GLuint *ids) } /* unbind any vertex pointers bound to this buffer */ - for (j = 0; j < Elements(arrayObj->VertexAttrib); j++) { - unbind(ctx, &arrayObj->VertexAttrib[j].BufferObj, bufObj); + for (j = 0; j < Elements(arrayObj->_VertexAttrib); j++) { + unbind(ctx, &arrayObj->_VertexAttrib[j].BufferObj, bufObj); } if (ctx->Array.ArrayBufferObj == bufObj) { diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index c047f5df2c5..255e25f27a9 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -69,40 +69,40 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state) switch (cap) { case GL_VERTEX_ARRAY: - var = &arrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled; + var = &arrayObj->_VertexAttrib[VERT_ATTRIB_POS].Enabled; flag = VERT_BIT_POS; break; case GL_NORMAL_ARRAY: - var = &arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled; + var = &arrayObj->_VertexAttrib[VERT_ATTRIB_NORMAL].Enabled; flag = VERT_BIT_NORMAL; break; case GL_COLOR_ARRAY: - var = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled; + var = &arrayObj->_VertexAttrib[VERT_ATTRIB_COLOR0].Enabled; flag = VERT_BIT_COLOR0; break; case GL_INDEX_ARRAY: - var = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled; + var = &arrayObj->_VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled; flag = VERT_BIT_COLOR_INDEX; break; case GL_TEXTURE_COORD_ARRAY: - var = &arrayObj->VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)].Enabled; + var = &arrayObj->_VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)].Enabled; flag = VERT_BIT_TEX(ctx->Array.ActiveTexture); break; case GL_EDGE_FLAG_ARRAY: - var = &arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled; + var = &arrayObj->_VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled; flag = VERT_BIT_EDGEFLAG; break; case GL_FOG_COORDINATE_ARRAY_EXT: - var = &arrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled; + var = &arrayObj->_VertexAttrib[VERT_ATTRIB_FOG].Enabled; flag = VERT_BIT_FOG; break; case GL_SECONDARY_COLOR_ARRAY_EXT: - var = &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled; + var = &arrayObj->_VertexAttrib[VERT_ATTRIB_COLOR1].Enabled; flag = VERT_BIT_COLOR1; break; case GL_POINT_SIZE_ARRAY_OES: - var = &arrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled; + var = &arrayObj->_VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled; flag = VERT_BIT_POINT_SIZE; break; @@ -1417,41 +1417,41 @@ _mesa_IsEnabled( GLenum cap ) case GL_VERTEX_ARRAY: if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES) goto invalid_enum_error; - return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled; + return ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_POS].Enabled; case GL_NORMAL_ARRAY: if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES) goto invalid_enum_error; - return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled; + return ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_NORMAL].Enabled; case GL_COLOR_ARRAY: if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES) goto invalid_enum_error; - return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled; + return ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_COLOR0].Enabled; case GL_INDEX_ARRAY: if (ctx->API != API_OPENGL_COMPAT) goto invalid_enum_error; return ctx->Array.ArrayObj-> - VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled; + _VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled; case GL_TEXTURE_COORD_ARRAY: if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES) goto invalid_enum_error; return ctx->Array.ArrayObj-> - VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)].Enabled; + _VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)].Enabled; case GL_EDGE_FLAG_ARRAY: if (ctx->API != API_OPENGL_COMPAT) goto invalid_enum_error; - return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled; + return ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled; case GL_FOG_COORDINATE_ARRAY_EXT: if (ctx->API != API_OPENGL_COMPAT) goto invalid_enum_error; - return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled; + return ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_FOG].Enabled; case GL_SECONDARY_COLOR_ARRAY_EXT: if (ctx->API != API_OPENGL_COMPAT) goto invalid_enum_error; - return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled; + return ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_COLOR1].Enabled; case GL_POINT_SIZE_ARRAY_OES: if (ctx->API != API_OPENGLES) goto invalid_enum_error; - return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled; + return ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled; /* GL_ARB_texture_cube_map */ case GL_TEXTURE_CUBE_MAP_ARB: diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index be6ac0f2af5..08665c6b6f9 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -228,7 +228,7 @@ static void make_state_key( struct gl_context *ctx, struct state_key *key ) if (ctx->Point._Attenuated) key->point_attenuated = 1; - if (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled) + if (ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled) key->point_array = 1; if (ctx->Texture._TexGenEnabled || diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 6a0de0c165c..d41e73ec1b3 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -629,7 +629,7 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu case GL_TEXTURE_COORD_ARRAY_SIZE: case GL_TEXTURE_COORD_ARRAY_TYPE: case GL_TEXTURE_COORD_ARRAY_STRIDE: - array = &ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)]; + array = &ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)]; v->value_int = *(GLuint *) ((char *) array + d->offset); break; @@ -775,7 +775,7 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu break; case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB: v->value_int = - ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)].BufferObj->Name; + ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)].BufferObj->Name; break; case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB: v->value_int = ctx->Array.ArrayObj->ElementArrayBufferObj->Name; @@ -819,7 +819,7 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0; break; case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES: - v->value_int = ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].BufferObj->Name; + v->value_int = ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_POINT_SIZE].BufferObj->Name; break; case GL_FOG_COLOR: diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index 0851b7b7089..cc0c5cd714f 100644 --- a/src/mesa/main/get_hash_params.py +++ b/src/mesa/main/get_hash_params.py @@ -191,17 +191,17 @@ descriptor=[ [ "TEXTURE_2D", "LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA" ], [ "TEXTURE_MATRIX", "LOC_CUSTOM, TYPE_MATRIX, 0, extra_valid_texture_unit" ], [ "TEXTURE_STACK_DEPTH", "LOC_CUSTOM, TYPE_INT, 0, extra_valid_texture_unit" ], - [ "VERTEX_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_POS].Enabled), NO_EXTRA" ], - [ "VERTEX_ARRAY_SIZE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_POS].Size), NO_EXTRA" ], - [ "VERTEX_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_POS].Type), NO_EXTRA" ], - [ "VERTEX_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_POS].Stride), NO_EXTRA" ], - [ "NORMAL_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_NORMAL].Enabled), NO_EXTRA" ], - [ "NORMAL_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_NORMAL].Type), NO_EXTRA" ], - [ "NORMAL_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_NORMAL].Stride), NO_EXTRA" ], - [ "COLOR_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_COLOR0].Enabled), NO_EXTRA" ], - [ "COLOR_ARRAY_SIZE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR0].Size), NO_EXTRA" ], - [ "COLOR_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR0].Type), NO_EXTRA" ], - [ "COLOR_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR0].Stride), NO_EXTRA" ], + [ "VERTEX_ARRAY", "ARRAY_BOOL(_VertexAttrib[VERT_ATTRIB_POS].Enabled), NO_EXTRA" ], + [ "VERTEX_ARRAY_SIZE", "ARRAY_INT(_VertexAttrib[VERT_ATTRIB_POS].Size), NO_EXTRA" ], + [ "VERTEX_ARRAY_TYPE", "ARRAY_ENUM(_VertexAttrib[VERT_ATTRIB_POS].Type), NO_EXTRA" ], + [ "VERTEX_ARRAY_STRIDE", "ARRAY_INT(_VertexAttrib[VERT_ATTRIB_POS].Stride), NO_EXTRA" ], + [ "NORMAL_ARRAY", "ARRAY_BOOL(_VertexAttrib[VERT_ATTRIB_NORMAL].Enabled), NO_EXTRA" ], + [ "NORMAL_ARRAY_TYPE", "ARRAY_ENUM(_VertexAttrib[VERT_ATTRIB_NORMAL].Type), NO_EXTRA" ], + [ "NORMAL_ARRAY_STRIDE", "ARRAY_INT(_VertexAttrib[VERT_ATTRIB_NORMAL].Stride), NO_EXTRA" ], + [ "COLOR_ARRAY", "ARRAY_BOOL(_VertexAttrib[VERT_ATTRIB_COLOR0].Enabled), NO_EXTRA" ], + [ "COLOR_ARRAY_SIZE", "ARRAY_INT(_VertexAttrib[VERT_ATTRIB_COLOR0].Size), NO_EXTRA" ], + [ "COLOR_ARRAY_TYPE", "ARRAY_ENUM(_VertexAttrib[VERT_ATTRIB_COLOR0].Type), NO_EXTRA" ], + [ "COLOR_ARRAY_STRIDE", "ARRAY_INT(_VertexAttrib[VERT_ATTRIB_COLOR0].Stride), NO_EXTRA" ], [ "TEXTURE_COORD_ARRAY", "LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_client_array, Enabled), NO_EXTRA" ], [ "TEXTURE_COORD_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_client_array, Size), NO_EXTRA" ], [ "TEXTURE_COORD_ARRAY_TYPE", "LOC_CUSTOM, TYPE_ENUM, offsetof(struct gl_client_array, Type), NO_EXTRA" ], @@ -221,9 +221,9 @@ descriptor=[ [ "SAMPLE_ALPHA_TO_ONE_ARB", "CONTEXT_BOOL(Multisample.SampleAlphaToOne), NO_EXTRA" ], # GL_ARB_vertex_buffer_object - [ "VERTEX_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_POS].BufferObj), NO_EXTRA" ], - [ "NORMAL_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_NORMAL].BufferObj), NO_EXTRA" ], - [ "COLOR_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_COLOR0].BufferObj), NO_EXTRA" ], + [ "VERTEX_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, _VertexAttrib[VERT_ATTRIB_POS].BufferObj), NO_EXTRA" ], + [ "NORMAL_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, _VertexAttrib[VERT_ATTRIB_NORMAL].BufferObj), NO_EXTRA" ], + [ "COLOR_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, _VertexAttrib[VERT_ATTRIB_COLOR0].BufferObj), NO_EXTRA" ], [ "TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA" ], # GL_OES_point_sprite @@ -233,9 +233,9 @@ descriptor=[ { "apis": ["GLES"], "params": [ # OES_point_size_array - [ "POINT_SIZE_ARRAY_OES", "ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled, TYPE_BOOLEAN)" ], - [ "POINT_SIZE_ARRAY_TYPE_OES", "ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Type, TYPE_ENUM)" ], - [ "POINT_SIZE_ARRAY_STRIDE_OES", "ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Stride, TYPE_INT)" ], + [ "POINT_SIZE_ARRAY_OES", "ARRAY_FIELD(_VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled, TYPE_BOOLEAN)" ], + [ "POINT_SIZE_ARRAY_TYPE_OES", "ARRAY_FIELD(_VertexAttrib[VERT_ATTRIB_POINT_SIZE].Type, TYPE_ENUM)" ], + [ "POINT_SIZE_ARRAY_STRIDE_OES", "ARRAY_FIELD(_VertexAttrib[VERT_ATTRIB_POINT_SIZE].Stride, TYPE_INT)" ], [ "POINT_SIZE_ARRAY_BUFFER_BINDING_OES", "LOC_CUSTOM, TYPE_INT, 0" ], ]}, @@ -521,13 +521,13 @@ descriptor=[ [ "VERTEX_ARRAY_COUNT_EXT", "CONST(0), NO_EXTRA" ], [ "NORMAL_ARRAY_COUNT_EXT", "CONST(0), NO_EXTRA" ], [ "COLOR_ARRAY_COUNT_EXT", "CONST(0), NO_EXTRA" ], - [ "INDEX_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled), NO_EXTRA" ], - [ "INDEX_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Type), NO_EXTRA" ], - [ "INDEX_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Stride), NO_EXTRA" ], + [ "INDEX_ARRAY", "ARRAY_BOOL(_VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled), NO_EXTRA" ], + [ "INDEX_ARRAY_TYPE", "ARRAY_ENUM(_VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Type), NO_EXTRA" ], + [ "INDEX_ARRAY_STRIDE", "ARRAY_INT(_VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Stride), NO_EXTRA" ], [ "INDEX_ARRAY_COUNT_EXT", "CONST(0), NO_EXTRA" ], [ "TEXTURE_COORD_ARRAY_COUNT_EXT", "CONST(0), NO_EXTRA" ], - [ "EDGE_FLAG_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled), NO_EXTRA" ], - [ "EDGE_FLAG_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_EDGEFLAG].Stride), NO_EXTRA" ], + [ "EDGE_FLAG_ARRAY", "ARRAY_BOOL(_VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled), NO_EXTRA" ], + [ "EDGE_FLAG_ARRAY_STRIDE", "ARRAY_INT(_VertexAttrib[VERT_ATTRIB_EDGEFLAG].Stride), NO_EXTRA" ], [ "EDGE_FLAG_ARRAY_COUNT_EXT", "CONST(0), NO_EXTRA" ], # GL_ARB_texture_compression @@ -545,16 +545,16 @@ descriptor=[ # GL_EXT_secondary_color [ "COLOR_SUM", "CONTEXT_BOOL(Fog.ColorSumEnabled), extra_ARB_vertex_program" ], [ "CURRENT_SECONDARY_COLOR", "CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_COLOR1][0], TYPE_FLOATN_4), extra_flush_current" ], - [ "SECONDARY_COLOR_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_COLOR1].Enabled), NO_EXTRA" ], - [ "SECONDARY_COLOR_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR1].Type), NO_EXTRA" ], - [ "SECONDARY_COLOR_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR1].Stride), NO_EXTRA" ], - [ "SECONDARY_COLOR_ARRAY_SIZE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR1].Size), NO_EXTRA" ], + [ "SECONDARY_COLOR_ARRAY", "ARRAY_BOOL(_VertexAttrib[VERT_ATTRIB_COLOR1].Enabled), NO_EXTRA" ], + [ "SECONDARY_COLOR_ARRAY_TYPE", "ARRAY_ENUM(_VertexAttrib[VERT_ATTRIB_COLOR1].Type), NO_EXTRA" ], + [ "SECONDARY_COLOR_ARRAY_STRIDE", "ARRAY_INT(_VertexAttrib[VERT_ATTRIB_COLOR1].Stride), NO_EXTRA" ], + [ "SECONDARY_COLOR_ARRAY_SIZE", "ARRAY_INT(_VertexAttrib[VERT_ATTRIB_COLOR1].Size), NO_EXTRA" ], # GL_EXT_fog_coord [ "CURRENT_FOG_COORDINATE", "CONTEXT_FLOAT(Current.Attrib[VERT_ATTRIB_FOG][0]), extra_flush_current" ], - [ "FOG_COORDINATE_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_FOG].Enabled), NO_EXTRA" ], - [ "FOG_COORDINATE_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_FOG].Type), NO_EXTRA" ], - [ "FOG_COORDINATE_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_FOG].Stride), NO_EXTRA" ], + [ "FOG_COORDINATE_ARRAY", "ARRAY_BOOL(_VertexAttrib[VERT_ATTRIB_FOG].Enabled), NO_EXTRA" ], + [ "FOG_COORDINATE_ARRAY_TYPE", "ARRAY_ENUM(_VertexAttrib[VERT_ATTRIB_FOG].Type), NO_EXTRA" ], + [ "FOG_COORDINATE_ARRAY_STRIDE", "ARRAY_INT(_VertexAttrib[VERT_ATTRIB_FOG].Stride), NO_EXTRA" ], [ "FOG_COORDINATE_SOURCE", "CONTEXT_ENUM(Fog.FogCoordinateSource), NO_EXTRA" ], # GL_NV_fog_distance @@ -585,10 +585,10 @@ descriptor=[ [ "PRIMITIVE_RESTART_INDEX_NV", "CONTEXT_INT(Array.RestartIndex), extra_NV_primitive_restart" ], # GL_ARB_vertex_buffer_object - [ "INDEX_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_COLOR_INDEX].BufferObj), NO_EXTRA" ], - [ "EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_EDGEFLAG].BufferObj), NO_EXTRA" ], - [ "SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_COLOR1].BufferObj), NO_EXTRA" ], - [ "FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_FOG].BufferObj), NO_EXTRA" ], + [ "INDEX_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, _VertexAttrib[VERT_ATTRIB_COLOR_INDEX].BufferObj), NO_EXTRA" ], + [ "EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, _VertexAttrib[VERT_ATTRIB_EDGEFLAG].BufferObj), NO_EXTRA" ], + [ "SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, _VertexAttrib[VERT_ATTRIB_COLOR1].BufferObj), NO_EXTRA" ], + [ "FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, _VertexAttrib[VERT_ATTRIB_FOG].BufferObj), NO_EXTRA" ], # GL_ARB_vertex_program # == GL_VERTEX_PROGRAM_NV diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index 0e075427fa0..60ffaa19879 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -202,42 +202,42 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params ) case GL_VERTEX_ARRAY_POINTER: if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES) goto invalid_pname; - *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Ptr; + *params = (GLvoid *) ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_POS].Ptr; break; case GL_NORMAL_ARRAY_POINTER: if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES) goto invalid_pname; - *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Ptr; + *params = (GLvoid *) ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_NORMAL].Ptr; break; case GL_COLOR_ARRAY_POINTER: if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES) goto invalid_pname; - *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Ptr; + *params = (GLvoid *) ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_COLOR0].Ptr; break; case GL_SECONDARY_COLOR_ARRAY_POINTER_EXT: if (ctx->API != API_OPENGL_COMPAT) goto invalid_pname; - *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Ptr; + *params = (GLvoid *) ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_COLOR1].Ptr; break; case GL_FOG_COORDINATE_ARRAY_POINTER_EXT: if (ctx->API != API_OPENGL_COMPAT) goto invalid_pname; - *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_FOG].Ptr; + *params = (GLvoid *) ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_FOG].Ptr; break; case GL_INDEX_ARRAY_POINTER: if (ctx->API != API_OPENGL_COMPAT) goto invalid_pname; - *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Ptr; + *params = (GLvoid *) ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Ptr; break; case GL_TEXTURE_COORD_ARRAY_POINTER: if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES) goto invalid_pname; - *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX(clientUnit)].Ptr; + *params = (GLvoid *) ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_TEX(clientUnit)].Ptr; break; case GL_EDGE_FLAG_ARRAY_POINTER: if (ctx->API != API_OPENGL_COMPAT) goto invalid_pname; - *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Ptr; + *params = (GLvoid *) ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_EDGEFLAG].Ptr; break; case GL_FEEDBACK_BUFFER_POINTER: if (ctx->API != API_OPENGL_COMPAT) @@ -252,7 +252,7 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params ) case GL_POINT_SIZE_ARRAY_POINTER_OES: if (ctx->API != API_OPENGLES) goto invalid_pname; - *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Ptr; + *params = (GLvoid *) ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_POINT_SIZE].Ptr; break; case GL_DEBUG_CALLBACK_FUNCTION_ARB: if (!_mesa_is_desktop_gl(ctx)) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 500f6701de7..0fd9c1489eb 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1508,7 +1508,7 @@ struct gl_array_object GLboolean EverBound; /** Vertex attribute arrays */ - struct gl_client_array VertexAttrib[VERT_ATTRIB_MAX]; + struct gl_client_array _VertexAttrib[VERT_ATTRIB_MAX]; /** Mask of VERT_BIT_* values indicating which arrays are enabled */ GLbitfield64 _Enabled; diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index bb26b0929c9..e6997f4862f 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -229,7 +229,7 @@ update_array_format(struct gl_context *ctx, elementSize = _mesa_bytes_per_vertex_attrib(size, type); assert(elementSize != -1); - array = &ctx->Array.ArrayObj->VertexAttrib[attrib]; + array = &ctx->Array.ArrayObj->_VertexAttrib[attrib]; array->Size = size; array->Type = type; array->Format = format; @@ -313,7 +313,7 @@ update_array(struct gl_context *ctx, return; } - array = &ctx->Array.ArrayObj->VertexAttrib[attrib]; + array = &ctx->Array.ArrayObj->_VertexAttrib[attrib]; array->Stride = stride; array->StrideB = stride ? stride : array->_ElementSize; array->Ptr = (const GLubyte *) ptr; @@ -567,12 +567,12 @@ _mesa_EnableVertexAttribArray(GLuint index) arrayObj = ctx->Array.ArrayObj; - ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(arrayObj->VertexAttrib)); + ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(arrayObj->_VertexAttrib)); - if (!arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled) { + if (!arrayObj->_VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled) { /* was disabled, now being enabled */ FLUSH_VERTICES(ctx, _NEW_ARRAY); - arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled = GL_TRUE; + arrayObj->_VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled = GL_TRUE; arrayObj->_Enabled |= VERT_BIT_GENERIC(index); arrayObj->NewArrays |= VERT_BIT_GENERIC(index); } @@ -593,12 +593,12 @@ _mesa_DisableVertexAttribArray(GLuint index) arrayObj = ctx->Array.ArrayObj; - ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(arrayObj->VertexAttrib)); + ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(arrayObj->_VertexAttrib)); - if (arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled) { + if (arrayObj->_VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled) { /* was enabled, now being disabled */ FLUSH_VERTICES(ctx, _NEW_ARRAY); - arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled = GL_FALSE; + arrayObj->_VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled = GL_FALSE; arrayObj->_Enabled &= ~VERT_BIT_GENERIC(index); arrayObj->NewArrays |= VERT_BIT_GENERIC(index); } @@ -621,9 +621,9 @@ get_vertex_array_attrib(struct gl_context *ctx, GLuint index, GLenum pname, return 0; } - ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib)); + ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->_VertexAttrib)); - array = &ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)]; + array = &ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_GENERIC(index)]; switch (pname) { case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB: @@ -682,7 +682,7 @@ get_current_attrib(struct gl_context *ctx, GLuint index, const char *function) return NULL; } - ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib)); + ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->_VertexAttrib)); FLUSH_CURRENT(ctx, 0); return ctx->Current.Attrib[VERT_ATTRIB_GENERIC(index)]; @@ -804,9 +804,9 @@ _mesa_GetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid **pointer) return; } - ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib)); + ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->_VertexAttrib)); - *pointer = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Ptr; + *pointer = (GLvoid *) ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_GENERIC(index)].Ptr; } @@ -1194,9 +1194,9 @@ _mesa_VertexAttribDivisor(GLuint index, GLuint divisor) return; } - ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib)); + ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->_VertexAttrib)); - array = &ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)]; + array = &ctx->Array.ArrayObj->_VertexAttrib[VERT_ATTRIB_GENERIC(index)]; if (array->InstanceDivisor != divisor) { FLUSH_VERTICES(ctx, _NEW_ARRAY); array->InstanceDivisor = divisor; @@ -1285,18 +1285,18 @@ _mesa_print_arrays(struct gl_context *ctx) _mesa_update_array_object_max_element(ctx, arrayObj); printf("Array Object %u\n", arrayObj->Name); - if (arrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) - print_array("Vertex", -1, &arrayObj->VertexAttrib[VERT_ATTRIB_POS]); - if (arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) - print_array("Normal", -1, &arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL]); - if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled) - print_array("Color", -1, &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0]); + if (arrayObj->_VertexAttrib[VERT_ATTRIB_POS].Enabled) + print_array("Vertex", -1, &arrayObj->_VertexAttrib[VERT_ATTRIB_POS]); + if (arrayObj->_VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) + print_array("Normal", -1, &arrayObj->_VertexAttrib[VERT_ATTRIB_NORMAL]); + if (arrayObj->_VertexAttrib[VERT_ATTRIB_COLOR0].Enabled) + print_array("Color", -1, &arrayObj->_VertexAttrib[VERT_ATTRIB_COLOR0]); for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) - if (arrayObj->VertexAttrib[VERT_ATTRIB_TEX(i)].Enabled) - print_array("TexCoord", i, &arrayObj->VertexAttrib[VERT_ATTRIB_TEX(i)]); + if (arrayObj->_VertexAttrib[VERT_ATTRIB_TEX(i)].Enabled) + print_array("TexCoord", i, &arrayObj->_VertexAttrib[VERT_ATTRIB_TEX(i)]); for (i = 0; i < VERT_ATTRIB_GENERIC_MAX; i++) - if (arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(i)].Enabled) - print_array("Attrib", i, &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(i)]); + if (arrayObj->_VertexAttrib[VERT_ATTRIB_GENERIC(i)].Enabled) + print_array("Attrib", i, &arrayObj->_VertexAttrib[VERT_ATTRIB_GENERIC(i)]); printf(" _MaxElement = %u\n", arrayObj->_MaxElement); } diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index f25a9dec308..d72382376bd 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -318,8 +318,8 @@ check_draw_elements_data(struct gl_context *ctx, GLsizei count, GLenum elemType, } /* check element j of each enabled array */ - for (k = 0; k < Elements(arrayObj->VertexAttrib); k++) { - check_array_data(ctx, &arrayObj->VertexAttrib[k], k, j); + for (k = 0; k < Elements(arrayObj->_VertexAttrib); k++) { + check_array_data(ctx, &arrayObj->_VertexAttrib[k], k, j); } } @@ -327,8 +327,8 @@ check_draw_elements_data(struct gl_context *ctx, GLsizei count, GLenum elemType, ctx->Driver.UnmapBuffer(ctx, ctx->Array.ArrayObj->ElementArrayBufferObj); } - for (k = 0; k < Elements(arrayObj->VertexAttrib); k++) { - unmap_array_buffer(ctx, &arrayObj->VertexAttrib[k]); + for (k = 0; k < Elements(arrayObj->_VertexAttrib); k++) { + unmap_array_buffer(ctx, &arrayObj->_VertexAttrib[k]); } } @@ -368,7 +368,7 @@ print_draw_arrays(struct gl_context *ctx, exec->array.inputs[i]->Size, stride, /*exec->array.inputs[i]->Enabled,*/ - arrayObj->VertexAttrib[VERT_ATTRIB_FF(i)].Enabled, + arrayObj->_VertexAttrib[VERT_ATTRIB_FF(i)].Enabled, exec->array.inputs[i]->Ptr, bufName); @@ -405,7 +405,7 @@ recalculate_input_bindings(struct gl_context *ctx) { struct vbo_context *vbo = vbo_context(ctx); struct vbo_exec_context *exec = &vbo->exec; - struct gl_client_array *vertexAttrib = ctx->Array.ArrayObj->VertexAttrib; + struct gl_client_array *vertexAttrib = ctx->Array.ArrayObj->_VertexAttrib; const struct gl_client_array **inputs = &exec->array.inputs[0]; GLbitfield64 const_inputs = 0x0; GLuint i; -- 2.30.2