mesa: rename gl_vertex_attrib_array gl_array_attributes
authorBrian Paul <brianp@vmware.com>
Thu, 6 Oct 2016 23:30:20 +0000 (17:30 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 13 Oct 2016 23:38:49 +0000 (17:38 -0600)
The structure contains the attributes of a vertex array.  The old name
was kind of confusing.

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
src/mesa/main/api_arrayelt.c
src/mesa/main/arrayobj.c
src/mesa/main/get.c
src/mesa/main/get_hash_params.py
src/mesa/main/mtypes.h
src/mesa/main/varray.c
src/mesa/main/varray.h
src/mesa/vbo/vbo_exec_array.c

index cc7dee3b8dabdfa3eb8bc117488a0710cf90e538..54cdb5093259cddf0349c1b8a9fdb414d60dcf94 100644 (file)
@@ -48,7 +48,7 @@
 typedef void (GLAPIENTRY *array_func)( const void * );
 
 typedef struct {
-   const struct gl_vertex_attrib_array *array;
+   const struct gl_array_attributes *array;
    const struct gl_vertex_buffer_binding *binding;
    int offset;
 } AEarray;
@@ -56,7 +56,7 @@ typedef struct {
 typedef void (GLAPIENTRY *attrib_func)( GLuint indx, const void *data );
 
 typedef struct {
-   const struct gl_vertex_attrib_array *array;
+   const struct gl_array_attributes *array;
    const struct gl_vertex_buffer_binding *binding;
    attrib_func func;
    GLuint index;
@@ -1613,7 +1613,7 @@ _ae_update_state(struct gl_context *ctx)
    }
 
    for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
-      struct gl_vertex_attrib_array *attribArray =
+      struct gl_array_attributes *attribArray =
          &vao->VertexAttrib[VERT_ATTRIB_TEX(i)];
       if (attribArray->Enabled) {
          /* NOTE: we use generic glVertexAttribNV functions here.
@@ -1633,7 +1633,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_vertex_attrib_array *attribArray =
+      struct gl_array_attributes *attribArray =
          &vao->VertexAttrib[VERT_ATTRIB_GENERIC(i)];
       if (attribArray->Enabled) {
          GLint intOrNorm;
index 82589645aa16675f76a15d7b6fceb78769b7bf20..11e34826deb23efeabaf7aa96b33788e900395ef 100644 (file)
@@ -235,7 +235,7 @@ init_array(struct gl_context *ctx,
            struct gl_vertex_array_object *vao,
            GLuint index, GLint size, GLint type)
 {
-   struct gl_vertex_attrib_array *array = &vao->VertexAttrib[index];
+   struct gl_array_attributes *array = &vao->VertexAttrib[index];
    struct gl_vertex_buffer_binding *binding = &vao->VertexBinding[index];
 
    array->Size = size;
@@ -353,7 +353,7 @@ _mesa_update_vao_client_arrays(struct gl_context *ctx,
       const int attrib = u_bit_scan64(&arrays);
 
       struct gl_client_array *client_array;
-      struct gl_vertex_attrib_array *attrib_array;
+      struct gl_array_attributes *attrib_array;
       struct gl_vertex_buffer_binding *buffer_binding;
 
       attrib_array = &vao->VertexAttrib[attrib];
@@ -377,7 +377,7 @@ _mesa_all_varyings_in_vbos(const struct gl_vertex_array_object *vao)
        * attrib arrays at once
        */
       const int i = ffsll(mask) - 1;
-      const struct gl_vertex_attrib_array *attrib_array =
+      const struct gl_array_attributes *attrib_array =
          &vao->VertexAttrib[i];
       const struct gl_vertex_buffer_binding *buffer_binding =
          &vao->VertexBinding[attrib_array->BufferBindingIndex];
@@ -408,7 +408,7 @@ _mesa_all_buffers_are_unmapped(const struct gl_vertex_array_object *vao)
 
    while (mask) {
       const int i = ffsll(mask) - 1;
-      const struct gl_vertex_attrib_array *attrib_array =
+      const struct gl_array_attributes *attrib_array =
          &vao->VertexAttrib[i];
       const struct gl_vertex_buffer_binding *buffer_binding =
          &vao->VertexBinding[attrib_array->BufferBindingIndex];
index c11bcde207a244856d261d8f8f634e218fb35dd2..6234f6ed6b7b7769bd44705c106102f7da178b86 100644 (file)
@@ -607,7 +607,7 @@ static void
 find_custom_value(struct gl_context *ctx, const struct value_desc *d, union value *v)
 {
    struct gl_buffer_object **buffer_obj;
-   struct gl_vertex_attrib_array *array;
+   struct gl_array_attributes *array;
    GLuint unit, *p;
 
    switch (d->pname) {
index 3c6b7129afb6b38dfa5becd2c3486c03505bc2d5..52371805941f19212ea545ab3e2aedc331c4bfdc 100644 (file)
@@ -217,10 +217,10 @@ descriptor=[
   [ "COLOR_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, 0, 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_vertex_attrib_array, Enabled), NO_EXTRA" ],
-  [ "TEXTURE_COORD_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_vertex_attrib_array, Size), NO_EXTRA" ],
-  [ "TEXTURE_COORD_ARRAY_TYPE", "LOC_CUSTOM, TYPE_ENUM, offsetof(struct gl_vertex_attrib_array, Type), NO_EXTRA" ],
-  [ "TEXTURE_COORD_ARRAY_STRIDE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_vertex_attrib_array, Stride), NO_EXTRA" ],
+  [ "TEXTURE_COORD_ARRAY", "LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_array_attributes, Enabled), NO_EXTRA" ],
+  [ "TEXTURE_COORD_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_attributes, Size), NO_EXTRA" ],
+  [ "TEXTURE_COORD_ARRAY_TYPE", "LOC_CUSTOM, TYPE_ENUM, offsetof(struct gl_array_attributes, Type), NO_EXTRA" ],
+  [ "TEXTURE_COORD_ARRAY_STRIDE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_attributes, Stride), NO_EXTRA" ],
 
 # GL_ARB_multitexture
   [ "MAX_TEXTURE_UNITS", "CONTEXT_INT(Const.MaxTextureUnits), NO_EXTRA" ],
index a639fd24ac5e12940eb10a14aadf69bdf935322e..ff202260812a91f98249cd9bc49b150ff455b601 100644 (file)
@@ -1351,7 +1351,7 @@ struct gl_client_array
 
 
 /**
- * Vertex attribute array as seen by the client.
+ * Attributes to describe a vertex array.
  *
  * Contains the size, type, format and normalization flag,
  * along with the index of a vertex buffer binding point.
@@ -1363,7 +1363,7 @@ struct gl_client_array
  * and VERTEX_BINDING_STRIDE to the same value, while
  * glBindVertexBuffer() will only set VERTEX_BINDING_STRIDE.
  */
-struct gl_vertex_attrib_array
+struct gl_array_attributes
 {
    GLint Size;              /**< Components per element (1,2,3,4) */
    GLenum Type;             /**< Datatype: GL_FLOAT, GL_INT, etc */
@@ -1441,7 +1441,7 @@ struct gl_vertex_array_object
    struct gl_client_array _VertexAttrib[VERT_ATTRIB_MAX];
 
    /** Vertex attribute arrays */
-   struct gl_vertex_attrib_array VertexAttrib[VERT_ATTRIB_MAX];
+   struct gl_array_attributes VertexAttrib[VERT_ATTRIB_MAX];
 
    /** Vertex buffer bindings */
    struct gl_vertex_buffer_binding VertexBinding[VERT_ATTRIB_MAX];
index a2f957a66d25aa000130f27b013acab692539dbe..781d7633cff16cbbe8e611e749d3e752d093d371 100644 (file)
@@ -133,7 +133,7 @@ vertex_attrib_binding(struct gl_context *ctx,
                       GLuint attribIndex,
                       GLuint bindingIndex)
 {
-   struct gl_vertex_attrib_array *array = &vao->VertexAttrib[attribIndex];
+   struct gl_array_attributes *array = &vao->VertexAttrib[attribIndex];
 
    if (!_mesa_is_bufferobj(vao->VertexBinding[bindingIndex].BufferObj))
      vao->VertexAttribBufferMask &= ~VERT_BIT(attribIndex);
@@ -278,7 +278,7 @@ _mesa_update_array_format(struct gl_context *ctx,
                           GLboolean integer, GLboolean doubles,
                           GLuint relativeOffset, bool flush_vertices)
 {
-   struct gl_vertex_attrib_array *const array = &vao->VertexAttrib[attrib];
+   struct gl_array_attributes *const array = &vao->VertexAttrib[attrib];
    GLint elementSize;
 
    assert(size <= 4);
@@ -465,7 +465,7 @@ update_array(struct gl_context *ctx,
              GLboolean normalized, GLboolean integer, GLboolean doubles,
              const GLvoid *ptr)
 {
-   struct gl_vertex_attrib_array *array;
+   struct gl_array_attributes *array;
    GLsizei effectiveStride;
 
    /* Page 407 (page 423 of the PDF) of the OpenGL 3.0 spec says:
@@ -905,7 +905,7 @@ get_vertex_array_attrib(struct gl_context *ctx,
                         GLuint index, GLenum pname,
                         const char *caller)
 {
-   const struct gl_vertex_attrib_array *array;
+   const struct gl_array_attributes *array;
 
    if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) {
       _mesa_error(ctx, GL_INVALID_VALUE, "%s(index=%u)", caller, index);
@@ -2327,8 +2327,8 @@ _mesa_copy_client_array(struct gl_context *ctx,
 
 void
 _mesa_copy_vertex_attrib_array(struct gl_context *ctx,
-                               struct gl_vertex_attrib_array *dst,
-                               const struct gl_vertex_attrib_array *src)
+                               struct gl_array_attributes *dst,
+                               const struct gl_array_attributes *src)
 {
    dst->Size           = src->Size;
    dst->Type           = src->Type;
@@ -2369,7 +2369,7 @@ _mesa_print_arrays(struct gl_context *ctx)
 
    unsigned i;
    for (i = 0; i < VERT_ATTRIB_MAX; ++i) {
-      const struct gl_vertex_attrib_array *array = &vao->VertexAttrib[i];
+      const struct gl_array_attributes *array = &vao->VertexAttrib[i];
       if (!array->Enabled)
          continue;
 
index 54229ffcd8c83771aeecf8cf1132c095cf2fe962..bc1c0c6f720f3f60c783a67b2de857a3651def20 100644 (file)
@@ -40,7 +40,7 @@ struct gl_context;
  * a vertex buffer.
  */
 static inline const GLubyte *
-_mesa_vertex_attrib_address(const struct gl_vertex_attrib_array *array,
+_mesa_vertex_attrib_address(const struct gl_array_attributes *array,
                             const struct gl_vertex_buffer_binding *binding)
 {
    if (_mesa_is_bufferobj(binding->BufferObj))
@@ -56,7 +56,7 @@ _mesa_vertex_attrib_address(const struct gl_vertex_attrib_array *array,
 static inline void
 _mesa_update_client_array(struct gl_context *ctx,
                           struct gl_client_array *dst,
-                          const struct gl_vertex_attrib_array *src,
+                          const struct gl_array_attributes *src,
                           const struct gl_vertex_buffer_binding *binding)
 {
    dst->Size = src->Size;
@@ -378,8 +378,8 @@ _mesa_copy_client_array(struct gl_context *ctx,
 
 extern void
 _mesa_copy_vertex_attrib_array(struct gl_context *ctx,
-                               struct gl_vertex_attrib_array *dst,
-                               const struct gl_vertex_attrib_array *src);
+                               struct gl_array_attributes *dst,
+                               const struct gl_array_attributes *src);
 
 extern void
 _mesa_copy_vertex_buffer_binding(struct gl_context *ctx,
index b5ed210f6683868a4a296b847ed4feb122ec9b95..1425e0bf2cc5987e35d0eeeab3504683f2ed346c 100644 (file)
@@ -51,7 +51,7 @@ static void
 check_array_data(struct gl_context *ctx, struct gl_vertex_array_object *vao,
                  GLuint attrib, GLuint j)
 {
-   const struct gl_vertex_attrib_array *array = &vao->VertexAttrib[attrib];
+   const struct gl_array_attributes *array = &vao->VertexAttrib[attrib];
    if (array->Enabled) {
       const struct gl_vertex_buffer_binding *binding =
          &vao->VertexBinding[array->BufferBindingIndex];
@@ -103,7 +103,7 @@ static void
 unmap_array_buffer(struct gl_context *ctx, struct gl_vertex_array_object *vao,
                    GLuint attrib)
 {
-   const struct gl_vertex_attrib_array *array = &vao->VertexAttrib[attrib];
+   const struct gl_array_attributes *array = &vao->VertexAttrib[attrib];
    if (array->Enabled) {
       const struct gl_vertex_buffer_binding *binding =
          &vao->VertexBinding[array->BufferBindingIndex];
@@ -196,7 +196,7 @@ print_draw_arrays(struct gl_context *ctx,
 
    unsigned i;
    for (i = 0; i < VERT_ATTRIB_MAX; ++i) {
-      const struct gl_vertex_attrib_array *array = &vao->VertexAttrib[i];
+      const struct gl_array_attributes *array = &vao->VertexAttrib[i];
       if (!array->Enabled)
          continue;
 
@@ -245,7 +245,7 @@ recalculate_input_bindings(struct gl_context *ctx)
 {
    struct vbo_context *vbo = vbo_context(ctx);
    struct vbo_exec_context *exec = &vbo->exec;
-   const struct gl_vertex_attrib_array *array = ctx->Array.VAO->VertexAttrib;
+   const struct gl_array_attributes *array = ctx->Array.VAO->VertexAttrib;
    struct gl_client_array *vertexAttrib = ctx->Array.VAO->_VertexAttrib;
    const struct gl_client_array **inputs = &exec->array.inputs[0];
    GLbitfield64 const_inputs = 0x0;