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/readpix.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/readpix.c')
-rw-r--r-- | src/mesa/main/readpix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 45e5754d9a4..a7ca828e3f1 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -1141,7 +1141,7 @@ read_pixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, if (!no_error) { if (!_mesa_validate_pbo_access(2, &ctx->Pack, width, height, 1, format, type, bufSize, pixels)) { - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { + if (ctx->Pack.BufferObj) { _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(out of bounds PBO access)"); } else { @@ -1152,7 +1152,7 @@ read_pixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, return; } - if (_mesa_is_bufferobj(ctx->Pack.BufferObj) && + if (ctx->Pack.BufferObj && _mesa_check_disallowed_mapping(ctx->Pack.BufferObj)) { /* buffer is mapped - that's an error */ _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(PBO is mapped)"); |