mesa: rename _mesa_free_errors_data
[mesa.git] / src / mesa / main / readpix.c
index 45e5754d9a43ef6fa82c93915321d58061f2cb3c..bca9c0c90a43aafe0ad1e256664e5b6c860ad650 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "glheader.h"
-#include "util/imports.h"
+
 #include "blend.h"
 #include "bufferobj.h"
 #include "context.h"
@@ -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)");