summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2018-01-12 09:23:37 -0700
committerBrian Paul <[email protected]>2018-01-17 11:17:56 -0700
commit65df0d41cf8ab7ef49830e0bc265e4e46cc7070c (patch)
treeaf2226a56ee010d36a3a3b4a32552c8bbf85648a /src/mesa/vbo
parentb04195b9591604cbdf148781399c2253ccb73f14 (diff)
vbo: rename vbo_save_vertex_list::count to vertex_count
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_save.h2
-rw-r--r--src/mesa/vbo/vbo_save_api.c14
-rw-r--r--src/mesa/vbo/vbo_save_draw.c9
3 files changed, 13 insertions, 12 deletions
diff --git a/src/mesa/vbo/vbo_save.h b/src/mesa/vbo/vbo_save.h
index 5eed3aeb740..2720d13d9ee 100644
--- a/src/mesa/vbo/vbo_save.h
+++ b/src/mesa/vbo/vbo_save.h
@@ -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 */
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 05ccb415ee8..98ced2b59a5 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -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++) {
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index 4b79e9c5577..e7e4e94ee95 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -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);
}
}