mesa: Fix VAO buffer object tracking.
authorMathias Fröhlich <mathias.froehlich@web.de>
Sun, 4 Feb 2018 12:18:34 +0000 (13:18 +0100)
committerMathias Fröhlich <mathias.froehlich@web.de>
Fri, 9 Feb 2018 03:21:36 +0000 (04:21 +0100)
When changing the attribute binding in the VAO we also need to
account for getting rid of non vbo bits from VertexAttribBufferMask.

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/varray.c

index b268aaa9a3c5f6fc7b67a663da4f6d8376244873..4dfc3546a8c7afec1446ed19a39ba3595d910008 100644 (file)
@@ -168,6 +168,8 @@ vertex_attrib_binding(struct gl_context *ctx,
 
       if (_mesa_is_bufferobj(vao->BufferBinding[bindingIndex].BufferObj))
          vao->VertexAttribBufferMask |= array_bit;
+      else
+         vao->VertexAttribBufferMask &= ~array_bit;
 
       FLUSH_VERTICES(ctx, _NEW_ARRAY);