diff options
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_winsys.h | 1 |
2 files changed, 4 insertions, 3 deletions
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 { |