summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 8836c182a41..58f376b8af3 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -135,6 +135,11 @@ vertex_attrib_binding(struct gl_context *ctx,
{
struct gl_vertex_attrib_array *array = &vao->VertexAttrib[attribIndex];
+ if (!_mesa_is_bufferobj(vao->VertexBinding[bindingIndex].BufferObj))
+ vao->VertexAttribBufferMask &= ~VERT_BIT(attribIndex);
+ else
+ vao->VertexAttribBufferMask |= VERT_BIT(attribIndex);
+
if (array->VertexBinding != bindingIndex) {
const GLbitfield64 array_bit = VERT_BIT(attribIndex);
@@ -174,6 +179,11 @@ _mesa_bind_vertex_buffer(struct gl_context *ctx,
binding->Offset = offset;
binding->Stride = stride;
+ if (!_mesa_is_bufferobj(vbo))
+ vao->VertexAttribBufferMask &= ~binding->_BoundArrays;
+ else
+ vao->VertexAttribBufferMask |= binding->_BoundArrays;
+
vao->NewArrays |= binding->_BoundArrays;
}
}