aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2018-02-25 18:01:07 +0100
committerMathias Fröhlich <[email protected]>2018-03-01 04:06:23 +0100
commit6dd3e98c213f8c82a934c49eb369e88f5a648f19 (patch)
tree4abe62925e9799ca2699b2730d6737e6d1e078f9 /src/mesa
parent95b4be4f29fab106cee715dd96657be044e54654 (diff)
vbo: Remove vbo_save_vertex_list::attrsz.
Is not used anymore on replay, move the last use in display list compilation to the original array in the display list compiler. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/vbo/vbo_save.h1
-rw-r--r--src/mesa/vbo/vbo_save_api.c10
2 files changed, 4 insertions, 7 deletions
diff --git a/src/mesa/vbo/vbo_save.h b/src/mesa/vbo/vbo_save.h
index 3ccbfac7e28..cbf73892ee1 100644
--- a/src/mesa/vbo/vbo_save.h
+++ b/src/mesa/vbo/vbo_save.h
@@ -61,7 +61,6 @@ struct vbo_save_copied_vtx {
* compiled using the fallback opcode mechanism provided by dlist.c.
*/
struct vbo_save_vertex_list {
- GLubyte attrsz[VBO_ATTRIB_MAX];
GLuint vertex_size; /**< size in GLfloats */
struct gl_vertex_array_object *VAO[VP_MODE_MAX];
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 2263276a18a..e21315120dc 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -543,8 +543,6 @@ compile_vertex_list(struct gl_context *ctx)
/* Duplicate our template, increment refcounts to the storage structs:
*/
- STATIC_ASSERT(sizeof(node->attrsz) == sizeof(save->attrsz));
- memcpy(node->attrsz, save->attrsz, sizeof(node->attrsz));
node->vertex_size = save->vertex_size;
node->buffer_offset =
(save->buffer_map - save->vertex_store->buffer_map) * sizeof(GLfloat);
@@ -580,7 +578,7 @@ compile_vertex_list(struct gl_context *ctx)
update_vao(ctx, vpm, &save->VAO[vpm],
save->vertex_store->bufferobj, buffer_offset,
node->vertex_size*sizeof(GLfloat), save->enabled,
- node->attrsz, save->attrtype, offsets);
+ save->attrsz, save->attrtype, offsets);
/* Reference the vao in the dlist */
node->VAO[vpm] = NULL;
_mesa_reference_vao(ctx, &node->VAO[vpm], save->VAO[vpm]);
@@ -592,14 +590,14 @@ compile_vertex_list(struct gl_context *ctx)
node->current_data = NULL;
}
else {
- GLuint current_size = node->vertex_size - node->attrsz[0];
+ GLuint current_size = node->vertex_size - save->attrsz[0];
node->current_data = NULL;
if (current_size) {
node->current_data = malloc(current_size * sizeof(GLfloat));
if (node->current_data) {
const char *buffer = (const char *) save->vertex_store->buffer_map;
- unsigned attr_offset = node->attrsz[0] * sizeof(GLfloat);
+ unsigned attr_offset = save->attrsz[0] * sizeof(GLfloat);
unsigned vertex_offset = 0;
if (node->vertex_count)
@@ -615,7 +613,7 @@ compile_vertex_list(struct gl_context *ctx)
}
}
- assert(node->attrsz[VBO_ATTRIB_POS] != 0 || node->vertex_count == 0);
+ assert(save->attrsz[VBO_ATTRIB_POS] != 0 || node->vertex_count == 0);
if (save->dangling_attr_ref)
ctx->ListState.CurrentList->Flags |= DLIST_DANGLING_REFS;