diff options
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_draw.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_draw.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index b8ba4545b94..112bf5cb624 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.c +++ b/src/gallium/drivers/freedreno/freedreno_draw.c @@ -84,6 +84,11 @@ 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; + } + /* * Figure out the buffers/features we need: */ @@ -209,6 +214,11 @@ 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; + } + /* for bookkeeping about which buffers have been cleared (and thus * can fully or partially skip mem2gmem) we need to ignore buffers * that have already had a draw, in case apps do silly things like |