[Mesa-dev] [PATCH 1/7] radeonsi: don't mark non-dirty textures with CMASK as compressed
Marek Olšák
maraeo at gmail.com
Fri Apr 14 15:08:16 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
because the compression is skipped with non-dirty textures.
---
src/gallium/drivers/radeonsi/si_descriptors.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 2f6f8eb..971aa43 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -548,22 +548,23 @@ static void si_set_sampler_view(struct si_context *sctx,
views->enabled_mask &= ~(1u << slot);
}
descs->dirty_mask |= 1u << slot;
sctx->descriptors_dirty |= 1u << si_sampler_descriptors_idx(shader);
}
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,
struct si_sampler_view *sview)
{
return rtex->db_compatible &&
(!rtex->tc_compatible_htile || sview->is_stencil_sampler);
}
static void si_update_compressed_tex_shader_mask(struct si_context *sctx,
--
2.7.4
More information about the mesa-dev
mailing list