brw_flush.c File Reference

Include dependency graph for brw_flush.c:

Go to the source code of this file.

Functions

static void brw_flush (struct pipe_context *pipe, unsigned flags, struct pipe_fence_handle **fence)
void brw_init_flush_functions (struct brw_context *brw)


Function Documentation

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

Definition at line 39 of file brw_flush.c.

References BRW_BATCH_STRUCT, brw_context(), BRW_FLUSH_READ_CACHE, BRW_INHIBIT_FLUSH_RENDER_CACHE, CMD_MI_FLUSH, brw_mi_flush::flags, FLUSH_BATCH, brw_mi_flush::opcode, PIPE_FLUSH_RENDER_CACHE, and PIPE_FLUSH_TEXTURE_CACHE.

00042 {
00043    struct brw_context *brw = brw_context(pipe);
00044 
00045    /* Do we need to emit an MI_FLUSH command to flush the hardware
00046     * caches?
00047     */
00048    if (flags & (PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_TEXTURE_CACHE)) {
00049       struct brw_mi_flush flush;
00050 
00051       memset(&flush, 0, sizeof(flush));      
00052       flush.opcode = CMD_MI_FLUSH;
00053 
00054       if (!(flags & PIPE_FLUSH_RENDER_CACHE))
00055          flush.flags |= BRW_INHIBIT_FLUSH_RENDER_CACHE;
00056 
00057       if (flags & PIPE_FLUSH_TEXTURE_CACHE)
00058          flush.flags |= BRW_FLUSH_READ_CACHE;
00059 
00060       BRW_BATCH_STRUCT(brw, &flush);
00061    }
00062 
00063    /* If there are no flags, just flush pending commands to hardware:
00064     */
00065    FLUSH_BATCH( fence );
00066 }

void brw_init_flush_functions ( struct brw_context brw  ) 

Definition at line 70 of file brw_flush.c.

References brw_flush(), pipe_context::flush, and brw_context::pipe.

00071 {
00072    brw->pipe.flush = brw_flush;
00073 }


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