From 7e1b57a6d964ac58e84ec4ece2951e4e643d6b1a Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 16 Apr 2020 09:46:04 -0700 Subject: mesa: avoid redundant VBO updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoids re-emitting unchanged VBO state, which is a big chunk of the state updates in gfxbench driver2 Signed-off-by: Rob Clark Reviewed-by: Kristian H. Kristensen Reviewed-by: Eric Anholt Reviewed-by: Marek Olšák Part-of: --- src/mesa/vbo/vbo_private.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/mesa/vbo') diff --git a/src/mesa/vbo/vbo_private.h b/src/mesa/vbo/vbo_private.h index a70ba0a032c..85396654682 100644 --- a/src/mesa/vbo/vbo_private.h +++ b/src/mesa/vbo/vbo_private.h @@ -243,12 +243,7 @@ _vbo_set_attrib_format(struct gl_context *ctx, size /= 2; _mesa_update_array_format(ctx, vao, attr, size, type, GL_RGBA, GL_FALSE, integer, doubles, offset); - /* Ptr for userspace arrays. - * For updating the pointer we would need to add the vao->NewArrays flag - * to the VAO. But but that is done already unconditionally in - * _mesa_update_array_format called above. - */ - assert((vao->NewArrays | ~vao->Enabled) & VERT_BIT(attr)); + vao->NewArrays |= vao->Enabled & VERT_BIT(attr); vao->VertexAttrib[attr].Ptr = ADD_POINTERS(buffer_offset, offset); } -- cgit v1.2.3