summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_blit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_blit.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_blit.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index cdc9cafa280..a94804d6c25 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -427,8 +427,7 @@ static void si_blit_decompress_color(struct pipe_context *ctx,
/* disable levels without DCC */
for (int i = first_level; i <= last_level; i++) {
- if (!rtex->dcc_offset ||
- i >= rtex->surface.num_dcc_levels)
+ if (!vi_dcc_enabled(rtex, i))
level_mask &= ~(1 << i);
}
} else if (rtex->fmask.size) {
@@ -1039,8 +1038,7 @@ static bool do_hardware_msaa_resolve(struct pipe_context *ctx,
* it's being overwritten anyway, clear it to uncompressed.
* This is still the fastest codepath even with this clear.
*/
- if (dst->dcc_offset &&
- info->dst.level < dst->surface.num_dcc_levels) {
+ if (vi_dcc_enabled(dst, info->dst.level)) {
/* TODO: Implement per-level DCC clears for GFX9. */
if (sctx->b.chip_class >= GFX9 &&
info->dst.resource->last_level != 0)