diff options
author | Marek Olšák <[email protected]> | 2018-01-30 02:51:47 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-02-21 20:03:11 +0100 |
commit | b494ed168ccaf42fef32e92b64e764eba3f7a1a5 (patch) | |
tree | 526405c96a4ca05659a8bd0d6dcbfac26b59079f /src/gallium | |
parent | 5f55f4c59fba483eb781da291f254c52845d8bc2 (diff) |
radeonsi: don't flush when si_eliminate_fast_color_clear is no-op
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index a0e91292c3d..125e7ef4089 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -389,8 +389,12 @@ void si_eliminate_fast_color_clear(struct r600_common_context *rctx, if (ctx == sscreen->aux_context) mtx_lock(&sscreen->aux_context_lock); + unsigned n = rctx->num_decompress_calls; ctx->flush_resource(ctx, &rtex->resource.b.b); - ctx->flush(ctx, NULL, 0); + + /* Flush only if any fast clear elimination took place. */ + if (n != rctx->num_decompress_calls) + ctx->flush(ctx, NULL, 0); if (ctx == sscreen->aux_context) mtx_unlock(&sscreen->aux_context_lock); |