#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"
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;