diff options
author | Marek Olšák <[email protected]> | 2020-03-21 23:56:07 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2020-04-06 10:28:53 -0400 |
commit | 10beee8a7757e956ab0e02ec8402ec1273d8edce (patch) | |
tree | c6bce7c442f7f87ed18e973b623ccd9d49cd209a /src/mesa/main/varray.c | |
parent | 58fab9a6fe258395d934b69c454f1b54bcefedf1 (diff) |
mesa: remove no longer needed _mesa_is_bufferobj function
All buffers have Name != 0.
Note that there is no longer the pointer dereference to get Name,
so it's faster.
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/varray.c')
-rw-r--r-- | src/mesa/main/varray.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 357492583e6..2190687e108 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -169,7 +169,7 @@ _mesa_vertex_attrib_binding(struct gl_context *ctx, if (array->BufferBindingIndex != bindingIndex) { const GLbitfield array_bit = VERT_BIT(attribIndex); - if (_mesa_is_bufferobj(vao->BufferBinding[bindingIndex].BufferObj)) + if (vao->BufferBinding[bindingIndex].BufferObj) vao->VertexAttribBufferMask |= array_bit; else vao->VertexAttribBufferMask &= ~array_bit; @@ -205,7 +205,7 @@ _mesa_bind_vertex_buffer(struct gl_context *ctx, struct gl_vertex_buffer_binding *binding = &vao->BufferBinding[index]; if (ctx->Const.VertexBufferOffsetIsInt32 && (int)offset < 0 && - _mesa_is_bufferobj(vbo)) { + vbo) { /* The offset will be interpreted as a signed int, so make sure * the user supplied offset is not negative (driver limitation). */ @@ -227,7 +227,7 @@ _mesa_bind_vertex_buffer(struct gl_context *ctx, binding->Offset = offset; binding->Stride = stride; - if (!_mesa_is_bufferobj(vbo)) { + if (!vbo) { vao->VertexAttribBufferMask &= ~binding->_BoundArrays; } else { vao->VertexAttribBufferMask |= binding->_BoundArrays; @@ -831,7 +831,7 @@ validate_array(struct gl_context *ctx, const char *func, * 2.9.6), and the pointer argument is not NULL." */ if (ptr != NULL && vao != ctx->Array.DefaultVAO && - !_mesa_is_bufferobj(obj)) { + !obj) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-VBO array)", func); return; } |