summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/radeonsi/si_clear.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_clear.c b/src/gallium/drivers/radeonsi/si_clear.c
index f8136d2b2c4..4e05d9bf5b2 100644
--- a/src/gallium/drivers/radeonsi/si_clear.c
+++ b/src/gallium/drivers/radeonsi/si_clear.c
@@ -593,9 +593,9 @@ static void si_clear(struct pipe_context *ctx, unsigned buffers,
*
* This hack decreases back-to-back ClearDepth performance.
*/
- if (sctx->screen->clear_db_cache_before_clear) {
+ if ((sctx->db_depth_clear || sctx->db_stencil_clear) &&
+ sctx->screen->clear_db_cache_before_clear)
sctx->flags |= SI_CONTEXT_FLUSH_AND_INV_DB;
- }
}
si_blitter_begin(sctx, SI_CLEAR);