Mesa (master): i965: use _mesa_is_bufferobj()

Brian Paul brianp at kemper.freedesktop.org
Tue Sep 8 20:42:01 UTC 2009


Module: Mesa
Branch: master
Commit: 8e8d3470be3b1aae4ede7ccca097a28b0978dd1b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8e8d3470be3b1aae4ede7ccca097a28b0978dd1b

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Sep  8 14:28:19 2009 -0600

i965: use _mesa_is_bufferobj()

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 |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_pixel_read.c b/src/mesa/drivers/dri/intel/intel_pixel_read.c
index 8713463..bc67f62 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_read.c
@@ -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)




More information about the mesa-commit mailing list