summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_draw.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_draw.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c
index fd3da1f20e5..dd4a720dd0e 100644
--- a/src/gallium/drivers/freedreno/freedreno_draw.c
+++ b/src/gallium/drivers/freedreno/freedreno_draw.c
@@ -84,15 +84,19 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
return;
}
- if (ctx->discard) {
- fd_batch_reset(ctx->batch);
- ctx->discard = false;
+ if (ctx->in_blit) {
+ fd_batch_reset(batch);
+ ctx->dirty = ~0;
}
+ batch->blit = ctx->in_blit;
+ batch->back_blit = ctx->in_shadow;
+
/* NOTE: needs to be before resource_written(batch->query_buf), otherwise
* query_buf may not be created yet.
*/
fd_hw_query_set_stage(batch, batch->draw, FD_STAGE_DRAW);
+
/*
* Figure out the buffers/features we need:
*/
@@ -219,9 +223,9 @@ fd_clear(struct pipe_context *pctx, unsigned buffers,
if (!fd_render_condition_check(pctx))
return;
- if (ctx->discard) {
- fd_batch_reset(ctx->batch);
- ctx->discard = false;
+ if (ctx->in_blit) {
+ fd_batch_reset(batch);
+ ctx->dirty = ~0;
}
/* for bookkeeping about which buffers have been cleared (and thus