summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/arrayobj.c
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2018-03-04 18:15:53 +0100
committerMathias Fröhlich <[email protected]>2018-03-10 07:33:51 +0100
commit64d2a20480547d5897fd9d7b8fd306f2625138cb (patch)
tree15d831310fe0a2e2ff7d3c58eac8fceecc738f15 /src/mesa/main/arrayobj.c
parentd62f0df3541ab9ee7a4999f0ecedc52f8d1ab8cc (diff)
mesa: Make gl_vertex_array contain pointers to first order VAO members.
Instead of keeping a copy of the vertex array content in struct gl_vertex_array only keep pointers to the first order information originaly in the VAO. For that represent the current values by struct gl_array_attributes and struct gl_vertex_buffer_binding. v2: Change comments. Remove gl... prefix from variables except in the i965 directory where it was like that before. Reindent because of that. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/main/arrayobj.c')
-rw-r--r--src/mesa/main/arrayobj.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 2526404fda3..7cb98337198 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -284,9 +284,6 @@ unbind_array_object_vbos(struct gl_context *ctx, struct gl_vertex_array_object *
for (i = 0; i < ARRAY_SIZE(obj->BufferBinding); i++)
_mesa_reference_buffer_object(ctx, &obj->BufferBinding[i].BufferObj, NULL);
-
- for (i = 0; i < ARRAY_SIZE(obj->_VertexArray); i++)
- _mesa_reference_buffer_object(ctx, &obj->_VertexArray[i].BufferObj, NULL);
}
@@ -462,21 +459,8 @@ void
_mesa_update_vao_derived_arrays(struct gl_context *ctx,
struct gl_vertex_array_object *vao)
{
- GLbitfield arrays = vao->NewArrays;
-
/* Make sure we do not run into problems with shared objects */
assert(!vao->SharedAndImmutable || vao->NewArrays == 0);
-
- while (arrays) {
- const int attrib = u_bit_scan(&arrays);
- struct gl_vertex_array *array = &vao->_VertexArray[attrib];
- const struct gl_array_attributes *attribs =
- &vao->VertexAttrib[attrib];
- const struct gl_vertex_buffer_binding *buffer_binding =
- &vao->BufferBinding[attribs->BufferBindingIndex];
-
- _mesa_update_vertex_array(ctx, array, attribs, buffer_binding);
- }
}