Mesa (master): i965: use _mesa_readpixels() instead of _swrast_ReadPixels()

Brian Paul brianp at kemper.freedesktop.org
Tue Nov 15 15:07:35 UTC 2011


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

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Nov 15 08:07:08 2011 -0700

i965: use _mesa_readpixels() instead of _swrast_ReadPixels()

---

 src/mesa/drivers/dri/intel/intel_pixel_read.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_pixel_read.c b/src/mesa/drivers/dri/intel/intel_pixel_read.c
index a79b69c..1e23fdb 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_read.c
@@ -31,8 +31,8 @@
 #include "main/macros.h"
 #include "main/image.h"
 #include "main/bufferobj.h"
+#include "main/readpix.h"
 #include "main/state.h"
-#include "swrast/swrast.h"
 
 #include "intel_screen.h"
 #include "intel_context.h"
@@ -188,16 +188,15 @@ intelReadPixels(struct gl_context * ctx,
 
    fallback_debug("%s: fallback to swrast\n", __FUNCTION__);
 
-   /* Update Mesa state before calling down into _swrast_ReadPixels, as
-    * the spans code requires the computed buffer states to be up to date,
-    * but _swrast_ReadPixels only updates Mesa state after setting up
-    * the spans code.
+   /* Update Mesa state before calling _mesa_readpixels().
+    * XXX this may not be needed since ReadPixels no longer uses the
+    * span code.
     */
 
    if (ctx->NewState)
       _mesa_update_state(ctx);
 
-   _swrast_ReadPixels(ctx, x, y, width, height, format, type, pack, pixels);
+   _mesa_readpixels(ctx, x, y, width, height, format, type, pack, pixels);
 
    /* There's an intel_prepare_render() call in intelSpanRenderStart(). */
    intel->front_buffer_dirty = dirty;




More information about the mesa-commit mailing list