mesa: remove no longer needed _mesa_is_bufferobj function
[mesa.git] / src / mesa / main / pbo.c
index 6af815759f1c9e516ce70d271b4f5fc8700aa37f..8ab782f3a338897bc39eba16741617ba705a6fd3 100644 (file)
@@ -79,7 +79,7 @@ _mesa_validate_pbo_access(GLuint dimensions,
       If a PBO is bound, 'ptr' is an offset into the bound PBO.
       In that case 'clientMemSize' is ignored: we just use the PBO's size.
     */
-   if (!_mesa_is_bufferobj(pack->BufferObj)) {
+   if (!pack->BufferObj) {
       offset = 0;
       size = (clientMemSize == INT_MAX) ? UINTPTR_MAX : clientMemSize;
    } else {
@@ -151,7 +151,7 @@ _mesa_map_pbo_source(struct gl_context *ctx,
 {
    const GLubyte *buf;
 
-   if (_mesa_is_bufferobj(unpack->BufferObj)) {
+   if (unpack->BufferObj) {
       /* unpack from PBO */
       buf = (GLubyte *) ctx->Driver.MapBufferRange(ctx, 0,
                                                   unpack->BufferObj->Size,
@@ -188,7 +188,7 @@ _mesa_validate_pbo_source(struct gl_context *ctx, GLuint dimensions,
 
    if (!_mesa_validate_pbo_access(dimensions, unpack, width, height, depth,
                                   format, type, clientMemSize, ptr)) {
-      if (_mesa_is_bufferobj(unpack->BufferObj)) {
+      if (unpack->BufferObj) {
          _mesa_error(ctx, GL_INVALID_OPERATION,
                      "%s(out of bounds PBO access)",
                      where);
@@ -200,7 +200,7 @@ _mesa_validate_pbo_source(struct gl_context *ctx, GLuint dimensions,
       return false;
    }
 
-   if (!_mesa_is_bufferobj(unpack->BufferObj)) {
+   if (!unpack->BufferObj) {
       /* non-PBO access: no further validation to be done */
       return true;
    }
@@ -225,7 +225,7 @@ _mesa_validate_pbo_source_compressed(struct gl_context *ctx, GLuint dimensions,
                                      GLsizei imageSize, const GLvoid *pixels,
                                      const char *where)
 {
-   if (!_mesa_is_bufferobj(unpack->BufferObj)) {
+   if (!unpack->BufferObj) {
       /* not using a PBO */
       return true;
    }
@@ -284,7 +284,7 @@ _mesa_unmap_pbo_source(struct gl_context *ctx,
                        const struct gl_pixelstore_attrib *unpack)
 {
    assert(unpack != &ctx->Pack); /* catch pack/unpack mismatch */
-   if (_mesa_is_bufferobj(unpack->BufferObj)) {
+   if (unpack->BufferObj) {
       ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj, MAP_INTERNAL);
    }
 }
@@ -305,7 +305,7 @@ _mesa_map_pbo_dest(struct gl_context *ctx,
 {
    void *buf;
 
-   if (_mesa_is_bufferobj(pack->BufferObj)) {
+   if (pack->BufferObj) {
       /* pack into PBO */
       buf = (GLubyte *) ctx->Driver.MapBufferRange(ctx, 0,
                                                   pack->BufferObj->Size,
@@ -346,7 +346,7 @@ _mesa_map_validate_pbo_dest(struct gl_context *ctx,
 
    if (!_mesa_validate_pbo_access(dimensions, unpack, width, height, depth,
                                   format, type, clientMemSize, ptr)) {
-      if (_mesa_is_bufferobj(unpack->BufferObj)) {
+      if (unpack->BufferObj) {
          _mesa_error(ctx, GL_INVALID_OPERATION,
                      "%s(out of bounds PBO access)", where);
       } else {
@@ -357,7 +357,7 @@ _mesa_map_validate_pbo_dest(struct gl_context *ctx,
       return NULL;
    }
 
-   if (!_mesa_is_bufferobj(unpack->BufferObj)) {
+   if (!unpack->BufferObj) {
       /* non-PBO access: no further validation to be done */
       return ptr;
    }
@@ -381,7 +381,7 @@ _mesa_unmap_pbo_dest(struct gl_context *ctx,
                      const struct gl_pixelstore_attrib *pack)
 {
    assert(pack != &ctx->Unpack); /* catch pack/unpack mismatch */
-   if (_mesa_is_bufferobj(pack->BufferObj)) {
+   if (pack->BufferObj) {
       ctx->Driver.UnmapBuffer(ctx, pack->BufferObj, MAP_INTERNAL);
    }
 }
@@ -402,7 +402,7 @@ _mesa_validate_pbo_teximage(struct gl_context *ctx, GLuint dimensions,
 {
    GLubyte *buf;
 
-   if (!_mesa_is_bufferobj(unpack->BufferObj)) {
+   if (!unpack->BufferObj) {
       /* no PBO */
       return pixels;
    }
@@ -450,7 +450,7 @@ _mesa_validate_pbo_compressed_teximage(struct gl_context *ctx,
       return NULL;
    }
 
-   if (!_mesa_is_bufferobj(packing->BufferObj)) {
+   if (!packing->BufferObj) {
       /* not using a PBO - return pointer unchanged */
       return pixels;
    }
@@ -478,7 +478,7 @@ void
 _mesa_unmap_teximage_pbo(struct gl_context *ctx,
                          const struct gl_pixelstore_attrib *unpack)
 {
-   if (_mesa_is_bufferobj(unpack->BufferObj)) {
+   if (unpack->BufferObj) {
       ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj, MAP_INTERNAL);
    }
 }