radeonsi: don't mark non-dirty textures with CMASK as compressed
authorMarek Olšák <marek.olsak@amd.com>
Fri, 7 Apr 2017 10:36:59 +0000 (12:36 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sun, 16 Apr 2017 23:22:11 +0000 (01:22 +0200)
because the compression is skipped with non-dirty textures.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_descriptors.c

index 2f6f8eb57e867b63a0b137188b506f81e2ac38a4..971aa43c436693722d023bd5afc14ccdbde8a982 100644 (file)
@@ -555,8 +555,9 @@ static void si_set_sampler_view(struct si_context *sctx,
 
 static bool is_compressed_colortex(struct r600_texture *rtex)
 {
-       return rtex->cmask.size || rtex->fmask.size ||
-              (rtex->dcc_offset && rtex->dirty_level_mask);
+       return rtex->fmask.size ||
+              (rtex->dirty_level_mask &&
+               (rtex->cmask.size || rtex->dcc_offset));
 }
 
 static bool depth_needs_decompression(struct r600_texture *rtex,