diff options
author | Marek Olšák <[email protected]> | 2020-03-21 21:36:28 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2020-04-06 10:28:53 -0400 |
commit | e630271e0ec3eee7d921d76d3924873f6ee6b59b (patch) | |
tree | 28f71d8b21fbf1805325178c71233209920cdcd8 /src/mesa/main/draw.c | |
parent | a0a0c68150b4dbba469c62159a327ae9465f6016 (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/main/draw.c')
-rw-r--r-- | src/mesa/main/draw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c index e856d9c5ef3..5bb254e00d2 100644 --- a/src/mesa/main/draw.c +++ b/src/mesa/main/draw.c @@ -90,7 +90,7 @@ check_array_data(struct gl_context *ctx, struct gl_vertex_array_object *vao, array->Format.Type, array->Format.Size, binding->Stride); printf(" Address/offset %p in Buffer Object %u\n", - array->Ptr, bo->Name); + array->Ptr, bo ? bo->Name : 0); f[k] = 1.0F; /* XXX replace the bad value! */ } /*assert(!IS_INF_OR_NAN(f[k])); */ @@ -255,7 +255,7 @@ print_draw_arrays(struct gl_context *ctx, "ptr %p Bufobj %u\n", gl_vert_attrib_name((gl_vert_attrib) i), array->Format.Size, binding->Stride, - array->Ptr, bufObj->Name); + array->Ptr, bufObj ? bufObj->Name : 0); if (_mesa_is_bufferobj(bufObj)) { GLubyte *p = bufObj->Mappings[MAP_INTERNAL].Pointer; |