diff options
author | Marek Olšák <[email protected]> | 2013-06-30 18:29:17 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-07-08 20:25:18 +0200 |
commit | 1faa37557373aa29169aa4e3b95c6dcf5aced025 (patch) | |
tree | c8ea228ad17e5423a44c4f8e5f646ef3b8ec3759 /src/gallium/drivers/r600/r600_pipe.c | |
parent | 287b2fa115f95f675f7b7915777ed29d8e9d6f44 (diff) |
r600g: improve the mechanism for recognizing an empty CS
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 8b67e85af19..a4e88ce0d7a 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -164,6 +164,9 @@ static void r600_flush(struct pipe_context *ctx, unsigned flags) unsigned render_cond_mode = 0; boolean render_cond_cond = FALSE; + if (rctx->rings.gfx.cs->cdw == rctx->initial_gfx_cs_size) + return; + rctx->rings.gfx.flushing = true; /* Disable render condition. */ if (rctx->current_render_cond) { @@ -181,6 +184,8 @@ static void r600_flush(struct pipe_context *ctx, unsigned flags) if (render_cond) { ctx->render_condition(ctx, render_cond, render_cond_cond, render_cond_mode); } + + rctx->initial_gfx_cs_size = rctx->rings.gfx.cs->cdw; } static void r600_flush_from_st(struct pipe_context *ctx, |