diff options
author | Marek Olšák <[email protected]> | 2015-11-07 15:00:55 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-11-13 19:54:42 +0100 |
commit | 35219076227e83ad2a406942c8b009337a4746d8 (patch) | |
tree | aa4a0a8e92dc58babe4670784ee57a9eee723ef3 /src/gallium/drivers/radeon/r600_pipe_common.c | |
parent | 600e212d87017db613b8068decfeab3e4bf86deb (diff) |
gallium/radeon: simplify restoring render condition after flush
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_pipe_common.c')
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 87399145be7..b6f6c92c5cf 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -134,17 +134,6 @@ static void r600_memory_barrier(struct pipe_context *ctx, unsigned flags) void r600_preflush_suspend_features(struct r600_common_context *ctx) { - /* Disable render condition. */ - ctx->saved_render_cond = NULL; - ctx->saved_render_cond_cond = FALSE; - ctx->saved_render_cond_mode = 0; - if (ctx->current_render_cond) { - ctx->saved_render_cond = ctx->current_render_cond; - ctx->saved_render_cond_cond = ctx->current_render_cond_cond; - ctx->saved_render_cond_mode = ctx->current_render_cond_mode; - ctx->b.render_condition(&ctx->b, NULL, FALSE, 0); - } - /* suspend queries */ ctx->queries_suspended_for_flush = false; if (ctx->num_cs_dw_nontimer_queries_suspend) { @@ -173,12 +162,11 @@ void r600_postflush_resume_features(struct r600_common_context *ctx) r600_resume_timer_queries(ctx); } - /* Re-enable render condition. */ - if (ctx->saved_render_cond) { - ctx->b.render_condition(&ctx->b, ctx->saved_render_cond, - ctx->saved_render_cond_cond, - ctx->saved_render_cond_mode); - } + /* Re-emit PKT3_SET_PREDICATION. */ + if (ctx->current_render_cond) + ctx->b.render_condition(&ctx->b, ctx->current_render_cond, + ctx->current_render_cond_cond, + ctx->current_render_cond_mode); } static void r600_flush_from_st(struct pipe_context *ctx, |