OSDN Git Service

Remove intelClear() hack.
authorKeith Whitwell <keith@tungstengraphics.com>
Thu, 2 Aug 2007 13:53:08 +0000 (14:53 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Thu, 2 Aug 2007 13:53:08 +0000 (14:53 +0100)
Have added intel_batchbuffer_flush calls to the blit functions.  We
still shouldn't be calling back into this remnant intel code from the
softpipe driver, though, so that will go too at some point.

src/mesa/drivers/dri/i915pipe/intel_blit.c
src/mesa/drivers/dri/i915pipe/intel_buffers.c
src/mesa/drivers/dri/i915pipe/intel_buffers.h
src/mesa/drivers/dri/i915pipe/intel_context.c

index 4a5f58e..062cd26 100644 (file)
@@ -267,6 +267,8 @@ intelEmitFillBlit(struct intel_context *intel,
              DRM_BO_MASK_MEM | DRM_BO_FLAG_WRITE, dst_offset);
    OUT_BATCH(value);
    ADVANCE_BATCH();
+
+   intel_batchbuffer_flush(intel->batch);
 }
 
 
@@ -385,6 +387,8 @@ intelEmitCopyBlit(struct intel_context *intel,
                 src_offset + src_y * src_pitch);
       ADVANCE_BATCH();
    }
+
+   intel_batchbuffer_flush( intel->batch );
 }
 
 
index 5e68a86..8fd785d 100644 (file)
@@ -296,28 +296,6 @@ intelWindowMoved(struct intel_context *intel)
 
 
 
-/* XXX - kludge required because softpipe_clear uses
- * region->fill(), which still calls intelBlit(!), but doesn't
- * flush the batchbuffer.  
- *
-    * One way or another, that behaviour should stop, and then this
-    * function can go aawy.
-    */
-void
-intelClear(struct pipe_context *pipe,
-           GLboolean color, GLboolean depth,
-           GLboolean stencil, GLboolean accum)
-{
-   GLcontext *ctx = (GLcontext *) pipe->glctx;
-   struct intel_context *intel = intel_context(ctx);
-
-   softpipe_clear(pipe, color, depth, stencil, accum);
-
-   intel_batchbuffer_flush(intel->batch);
-}
-
-
-
 /* Emit wait for pending flips */
 void
 intel_wait_flips(struct intel_context *intel, GLuint batch_flags)
@@ -729,9 +707,6 @@ intelReadBuffer(GLcontext * ctx, GLenum mode)
 void
 intelInitBufferFuncs(struct dd_function_table *functions)
 {
-#if 0
-   functions->Clear = intelClear;
-#endif
    functions->DrawBuffer = intelDrawBuffer;
    functions->ReadBuffer = intelReadBuffer;
 }
index f0602ee..5834e39 100644 (file)
@@ -52,9 +52,4 @@ extern void intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb);
 
 extern void intelInitBufferFuncs(struct dd_function_table *functions);
 
-extern void
-intelClear(struct pipe_context *pipe,
-           GLboolean color, GLboolean depth,
-           GLboolean stencil, GLboolean accum);
-
 #endif /* INTEL_BUFFERS_H */
index 0fc24c3..9c32ab0 100644 (file)
@@ -426,7 +426,6 @@ intelCreateContext(const __GLcontextModes * mesaVis,
    intel->pipe = intel->ctx.st->pipe;
    intel->pipe->screen = intelScreen;
    intel->pipe->glctx = ctx;
-   intel->pipe->clear = intelClear;
    intelScreen->pipe = intel->pipe;
    intel_init_region_functions(intel->pipe);