i915_flush.c File Reference

Include dependency graph for i915_flush.c:

Go to the source code of this file.

Functions

static void i915_flush (struct pipe_context *pipe, unsigned flags, struct pipe_fence_handle **fence)
void i915_init_flush_functions (struct i915_context *i915)


Function Documentation

static void i915_flush ( struct pipe_context pipe,
unsigned  flags,
struct pipe_fence_handle **  fence 
) [static]

Definition at line 40 of file i915_flush.c.

References assert, BEGIN_BATCH, i915_context::draw, draw_flush(), FLUSH_BATCH, FLUSH_MAP_CACHE, i915_context(), INHIBIT_FLUSH_RENDER_CACHE, MI_FLUSH, OUT_BATCH, PIPE_FLUSH_RENDER_CACHE, PIPE_FLUSH_TEXTURE_CACHE, and i915_context::vbo_flushed.

00043 {
00044    struct i915_context *i915 = i915_context(pipe);
00045 
00046    draw_flush(i915->draw);
00047 
00048    /* Do we need to emit an MI_FLUSH command to flush the hardware
00049     * caches?
00050     */
00051    if (flags & (PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_TEXTURE_CACHE)) {
00052       unsigned flush = MI_FLUSH;
00053       
00054       if (!(flags & PIPE_FLUSH_RENDER_CACHE))
00055          flush |= INHIBIT_FLUSH_RENDER_CACHE;
00056 
00057       if (flags & PIPE_FLUSH_TEXTURE_CACHE)
00058          flush |= FLUSH_MAP_CACHE;
00059 
00060       if (!BEGIN_BATCH(1, 0)) {
00061          FLUSH_BATCH(NULL);
00062          assert(BEGIN_BATCH(1, 0));
00063       }
00064       OUT_BATCH( flush );
00065    }
00066 
00067    /* If there are no flags, just flush pending commands to hardware:
00068     */
00069    FLUSH_BATCH(fence);
00070    i915->vbo_flushed = 1;
00071 }

void i915_init_flush_functions ( struct i915_context i915  ) 

Definition at line 75 of file i915_flush.c.

References pipe_context::flush, i915_flush(), and i915_context::pipe.

00076 {
00077    i915->pipe.flush = i915_flush;
00078 }


Generated on Tue Sep 29 06:25:34 2009 for Gallium3D by  doxygen 1.5.4