aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-05-11 14:09:55 +0200
committerMarek Olšák <[email protected]>2016-06-01 17:35:30 +0200
commitef765d07894bdb6234c2f9cb47c7c3ab0f20fccf (patch)
treea0f52da86de3d9f928648bbeb403433ac2c04bbb /src/gallium
parent9d881cc0ac8f08f839dd86f6aeaf6c7bca97ccb1 (diff)
gallium/radeon: strenghten some checking for DMA preparation
Just for consistency. This doesn't fix anything, because DCC is not supported with non-mipmapped textures. v1.1: fix the comment about DCC Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index db63bebc676..7a241fedbd0 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -74,8 +74,11 @@ bool r600_prepare_for_dma_blit(struct r600_common_context *rctx,
return false;
if (rdst->dcc_offset) {
- /* We can't discard DCC if the texture has been exported. */
+ /* We can't discard DCC if the texture has been exported.
+ * We can only discard DCC for the entire texture.
+ */
if (rdst->resource.is_shared ||
+ rdst->resource.b.b.last_level > 0 ||
!util_texrange_covers_whole_level(&rdst->resource.b.b, dst_level,
dstx, dsty, dstz, src_box->width,
src_box->height, src_box->depth))
@@ -90,6 +93,8 @@ bool r600_prepare_for_dma_blit(struct r600_common_context *rctx,
* SDMA. Otherwise, use the 3D path.
*/
if (rdst->cmask.size && rdst->dirty_level_mask & (1 << dst_level)) {
+ /* The CMASK clear is only enabled for the first level. */
+ assert(dst_level == 0);
if (!util_texrange_covers_whole_level(&rdst->resource.b.b, dst_level,
dstx, dsty, dstz, src_box->width,
src_box->height, src_box->depth))