i965: use _mesa_is_bufferobj()
authorBrian Paul <brianp@vmware.com>
Tue, 8 Sep 2009 20:28:19 +0000 (14:28 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 8 Sep 2009 20:33:47 +0000 (14:33 -0600)
Also, remove unneeded call to _mesa_validate_pbo_access().  It's done by
core Mesa as the comment suggested.

src/mesa/drivers/dri/intel/intel_pixel_read.c

index 8713463ace27b899d8e07753be90cf48c6145857..bc67f6242a192a3828eb114b643c800052989635 100644 (file)
@@ -180,16 +180,7 @@ do_blit_readpixels(GLcontext * ctx,
    if (!src)
       return GL_FALSE;
 
-   if (pack->BufferObj->Name) {
-      /* XXX This validation should be done by core mesa:
-       */
-      if (!_mesa_validate_pbo_access(2, pack, width, height, 1,
-                                     format, type, pixels)) {
-         _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels");
-         return GL_TRUE;
-      }
-   }
-   else {
+   if (!_mesa_is_bufferobj(pack->BufferObj)) {
       /* PBO only for now:
        */
       if (INTEL_DEBUG & DEBUG_PIXEL)