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/pixel.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/pixel.c')
-rw-r--r-- | src/mesa/main/pixel.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c index f5856a0ea79..d8dfab7be2b 100644 --- a/src/mesa/main/pixel.c +++ b/src/mesa/main/pixel.c @@ -158,7 +158,7 @@ validate_pbo_access(struct gl_context *ctx, &ctx->DefaultPacking.BufferObj, NULL); if (!ok) { - if (_mesa_is_bufferobj(pack->BufferObj)) { + if (pack->BufferObj) { _mesa_error(ctx, GL_INVALID_OPERATION, "gl[Get]PixelMap*v(out of bounds PBO access)"); } else { @@ -199,7 +199,7 @@ _mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values ) values = (const GLfloat *) _mesa_map_pbo_source(ctx, &ctx->Unpack, values); if (!values) { - if (_mesa_is_bufferobj(ctx->Unpack.BufferObj)) { + if (ctx->Unpack.BufferObj) { _mesa_error(ctx, GL_INVALID_OPERATION, "glPixelMapfv(PBO is mapped)"); } @@ -240,7 +240,7 @@ _mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values ) values = (const GLuint *) _mesa_map_pbo_source(ctx, &ctx->Unpack, values); if (!values) { - if (_mesa_is_bufferobj(ctx->Unpack.BufferObj)) { + if (ctx->Unpack.BufferObj) { _mesa_error(ctx, GL_INVALID_OPERATION, "glPixelMapuiv(PBO is mapped)"); } @@ -295,7 +295,7 @@ _mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values ) values = (const GLushort *) _mesa_map_pbo_source(ctx, &ctx->Unpack, values); if (!values) { - if (_mesa_is_bufferobj(ctx->Unpack.BufferObj)) { + if (ctx->Unpack.BufferObj) { _mesa_error(ctx, GL_INVALID_OPERATION, "glPixelMapusv(PBO is mapped)"); } @@ -344,7 +344,7 @@ _mesa_GetnPixelMapfvARB( GLenum map, GLsizei bufSize, GLfloat *values ) values = (GLfloat *) _mesa_map_pbo_dest(ctx, &ctx->Pack, values); if (!values) { - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { + if (ctx->Pack.BufferObj) { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetPixelMapfv(PBO is mapped)"); } @@ -393,7 +393,7 @@ _mesa_GetnPixelMapuivARB( GLenum map, GLsizei bufSize, GLuint *values ) values = (GLuint *) _mesa_map_pbo_dest(ctx, &ctx->Pack, values); if (!values) { - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { + if (ctx->Pack.BufferObj) { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetPixelMapuiv(PBO is mapped)"); } @@ -442,7 +442,7 @@ _mesa_GetnPixelMapusvARB( GLenum map, GLsizei bufSize, GLushort *values ) values = (GLushort *) _mesa_map_pbo_dest(ctx, &ctx->Pack, values); if (!values) { - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { + if (ctx->Pack.BufferObj) { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetPixelMapusv(PBO is mapped)"); } |