diff options
author | Keith Whitwell <[email protected]> | 2007-12-20 13:47:11 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2007-12-20 13:47:11 +0000 |
commit | 9e41d547db6669ff669f1d60cb35df9edf306370 (patch) | |
tree | 40392212075ca054c2f6bdbdfbe242e8eca274ce /src/mesa/pipe/i965simple/brw_flush.c | |
parent | 21c67b70d4bcffad8f0f07c0423c18e59f4259ea (diff) |
965: respect pipe flush flags
Now we emit way too many flushes instead of none at all.
Diffstat (limited to 'src/mesa/pipe/i965simple/brw_flush.c')
-rw-r--r-- | src/mesa/pipe/i965simple/brw_flush.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/mesa/pipe/i965simple/brw_flush.c b/src/mesa/pipe/i965simple/brw_flush.c index 1f11c5f164c..5216c680cf6 100644 --- a/src/mesa/pipe/i965simple/brw_flush.c +++ b/src/mesa/pipe/i965simple/brw_flush.c @@ -49,22 +49,18 @@ static void brw_flush( struct pipe_context *pipe, * caches? */ if (flags & (PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_TEXTURE_CACHE)) { - unsigned flush = CMD_MI_FLUSH; - -#if 0 + struct brw_mi_flush flush; + + memset(&flush, 0, sizeof(flush)); + flush.opcode = CMD_MI_FLUSH; + if (!(flags & PIPE_FLUSH_RENDER_CACHE)) - flush |= INHIBIT_FLUSH_RENDER_CACHE; + flush.flags |= BRW_INHIBIT_FLUSH_RENDER_CACHE; if (flags & PIPE_FLUSH_TEXTURE_CACHE) - flush |= FLUSH_MAP_CACHE; -#endif + flush.flags |= BRW_FLUSH_READ_CACHE; - if (!BEGIN_BATCH(1, 0)) { - FLUSH_BATCH( &fence ); - assert(BEGIN_BATCH(1, 0)); - } - OUT_BATCH( flush ); - ADVANCE_BATCH(); + BRW_BATCH_STRUCT(brw, &flush); } /* If there are no flags, just flush pending commands to hardware: |