Mesa (master): mesa: Use VertexArray, not _VertexArray, in array size expressions.
Kenneth Graunke
kwg at kemper.freedesktop.org
Thu Sep 25 06:12:35 UTC 2014
Module: Mesa
Branch: master
Commit: 23247e8059b92cd0330fbf9a4ec8b7227c53d50f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=23247e8059b92cd0330fbf9a4ec8b7227c53d50f
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Fri Aug 22 23:01:15 2014 -0700
mesa: Use VertexArray, not _VertexArray, in array size expressions.
Both sizes are VERT_ATTRIB_MAX, so this has no effect. But it drops a
few trivial uses of the derived state.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Fredrik Höglund <fredrik at kde.org>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/mesa/main/arrayobj.c | 2 +-
src/mesa/main/attrib.c | 2 +-
src/mesa/main/varray.c | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 0d77b11..6440ea6 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -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 < Elements(obj->VertexAttrib); i++) {
switch (i) {
case VERT_ATTRIB_WEIGHT:
init_array(ctx, obj, VERT_ATTRIB_WEIGHT, 1, GL_FLOAT);
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index ef98ba7..d90e662 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1449,7 +1449,7 @@ 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++) {
+ for (i = 0; i < Elements(src->VertexAttrib); i++) {
_mesa_copy_client_array(ctx, &dest->_VertexAttrib[i], &src->_VertexAttrib[i]);
_mesa_copy_vertex_attrib_array(ctx, &dest->VertexAttrib[i], &src->VertexAttrib[i]);
_mesa_copy_vertex_buffer_binding(ctx, &dest->VertexBinding[i], &src->VertexBinding[i]);
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index ead7864..09bf52c 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -711,7 +711,7 @@ _mesa_EnableVertexAttribArray(GLuint index)
vao = ctx->Array.VAO;
- ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(vao->_VertexAttrib));
+ ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(vao->VertexAttrib));
if (!vao->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled) {
/* was disabled, now being enabled */
@@ -737,7 +737,7 @@ _mesa_DisableVertexAttribArray(GLuint index)
vao = ctx->Array.VAO;
- ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(vao->_VertexAttrib));
+ ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(vao->VertexAttrib));
if (vao->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled) {
/* was enabled, now being disabled */
@@ -831,7 +831,7 @@ get_current_attrib(struct gl_context *ctx, GLuint index, const char *function)
return NULL;
}
- ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.VAO->_VertexAttrib));
+ ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.VAO->VertexAttrib));
FLUSH_CURRENT(ctx, 0);
return ctx->Current.Attrib[VERT_ATTRIB_GENERIC(index)];
@@ -953,7 +953,7 @@ _mesa_GetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid **pointer)
return;
}
- ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.VAO->_VertexAttrib));
+ ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.VAO->VertexAttrib));
*pointer = (GLvoid *) ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Ptr;
}
More information about the mesa-commit
mailing list