aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2020-04-16 09:46:04 -0700
committerMarge Bot <[email protected]>2020-04-23 04:49:52 +0000
commit7e1b57a6d964ac58e84ec4ece2951e4e643d6b1a (patch)
treee66151c119845d9f2aa6962aa11a19292cb3702b /src/mesa/vbo
parent155bb74ea965e9b686a6bce89c7a77065f41755f (diff)
mesa: avoid redundant VBO updates
Avoids re-emitting unchanged VBO state, which is a big chunk of the state updates in gfxbench driver2 Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4619>
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_private.h7
1 files changed, 1 insertions, 6 deletions
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);
}