summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-09-12 23:33:50 +0200
committerMarek Olšák <[email protected]>2012-09-30 18:57:56 +0200
commit84d2f2295e8274c1b3676b59fedfc173836d378e (patch)
treea1f67048a654f2efe9551f96f639edd65d2f394f /src/gallium/drivers/r600
parent59dfe0af604e13445b3cc7d267d6f9f1e4ea0411 (diff)
gallium/u_blitter: add ability to disable and restore the render condition
Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_blit.c17
-rw-r--r--src/gallium/drivers/r600/r600_pipe.h2
2 files changed, 5 insertions, 14 deletions
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index 09fb6239221..3da583c5d09 100644
--- a/src/gallium/drivers/r600/r600_blit.c
+++ b/src/gallium/drivers/r600/r600_blit.c
@@ -84,23 +84,16 @@ static void r600_blitter_begin(struct pipe_context *ctx, enum r600_blitter_op op
}
if ((op & R600_DISABLE_RENDER_COND) && rctx->current_render_cond) {
- rctx->saved_render_cond = rctx->current_render_cond;
- rctx->saved_render_cond_mode = rctx->current_render_cond_mode;
- rctx->context.render_condition(&rctx->context, NULL, 0);
- }
-
+ util_blitter_save_render_condition(rctx->blitter,
+ rctx->current_render_cond,
+ rctx->current_render_cond_mode);
+ }
}
static void r600_blitter_end(struct pipe_context *ctx)
{
struct r600_context *rctx = (struct r600_context *)ctx;
- if (rctx->saved_render_cond) {
- rctx->context.render_condition(&rctx->context,
- rctx->saved_render_cond,
- rctx->saved_render_cond_mode);
- rctx->saved_render_cond = NULL;
- }
- r600_resume_nontimer_queries(rctx);
+ r600_resume_nontimer_queries(rctx);
}
static unsigned u_max_layer(struct pipe_resource *r, unsigned level)
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index 68800609979..e66766a9844 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -385,8 +385,6 @@ struct r600_context {
struct r600_pipe_state spi;
struct pipe_query *current_render_cond;
unsigned current_render_cond_mode;
- struct pipe_query *saved_render_cond;
- unsigned saved_render_cond_mode;
/* shader information */
boolean two_side;
boolean spi_dirty;