summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2017-04-07 12:36:59 +0200
committerMarek Olšák <marek.olsak@amd.com>2017-04-17 01:22:11 +0200
commitbdd6449769527f55d7cba3443da08ae03448de34 (patch)
tree20b77f8bf56e080a96990a29d4b20c6d5dcea0a4 /src
parent566f2ed5716297ce60ca10c57aeddc406835c430 (diff)
radeonsi: don't mark non-dirty textures with CMASK as compressed
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>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 2f6f8eb57e..971aa43c43 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -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,