[Mesa-dev] [PATCH 10/12] vbo: Remove vbo_save_vertex_list::start_vertex.
Mathias.Froehlich at gmx.net
Mathias.Froehlich at gmx.net
Tue Feb 27 06:12:29 UTC 2018
From: Mathias Fröhlich <mathias.froehlich at web.de>
Replace last use on replay with _vbo_save_get_{min,max}_index. Appart from
that it is not used anymore.
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich at web.de>
---
src/mesa/vbo/vbo_save.h | 1 -
src/mesa/vbo/vbo_save_api.c | 3 ---
src/mesa/vbo/vbo_save_draw.c | 4 ++--
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/mesa/vbo/vbo_save.h b/src/mesa/vbo/vbo_save.h
index a51a0d8b28..6cd82094e3 100644
--- a/src/mesa/vbo/vbo_save.h
+++ b/src/mesa/vbo/vbo_save.h
@@ -71,7 +71,6 @@ struct vbo_save_vertex_list {
fi_type *current_data;
GLuint buffer_offset; /**< in bytes */
- GLuint start_vertex; /**< first vertex used by any primitive */
GLuint vertex_count; /**< number of vertices in this list */
GLuint wrap_count; /* number of copied vertices at start */
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index e21315120d..e8d027f15c 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -642,9 +642,6 @@ compile_vertex_list(struct gl_context *ctx)
for (unsigned i = 0; i < node->prim_count; i++) {
node->prims[i].start += start_offset;
}
- node->start_vertex = start_offset;
- } else {
- node->start_vertex = 0;
}
/* Deal with GL_COMPILE_AND_EXECUTE:
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index b8b6b872c0..137fb6e3fd 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -213,8 +213,8 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data)
assert(ctx->NewState == 0);
if (node->vertex_count > 0) {
- GLuint min_index = node->start_vertex;
- GLuint max_index = min_index + node->vertex_count - 1;
+ GLuint min_index = _vbo_save_get_min_index(node);
+ GLuint max_index = _vbo_save_get_max_index(node);
vbo->draw_prims(ctx,
node->prims,
node->prim_count,
--
2.14.3
More information about the mesa-dev
mailing list