From aa7fe7044328039903993dde6edb32b7953ae9b0 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 3 Jun 2016 20:40:30 +0200 Subject: radeonsi: add per-level dcc_enabled flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle Reviewed-by: Bas Nieuwenhuizen --- src/gallium/drivers/radeon/r600_texture.c | 6 +++--- src/gallium/drivers/radeon/radeon_winsys.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/radeon') diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 37f8e023c09..b27641722d6 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -72,10 +72,10 @@ bool r600_prepare_for_dma_blit(struct r600_common_context *rctx, * dst: If overwriting the whole texture, discard DCC and use SDMA. * Otherwise, use the 3D path. */ - if (rsrc->dcc_offset) + if (rsrc->dcc_offset && rsrc->surface.level[src_level].dcc_enabled) return false; - if (rdst->dcc_offset) { + if (rdst->dcc_offset && rdst->surface.level[dst_level].dcc_enabled) { /* We can't discard DCC if the texture has been exported. * We can only discard DCC for the entire texture. */ @@ -1872,7 +1872,7 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx, continue; } - if (tex->dcc_offset) { + if (tex->dcc_offset && tex->surface.level[0].dcc_enabled) { uint32_t reset_value; bool clear_words_needed; diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h index a0c7abf9dc8..d7bb1654a7a 100644 --- a/src/gallium/drivers/radeon/radeon_winsys.h +++ b/src/gallium/drivers/radeon/radeon_winsys.h @@ -360,6 +360,7 @@ struct radeon_surf_level { uint32_t pitch_bytes; uint32_t mode; uint64_t dcc_offset; + bool dcc_enabled; }; struct radeon_surf { -- cgit v1.2.3