Merge commit 'origin/gallium-0.1' into gallium-0.2
[mesa.git] / src / mesa / drivers / dri / intel / intel_pixel_draw.c
index f7082f299e101c28ccce61e726c683d5bd629f19..5e32d8a8ed22caeda32289276454255b685340d8 100644 (file)
  * 
  **************************************************************************/
 
-#include "glheader.h"
-#include "enums.h"
-#include "image.h"
-#include "mtypes.h"
-#include "macros.h"
-#include "bufferobj.h"
+#include "main/glheader.h"
+#include "main/enums.h"
+#include "main/image.h"
+#include "main/mtypes.h"
+#include "main/macros.h"
+#include "main/bufferobj.h"
 #include "swrast/swrast.h"
 
 #include "intel_screen.h"
 #include "intel_context.h"
-#include "intel_ioctl.h"
 #include "intel_batchbuffer.h"
 #include "intel_blit.h"
 #include "intel_buffers.h"
@@ -81,7 +80,8 @@ do_texture_drawpixels(GLcontext * ctx,
    else {
       /* PBO only for now:
        */
-/*       _mesa_printf("%s - not PBO\n", __FUNCTION__); */
+      if (INTEL_DEBUG & DEBUG_PIXEL)
+        _mesa_printf("%s - not PBO\n", __FUNCTION__);
       return GL_FALSE;
    }
 
@@ -180,7 +180,7 @@ do_texture_drawpixels(GLcontext * ctx,
                                 srcx, srcx + width, srcy + height, srcy);
     out:
       intel->vtbl.leave_meta_state(intel);
-      intel_batchbuffer_flush(intel->batch);
+      intel_batchbuffer_emit_mi_flush(intel->batch);
    }
    UNLOCK_HARDWARE(intel);
    return GL_TRUE;
@@ -252,7 +252,7 @@ do_blit_drawpixels(GLcontext * ctx,
       return GL_FALSE;
    }
 
-   if (!intel_check_blit_fragment_ops(ctx)) {
+   if (!intel_check_blit_fragment_ops(ctx, GL_FALSE)) {
       if (INTEL_DEBUG & DEBUG_PIXEL)
          _mesa_printf("%s - bad GL fragment state for blitter\n",
                       __FUNCTION__);
@@ -313,7 +313,7 @@ do_blit_drawpixels(GLcontext * ctx,
          intelEmitCopyBlit(intel,
                            dest->cpp,
                            rowLength, src_buffer, src_offset, GL_FALSE,
-                           dest->pitch, dest->buffer, 0, dest->tiled,
+                           dest->pitch, dest->buffer, 0, dest->tiling,
                            rect.x1 - dest_rect.x1,
                            rect.y2 - dest_rect.y2,
                            rect.x1,
@@ -321,7 +321,6 @@ do_blit_drawpixels(GLcontext * ctx,
                           ctx->Color.ColorLogicOpEnabled ?
                           ctx->Color.LogicOp : GL_COPY);
       }
-      intel_batchbuffer_flush(intel->batch);
    }
    UNLOCK_HARDWARE(intel);