diff options
author | Marek Olšák <[email protected]> | 2016-06-03 20:40:30 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-06-08 00:22:45 +0200 |
commit | aa7fe7044328039903993dde6edb32b7953ae9b0 (patch) | |
tree | 526b8903759ffcd65107621877b63273eec8931b /src/gallium/drivers/radeonsi/si_blit.c | |
parent | 60e93ddd0675e525333ae928e94be31b973409de (diff) |
radeonsi: add per-level dcc_enabled flags
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_blit.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_blit.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 34481c1d7ed..2059d9d018c 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -321,6 +321,13 @@ static void si_blit_decompress_color(struct pipe_context *ctx, if (rtex->dcc_offset && need_dcc_decompress) { custom_blend = sctx->custom_blend_dcc_decompress; + + /* disable levels without DCC */ + for (int i = first_level; i <= last_level; i++) { + if (!rtex->dcc_offset || + !rtex->surface.level[i].dcc_enabled) + level_mask &= ~(1 << i); + } } else if (rtex->fmask.size) { custom_blend = sctx->custom_blend_decompress; } else { |