summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_context.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-03-21 21:36:28 -0400
committerMarek Olšák <[email protected]>2020-04-06 10:28:53 -0400
commite630271e0ec3eee7d921d76d3924873f6ee6b59b (patch)
tree28f71d8b21fbf1805325178c71233209920cdcd8 /src/mesa/vbo/vbo_context.c
parenta0a0c68150b4dbba469c62159a327ae9465f6016 (diff)
mesa: don't ever set NullBufferObj in gl_vertex_array_binding
This improves performance by 5% in the game "torcs", FPS: 98.83 -> 103.73 It does a lot of glPush/PopClientAttrib, which exacerbates the overhead of setting NullBufferObj. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466>
Diffstat (limited to 'src/mesa/vbo/vbo_context.c')
-rw-r--r--src/mesa/vbo/vbo_context.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c
index ac8f9973f98..ad23655e6f0 100644
--- a/src/mesa/vbo/vbo_context.c
+++ b/src/mesa/vbo/vbo_context.c
@@ -168,8 +168,7 @@ _vbo_CreateContext(struct gl_context *ctx, bool use_buffer_objects)
vbo->binding.Offset = 0;
vbo->binding.Stride = 0;
vbo->binding.InstanceDivisor = 0;
- _mesa_reference_buffer_object(ctx, &vbo->binding.BufferObj,
- ctx->Shared->NullBufferObj);
+
init_legacy_currval(ctx);
init_generic_currval(ctx);
init_mat_currval(ctx);
@@ -202,7 +201,6 @@ _vbo_DestroyContext(struct gl_context *ctx)
struct vbo_context *vbo = vbo_context(ctx);
if (vbo) {
-
_mesa_reference_buffer_object(ctx, &vbo->binding.BufferObj, NULL);
vbo_exec_destroy(ctx);