summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_draw.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2017-05-15 12:36:24 -0400
committerRob Clark <[email protected]>2017-05-16 16:34:21 -0400
commit9235ab65505657a81f98509b0a01688e9c630d39 (patch)
treeb3ce973e945b76050b7ac5b08b82b3a5b634a634 /src/gallium/drivers/freedreno/freedreno_draw.c
parentcb16d9103480687c414519bed5256217c9e7aaad (diff)
freedreno/a5xx: fallback to slow-clear for z32
We probably *could* do this with blit path, but I think it would involve clobbering settings from batch->gmem (see emit_zs()). Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_draw.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_draw.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c
index 08cba777510..a4a19750a42 100644
--- a/src/gallium/drivers/freedreno/freedreno_draw.c
+++ b/src/gallium/drivers/freedreno/freedreno_draw.c
@@ -384,17 +384,22 @@ fd_clear(struct pipe_context *pctx, unsigned buffers,
/* if per-gen backend doesn't implement ctx->clear() generic
* blitter clear:
*/
- if (!ctx->clear) {
- fd_blitter_clear(pctx, buffers, color, depth, stencil);
- return;
- }
+ bool fallback = true;
- fd_batch_set_stage(batch, FD_STAGE_CLEAR);
+ if (ctx->clear) {
+ fd_batch_set_stage(batch, FD_STAGE_CLEAR);
- ctx->clear(ctx, buffers, color, depth, stencil);
+ if (ctx->clear(ctx, buffers, color, depth, stencil)) {
+ if (fd_mesa_debug & FD_DBG_DCLEAR)
+ fd_context_all_dirty(ctx);
- if (fd_mesa_debug & FD_DBG_DCLEAR)
- fd_context_all_dirty(ctx);
+ fallback = false;
+ }
+ }
+
+ if (fallback) {
+ fd_blitter_clear(pctx, buffers, color, depth, stencil);
+ }
}
static void