vbo: rename vbo_save_vertex_list::count to vertex_count
authorBrian Paul <brianp@vmware.com>
Fri, 12 Jan 2018 16:23:37 +0000 (09:23 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 17 Jan 2018 18:17:56 +0000 (11:17 -0700)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/vbo/vbo_save.h
src/mesa/vbo/vbo_save_api.c
src/mesa/vbo/vbo_save_draw.c

index 5eed3aeb7407cd305c4ff6bd954537dd1095d9c7..2720d13d9ee509f06cf583880ae89a78a78571ea 100644 (file)
@@ -74,7 +74,7 @@ struct vbo_save_vertex_list {
    GLuint current_size;
 
    GLuint buffer_offset;
-   GLuint count;                /**< vertex count */
+   GLuint vertex_count;
    GLuint wrap_count;          /* number of copied vertices at start */
    GLboolean dangling_attr_ref;        /* current attr implicitly referenced
                                    outside the list */
index 05ccb415ee81e859b9941479c515e46ae84fdc87..98ced2b59a5628fd577686bf52db1e7e65f238d7 100644 (file)
@@ -389,7 +389,7 @@ convert_line_loop_to_strip(struct vbo_save_context *save,
       memcpy(dst, src, sz * sizeof(float));
 
       prim->count++;
-      node->count++;
+      node->vertex_count++;
       save->vert_count++;
       save->buffer_ptr += sz;
       save->vertex_store->used += sz;
@@ -437,7 +437,7 @@ _save_compile_vertex_list(struct gl_context *ctx)
    node->vertex_size = save->vertex_size;
    node->buffer_offset =
       (save->buffer - save->vertex_store->buffer_map) * sizeof(GLfloat);
-   node->count = save->vert_count;
+   node->vertex_count = save->vert_count;
    node->wrap_count = save->copied.nr;
    node->dangling_attr_ref = save->dangling_attr_ref;
    node->prim = save->prim;
@@ -466,9 +466,9 @@ _save_compile_vertex_list(struct gl_context *ctx)
             unsigned attr_offset = node->attrsz[0] * sizeof(GLfloat);
             unsigned vertex_offset = 0;
 
-            if (node->count)
+            if (node->vertex_count)
                vertex_offset =
-                  (node->count - 1) * node->vertex_size * sizeof(GLfloat);
+                  (node->vertex_count - 1) * node->vertex_size * sizeof(GLfloat);
 
             memcpy(node->current_data,
                    buffer + node->buffer_offset + vertex_offset + attr_offset,
@@ -477,12 +477,12 @@ _save_compile_vertex_list(struct gl_context *ctx)
       }
    }
 
-   assert(node->attrsz[VBO_ATTRIB_POS] != 0 || node->count == 0);
+   assert(node->attrsz[VBO_ATTRIB_POS] != 0 || node->vertex_count == 0);
 
    if (save->dangling_attr_ref)
       ctx->ListState.CurrentList->Flags |= DLIST_DANGLING_REFS;
 
-   save->vertex_store->used += save->vertex_size * node->count;
+   save->vertex_store->used += save->vertex_size * node->vertex_count;
    save->prim_store->used += node->prim_count;
 
    /* Copy duplicated vertices
@@ -1665,7 +1665,7 @@ vbo_print_vertex_list(struct gl_context *ctx, void *data, FILE *f)
 
    fprintf(f, "VBO-VERTEX-LIST, %u vertices, %d primitives, %d vertsize, "
            "buffer %p\n",
-           node->count, node->prim_count, node->vertex_size,
+           node->vertex_count, node->prim_count, node->vertex_size,
            buffer);
 
    for (i = 0; i < node->prim_count; i++) {
index 4b79e9c5577652fa16c5b9a9f45ddb5f82780533..e7e4e94ee95a0adbd02cb01c5d93fabfe0bb6bc0 100644 (file)
@@ -62,9 +62,10 @@ _playback_copy_to_current(struct gl_context *ctx,
    else {
       data = vertex;
 
-      if (node->count)
+      if (node->vertex_count)
          offset = (node->buffer_offset +
-                   (node->count - 1) * node->vertex_size * sizeof(GLfloat));
+                   (node->vertex_count - 1)
+                   * node->vertex_size * sizeof(GLfloat));
       else
          offset = node->buffer_offset;
 
@@ -312,14 +313,14 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data)
       if (ctx->NewState)
          _mesa_update_state(ctx);
 
-      if (node->count > 0) {
+      if (node->vertex_count > 0) {
          vbo_context(ctx)->draw_prims(ctx,
                                       node->prim,
                                       node->prim_count,
                                       NULL,
                                       GL_TRUE,
                                       0,    /* Node is a VBO, so this is ok */
-                                      node->count - 1,
+                                      node->vertex_count - 1,
                                       NULL, 0, NULL);
       }
    }